will this be formal? - concordia...

42
Will This Be Formal? Will This Be Formal? Dr. Steven P. Miller July 15, 2008 © Copyright 2008 Rockwell Collins, Inc. All rights reserved.

Upload: others

Post on 26-Apr-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Will This Be Formal? Will This Be Formal?

Dr. Steven P. MillerJuly 15, 2008

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

Page 2: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Presentation OverviewPresentation Overview

What Problem are We Solving?

Who Are We?

What are Formal Methods?

Examples of Using Formal Methods

Challenges and Future Directions

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

2

Page 3: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

What Problem Are We Solving?What Problem Are We Solving?

• Increasing Size and Complexity of Critical Systems

– Safety critical, security critical, and mission critical

– Exponential growth in size and complexityp g p y

• Rapidly Growing Cost of Verification• Rapidly Growing Cost of Verification

– Exponential growth in cost

– Becoming the limiting factor in deployment

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

3

Page 4: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Airborne Software Doubles Every Two Years

100000A330/A340

y

1000

10000

ds

A3102M

A3204M

A330/A340

10M

100

1000

K W

ord

200K

A300FF

10INS

4K

A300B23K

11965 1970 1975 1980 1985 1990 1995

4K

k lk C S f C l A f S h A l C f

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

4

J.P. Potocki De Montalk, Computer Software in Civil Aircraft, Sixth Annual Conference on Computer Assurance (COMPASS ’91), Gaithersberg, MD, June 24-27, 1991.

Page 5: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Similar Growth Has Been Seen by Boeing

Complexity Size230K 100

Similar Growth Has Been Seen by Boeing

230K 100777 777

No. ofSignals

ObjectCode

(Mbytes)(Mbytes)

757/767

747-400

757/767

747-400

199519700 0

19951970Year

747-200 747-200 757/767

Year

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

5

Page 6: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

6WPAFB 08-5183 RBO-08685 8/20/2008

Page 7: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

7WPAFB 08-5183 RBO-08685 8/20/2008

Page 8: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

• Is the Problem Important?

Criteria for Formal Verification

• Is the Problem Important?

Are High Fidelity Models Available?• Are High Fidelity Models Available?

C th P ti f I t t b F li d?• Can the Properties of Interest be Formalized?

h i h l i l il bl ?• Are the Right Analysis Tools Available?

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

8

Page 9: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Presentation OverviewPresentation Overview

What Problem are We Solving?

Who Are We?

What are Formal Methods?

Examples of Using Formal Methods

Challenges and Future Directions

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

9

Page 10: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

AfricaJohannesburg,

MinnesotaMinneapolis

CaliforniaCarlsbad

InternationalDomestic

AfricaJohannesburg,

MinnesotaMinneapolis

CaliforniaCarlsbad

InternationalDomestic

Rockwell Collins

Headquartered in Cedar Rapids, Iowa

South Africa AsiaBangkok, ThailandBeijing, ChinaHong KongKuala Lumpur, MalaysiaManila, h l

MissouriKansas CitySt. Louis New YorkNew York North CarolinaCharlotteRaleigh Oklahoma

d

CypressIrvineLos AngelesPomonaPowaySan FranciscoSan JoseTustin Florida

lb

South Africa AsiaBangkok, ThailandBeijing, ChinaHong KongKuala Lumpur, MalaysiaManila, h l

MissouriKansas CitySt. Louis New YorkNew York North CarolinaCharlotteRaleigh Oklahoma

d

CypressIrvineLos AngelesPomonaPowaySan FranciscoSan JoseTustin Florida

lb20,000 Employees Worldwide

2007 Sales of $4.42 Billion

PhilippinesMoscow, RussiaOsaka, JapanShanghai, ChinaSingaporeTokyo, Japan AustraliaAuckland, New ZealandB isbane

Midwest CityTulsa OregonPortland PennsylvaniaPhiladelphiaPittsburgh TexasDallasFo t Wo th

MelbourneMiami GeorgiaAtlantaWarner Robins HawaiiHonolulu IllinoisChicago IowaBelle e

PhilippinesMoscow, RussiaOsaka, JapanShanghai, ChinaSingaporeTokyo, Japan AustraliaAuckland, New ZealandB isbane

Midwest CityTulsa OregonPortland PennsylvaniaPhiladelphiaPittsburgh TexasDallasFo t Wo th

MelbourneMiami GeorgiaAtlantaWarner Robins HawaiiHonolulu IllinoisChicago IowaBelle e Brisbane,

AustraliaMelbourne, AustraliaSydney, Australia CanadaMontrealOttawa Europe

Fort WorthRichardson UtahSalt Lake City VirginiaSterling WashingtonKirklandRentonSeattle

BellevueCoralvilleDecorahManchester KansasWichita MarylandWhite Marsh MassachusettsBoston

Brisbane, AustraliaMelbourne, AustraliaSydney, Australia CanadaMontrealOttawa Europe

Fort WorthRichardson UtahSalt Lake City VirginiaSterling WashingtonKirklandRentonSeattle

BellevueCoralvilleDecorahManchester KansasWichita MarylandWhite Marsh MassachusettsBoston Europe

Amsterdam, NetherlandsFrankfurt, GermanyHeidelberg, GermanyLondon, EnglandLyon, FranceManchester,

Seattle Washington, DC

Boston MichiganAnn ArborDetroit

EuropeAmsterdam, NetherlandsFrankfurt, GermanyHeidelberg, GermanyLondon, EnglandLyon, FranceManchester,

Seattle Washington, DC

Boston MichiganAnn ArborDetroit

Manchester, EnglandParis, FranceReading, EnglandRome, ItalyToulouse, France MexicoMexicali South America

Manchester, EnglandParis, FranceReading, EnglandRome, ItalyToulouse, France MexicoMexicali South America

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

10

Santiago, ChileSao Jose dos Campos, BrazilSao Paulo, Brazil

Santiago, ChileSao Jose dos Campos, BrazilSao Paulo, Brazil

Page 11: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Rockwell Collins’ core business is based on

• Commercial/Military Avionics Systems

Rockwell Collins core business is based on the delivery of High Assurance Systems

• Commercial/Military Avionics Systems

• Communications

• Navigation & Landing Systems

• Flight Control

• Displays

• Weapon Data Links• Weapon Data Links

“Working together creating the most trusted source of i ti d i ti l t i l ti ”

“Working together creating the most trusted source of i ti d i ti l t i l ti ”

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

11

communication and aviation electronic solutions”communication and aviation electronic solutions”

Page 12: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Advanced Technology Center Automated Analysis Section

Identify, acquire, develop and transition value-driven technologies to support the continued growth of Rockwell Collins.

Technologists: 10Administrators: 1g

37% PhDBachelors

37%17%PhD

M t46%

Masters

Technologists: 173Administrators: 10T h i i 31

Applies mathematical tools and reasoning to the production of high

t

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

12

Technicians: 31 assurance systems.

Page 13: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

1994 1996 1998 2000 2002 2004 20061992 2008 2010

FGS ModeConfusion

NASA Aviation SafetyFormal Methods atRockwell Collins

FGS ModeConfusion

Confusion(RSML-e,

PVS)FGS Safety

Analysis(RSML-e, NuSMV)

ADGS 2100 (Simulink,NuSMV)

Rockwell Collins

AAMP5 MicrocodeVerification

(PVS)

AAMP-FVMicrocodeVerification

(PVS)

AAMP5Partitioning

(PVS)

ConfusionStudy(PVS)

NuSMV)

AFRL

CerTAFCS

(NuSMV, Prover)

MixedCriticality

Architectures( ) ( )

JEM JavaμProc(PVS)

FCP 2002Microcode

(ACL2) AAMP7

GreenhillsIntegrity

RTOS(ACL2)

)

GreenhillsIntegrity

Gen4(ACL2)

(ACL2) AAMP7Separation

Kernel(ACL2)l vFaat

(ACL2,PVS)

NSA

Turnstile Guardol(ACL2

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

13

SHADE(ACL2)

(SPARK) (ACL2,Prover)

Page 14: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Presentation OverviewPresentation Overview

What Problem are We Solving?

Who Are We?

What are Formal Methods?

Examples of Using Formal Methods

Challenges and Future Directions

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

14

Page 15: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

What are Formal Methods?

Mathematically-based techniques for the specification, development and verification of software and hardware systems.

• SpecificationTextual notations (Z B VDM CSP )

and verification of software and hardware systems.Wikipedia, 8 April 2008

– Textual notations (Z, B, VDM, CSP, …)– Tabular notations (Parnas Tables, SCR, RSML, …)– Graphical notations (SCADE, Simulink, Statecharts …)

• Development– Stepwise refinement with proofs of correctness– Model-Based Development– Automated code generation

• Verification– Lightweight static analysis

Theorem proving (ACL2 PVS HOL )

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

15

– Theorem proving (ACL2, PVS, HOL, …)– Model-checking (SMV, SAL, Prover, …)

Page 16: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Specification

node Thrust_Required(FG_Mode : FG_Mode_Type ; Airborne : bool ;

Textual (Z, VDM, PVS, Lustre, …) Tabular (RSML-e, SCR)

Airborne : bool ; In_Flare : bool ; Emergency_Descent : bool; Windshear_Warning : bool ; In_Eng_Accel_Zone : bool ; On_Ground : bool)

returns (IsTrue : bool) ;

let

IsTrue = (FG_Thrust_Mode(FG_Mode) and Airborne)

oror (Airborne and Emergency_Descent)

or Windshear_Warning

or ((FG_Mode = ThrottleRetard) and In Flare)

Graphical (SCADE, Simulink)

_ )or (In_Eng_Accel_Zone and On_Ground) ;

tel ;

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

16

Page 17: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Model-Based Development

Company Product Tools Specified & Autocoded Benefits Claimed Airbus A340 SCADE

With Code G t

• 70% Fly-by-wire Controls • 70% Automatic Flight Controls

• 20X Reduction in Errors • Reduced Time to Market

p

Generator • 50% Display Computer • 40% Warning & Maint Computer

Eurocopter EC-155/135 Autopilot

SCADE With Code Generator

• 90 % of Autopilot

• 50% Reduction in Cycle Time

GE & FADEDC Engine ADI Beacon • Not Stated • Reduction in ErrorsGE & Lockheed Martin

FADEDC Engine Controls

ADI Beacon • Not Stated

• Reduction in Errors • 50% Reduction in Cycle Time • Decreased Cost

Schneider Electric

Nuclear Power Plant Safety Control

SCADE With Code Generator

• 200,000 SLOC Auto Generated from 1,200 Design Views

• 8X Reduction in Errors while Complexity Increased 4x

US Spaceware

DCX Rocket MATRIXx • Not Stated

• 50-75% Reduction in Cost • Reduced Schedule & Risk

PSA Electrical Management System

SCADE With Code Generator

• 50% SLOC Auto Generated • 60% Reduction in Cycle Time • 5X Reduction in Errors

CSEE S b SCADE 80 000 C SLOC A t G t d I d P d ti it fCSEE Transport

Subway Signaling System

SCADEWith Code Generator

• 80,000 C SLOC Auto Generated • Improved Productivity from 20 to 300 SLOC/day

Honeywell Commercial Aviation

Primus Epic Flight Control System

MATLAB Simulink

• 60% Automatic Flight Controls • 5X Increase in Productivity • No Coding Errors • Received FAA Certification

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

17

Systems y Received FAA Certification

Page 18: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Verification - Rockwell Collins Translation FrameworkVerification Rockwell Collins Translation Framework

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

18

Page 19: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

T l O i i f S ifi A l i T l

CPU Time

Translators Optimize for Specific Analysis Tools

Model

C U e

(For NuSMV to Compute Reachable States)

Improvement

Before After

Mode1 > 2 hours 11 sec > 650x

Mode2 > 6 hours 169 sec > 125x

Mode3 > 2 hours 14 sec > 500x

Mode4 8 minutes < 1 sec 480x

Arch 34 sec < 1 sec 34x

WBS 29+ hours 1 sec 105,240x

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

19

Page 20: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Presentation OverviewPresentation Overview

What Problem are We Solving?

Who Are We?

What are Formal Methods?

Examples of Using Formal Methods

Challenges and Future Directions

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

20

Page 21: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

FCS 5000 Flight Control Mode Logic

Mode Controller A Modeled in Simulink

Translated to NuSMV

6.8 x 1021 Reachable States

Mode Controller B

Example RequirementM d A1 > M d B1

Counterexample Found inLess than Two Minutes

Mode A1 => Mode B1

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

21

Found 27 Errorsin Early Requirements Models

Page 22: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

ADGS-2100 Adaptive Display & Guidance Systemp p y y

Modeled in Simulink

Translated to NuSMV

4,295 Subsystems

16,117 Simulink Blocks

Over 1037 Reachable States

Example Requirement:Drive the Maximum Number of Display Units

Given the Available Graphics Processors

Counterexample Found in 5 Seconds

Checked 573 Properties -F d d C t d 98 E

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

22

Found and Corrected 98 Errors in Early Design Models

Page 23: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

AAMP7G Certified Microprocessor

• Rockwell Collins proprietary microprocessor

• Formal proof of the MILS security partitioning implemented in the AAMP7G microprocessorimplemented in the AAMP7G microprocessor

• Example of the industrial use of theorem proving using ACL2

• Developed formal description of separation for uniprocessor multipartition system (GWV)uniprocessor, multipartition system (GWV)

• Modeled trusted AAMP7G microcode in ACL2

• Constructed machine-checked proof of separation of the AAMP7G model using ACL2

• Model subject of intensive code-to-spec review with AAMP7G microcode

• Satisfied formal methods requirements for NSA AAMP7G certification awarded in May 2005

- “capable of simultaneously processing unclassified through Top Secret Codeword Information”

- “verified using Formal Methods techniques

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

23

- verified using Formal Methods techniques as specified by the EAL-7 level of the Common Criteria”

Page 24: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Greenhills Integrity-178B Real-Time OS Evaluation

• Formal proof of the MILS security partitioning implemented in the Integrity-178B Real-Time OS

K

P1

• Example of the industrial use of theorem proving using ACL2

• Generalized the formal description of separation to describe the more dynamic scheduling

K P2

P3to describe the more dynamic scheduling managed by the OS (GWVr2)

• Modeled in ACL2 the target-independent C code implementing the Integrity-178B kernel.

• Constructed machine-checked proof of separation for the Integrity-178B kernel

• Model, analysis approach and proofs subject to intensive multi-national review

• Satisfied US Government SKPP (EAL6+), as well as Common Criteria v2.3 EAL7 ADV requirements

– Final certification pending NSA penetration testing

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

24

Page 25: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Turnstile High Integrity Guard

• High-assurance cross domain platform that provides secure communication between different security classification domains ranging from top secret to unclassified.

Accreditable to DCID 6/3 PL-5.

• Core guard application is based on the NSA certified AAMP7G

OETOP OEGuardon the NSA certified AAMP7G.

• I/O processing is relegated to Offload Engines (OE) that do not have to be as highly trusted

SECRET

highly trusted.

• System integrator can add function to the OE without compromising the guard function. AAMP7G

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

25

• Certification based on ACL2 theorem prover

Page 26: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

CerTA FCS Phase I

• Sponsored by the Air Force Research Labs– Air Vehicles (RB) Directorate - Wright Patterson

I ti t R l f T ti d F l V ifi ti• Investigate Roles of Testing and Formal Verification– Can formal verification complement or replace some testing?

• Example Model – Lockheed Martin Adaptive UAV Flight Control SystemRedundancy Management Logic in the Operational Flight Program (OFP)– Redundancy Management Logic in the Operational Flight Program (OFP)

– Well suited for verification using the NuSMV model-checker

Lockheed Martin Aero Rockwell Collins

• Enhanced During CerTA FCS

• Based on Testing

– Graphical Viewer of Test Cases – Support for Simulink blocks• Enhanced During CerTA FCS

• Based on Model-Checking

p– Support for XML/XSLT Test Cases– Added C++ Oracle Framework

• Developed Tests from Requirements • Developed Properties from Requirements

pp– Support for Stateflow– Support for Prover model-checker

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

26

• Executed Tests Cases on Test Rig • Proved Properties using Model-Checking

WPAFB 08-5183 RBO-08685 8/20/2008

Page 27: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

CerTA FCS Phase I - OFP Redundancy Management Logic

For Each of Ten Control Surfaces

• Triplex Voter Input monitor sensor fusion and

[C]

[B]

[status_a]

[DSTi][MS]

[trigger]

[trigger]

[status b]

[status_a]

[A]

IndexVector

mon_failure_report

status_a

status b

Extract Bits[0 3]

Extract Bits

double

DST

Data StoreRead

5

status a

4

input_c

3

input_b

2

input_a

1

syncsync<> Failure Isolation

– Input monitor, sensor fusion, and failure isolation

• Failure Processing– Logs failures into a data store 2

persistence_cnt

1

failure_report

pc

input_a

input_b

input_c

trip_level

failreport

pc

trip_level

trip_level1

[DSTi]

[status_c]

[status_b]

[DSTi][A]

[prev_sel]

[trigger]

[status_c]

[status_b]

[A]

[C]

[B]

[C]

[B]

failure_report

dst_index

Failure_Processing

status_b

status_c

prev_sel

input_a

input_b

input_c

failure_report

Failure_Isolation

DOC

Text

8

dst_index

7

status_c

6

status_b

status_a

trip_level

persistence_cnt<pc>

failreport

Failure Processing• Reset Manager

– Reset logic for sensors and control surfaces (not shown)

S b t / Ch t / T th T bl R h bl

4

input_sel

3

totalizer_cnt

trigger

input_a

input_b

input_c

DST_index

input_sel

triplex_input_selector

persist_lim

MS

tc

triplex_input_monitor

persist_lim

persistence limit[A]

[trigger]

[MS]

[prev_sel][DSTi]

[C]

[B]

persist_lim

totalizer_cnt<tc>

Input Monitor

Processing

Sensor Fusion Subsystems /

Blocks Charts /

Transitions Truth Table

Cells Reachable

State Space Properties

Triplex voter 10 / 96 3 / 35 198 6.0 * 1013 48

Failure 4Failure processing 7 / 42 0 / 0 0 2.1 * 104 6

Reset manager 6 / 31 2 / 26 0 1.32 * 1011 8

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

27

Total 23 / 169 5 / 61 198 N/A 62

WPAFB 08-5183 RBO-08685 8/20/2008

Page 28: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

CerTA FCS Phase I -

70

Testing and Model Checking Recurring Costs

50

60

Cos

ts

Test: time to run the tests.

MC: running the tools, analyzing and e plaining

Test: time spent

Spent ~50% more time testing than model-checking.

30

40

l Rec

urrin

g C and explaining

counter-examples to LM Aero, and creating a revised model

fixing errors in test cases.

MC: time to repeat analysis.

model checking.

10

20

% T

otalTest: time

to write the tests

MC: time to it th

revised model.

0Preparation Initial Test Rework Grand Total

write the properties and set up the models for analysis

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

28

Testing Model-Checking

WPAFB 08-5183 RBO-08685 8/20/2008

Page 29: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

CerTA FCS Phase I – Errors Found

Errors Found in Redundancy ManagerModel Checking Testing

T i l V tErrors Found in Redundancy ManagerTriplex Voter

Failure Processing

Reset Manager

35

4

000Reset Manager

Total

412

00

• Model-Checking Found 12 Errors that Testing Missed

• Spent More Time on Testing than Model-Checking– 60% of total on testing vs. 40% on model-checking

Model-checking was more cost effectiveth t ti t fi di d i

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

29

than testing at finding design errors.

WPAFB 08-5183 RBO-08685 8/20/2008

Page 30: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

CerTA FCS Phase II

• Sponsored by the Air Force Research Labs– Air Vehicles (RB) Directorate - Wright Patterson

• Can Model-Checking be Used on Infinite State Systems?• Can Model-Checking be Used on Infinite State Systems?– Large, numerically intensive, non-linear systems

• Example Model– Lockheed Martin Adaptive UAV

Flight Control System– Effector Blender (EB) – Generates actuator commands

fo ai c aft cont ol s facesfor aircraft control surfaces– Matrix arithmetic of floating

point numbers

• Challenges– Identifying the right properties to verify– Verification of floating point numbers

Verification of Stateflow flowcharts with cyclic transition paths

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

30

– Verification of Stateflow flowcharts with cyclic transition paths– Compositional verification to scale to entire Effector Blender

WPAFB 08-5183 RBO-08685 8/20/2008

Page 31: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

CerTA FCS Phase II – Effector Blender

• Generates Actuator Commands– Six control surfaces– Adapts its behavior as aircraft 1Effector

Bl d

4

3

2

1

Adapts its behavior as aircraft state changes

– Iterative algorithm that repeatedly manipulates a 3 x 6 matrix of floating point numbers

f l f i l il

Blender

10

9

8

7

6

5

• Large Complex Model– Inputs

• 32 floating point inputs3 6 t i f fl ti i t l

Surf1 left vertical tailsurf2 right vertical tailsurf3 left flapsurf4 right flapsurf5 left outboard spoilersurf6 right outboard spoiler23

22

21

20

19

18

• 3 x 6 matrix of floating point values

– Outputs• 1 x 6 vector of floating point values

– 166 Simulink subsystems2000+ basic Simulink blocks

surf6 right outboard spoiler

28

27

26

25

24

– 2000+ basic Simulink blocks– Huge reachable state space

• Completely Functional– No internal state

Control EffectorArrangement

Spoilers (L&R)

Flaps (L&R)

29

15

14

13

12

11

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

31

– No internal state Spoilers (L&R)

V-Tail Rudders (L&R)17

16

WPAFB 08-5183 RBO-08685 8/20/2008

Page 32: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

CerTA FCS Phase II – What to Verify?

• No Explicit Requirements for the Effector Blender Model– Requirements defined for Effector Blender + aircraft model– Addition of aircraft model pushes verification beyond current tools

y

Addition of aircraft model pushes verification beyond current tools

• Avoid Properties Verifiable by Other Means– Control theory – stability, tracking performance, feedback design …– Simulation – design validationg– Implementation – code generation/compilation, scheduling, …

• Focus on the Consistency of the Effector Blender Model– Relationships the model should always maintain– Partial requirements specification

• Preservation of Control Surface Limits– EB computes upper and lower limits for each control surface command– Function of aircraft design, aircraft state, and max extension per cycle– Commanded extension should always be between these limits

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

32WPAFB 08-5183 RBO-08685 8/20/2008

Page 33: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

CerTA FCS Phase II – Verification of Floating Point Numbers

• Floating Point Numbers– Fixed number of bits with a movable decimal (radix) point– No decision procedures for floating point numbers availableNo decision procedures for floating point numbers available

• Real Numbers– Real numbers have unbounded size and precision– Would hide errors caused by limitations of floating point arithmeticy g p– Control theory problems are inherently non-linear– Decision procedures for non-linear real numbers have exponential cost

• Solution - Translate Floating Point Numbers into Fixed Point– Extended translation framework to automate this translation– Convert floating point to fixed point (scaling provided by user)– Convert fixed point into integers (use bit shifting to preserve magnitude)– Shift from NuSMV (BDD-based) to Prover (SMT-solver) model checker( ) ( )

• Advantages & Issues– Use bit-level integer decision procedures for model checking– Results unsound due to loss of precision

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

33

– Highly likely to find errors – very valuable tool for debugging

WPAFB 08-5183 RBO-08685 8/20/2008

Page 34: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

CerTA FCS Phase II – Verification of Stateflow Flowcharts

• Stateflow Flowcharts– No explicit stateso e p c t states– Stateflow junctions– Cyclic paths– Transitions modify local

state variablesstate variables– Imperative programming

• Solution– Extend translator to

support flowcharts– Require a parameter that

specifies the maximum i l ill btimes any cycle will be

executed

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

34WPAFB 08-5183 RBO-08685 8/20/2008

Page 35: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

CerTA FCS Phase II – Compositional Verification

Typical Specification– Models are typically organized in a hierarchy of subsystems– Subsystems are often nested several levels deep– Most of the complexity is in the leaf subsystems– Leaf subsystems can often be verified through model checking

Composition of Subsystems

1Out1

1In1

In_B1

In_B2Out_BIn_A1

Out_A

P2 & P3 -> Q1

Q2

P1 & Q1 -> Q2

Q1

p y– Tends to be simple– Lends itself well to theorem proving

P2 & P3 => Q1 P1 & P2 & P3 => Q=>

Q

P1

P2 & P3 Out12

In2Subsystem BIn_A2

_

Subsystem A

Q1 P1 & Q1 => Q2P1 & P2 & P3 Q

Issues– Need to avoid circular reasoning to ensure soundness

– Can be ensured by eliminating cyclic dependencies between atomic subsystems

– Identifying the right leaf level invariants to support composition

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

35

– Complexity of the proof obligations for the intermediate levels

– Lack of a unified automated verification system

WPAFB 08-5183 RBO-08685 8/20/2008

Page 36: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

CerTA FCS Phase II - Results

• Can Model-Checking be Used on Infinite State Systems?– Large, numerically intensive, non-linear systems

Eff t Bl d• Effector Blender– Inputs

• 32 floating point inputs• 3 x 6 matrix of floating point values

O tp ts– Outputs• 1 x 6 vector of floating point values

– 166 Simulink subsystems– 2000+ basic Simulink blocks

• Errors Found– Five previously unknown errors that would drive actuators past their limits– Several implementation errors were being masked by defensive programming

• Areas for Future Research– Decision procedures for floating point arithmetic– Interval arithmetic

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

36

– Automation for compositional verification

WPAFB 08-5183 RBO-08685 8/20/2008

Page 37: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Presentation OverviewPresentation Overview

What Problem are We Solving?

Who Are We?

What are Formal Methods?

Examples of Using Formal Methods

Challenges and Future Directions

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

37

Page 38: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Extending the Verification Domain

Theorem Provers

g

• Theorem Provers– Deal with arbitrary models– Concerns are ease of use and labor cost

Non Linear Arithmetic

Floating Point

• Large Finite Systems (<10200 States)– Implicit state (BDD) model checkers– Easy to use and very effective

• Very Large or Infinite State Systems– SMT-Solvers– Large integers and reals– Limited to linear arithmetic

SMT-Solvers

Implicit State

< 10 200 Reachable StatesModel Checkers

Decision Procedures

Limited to linear arithmetic– Ease of use is a concern

Infinite State Modelsusing k-Induction

< 10 Reachable States

• Floating Point Arithmetic– Most modeling languages use floating

point (not real) numbers

Arbitrary ModelsLabor Intensive

Transcendental Functions

• Non-Linear Arithmetic– Multiplication/division of real variables

Transcendental f nctions (trigonometric )

point (not real) numbers– Decision procedures

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

38

– Transcendental functions (trigonometric, …)– Essential to navigation systems

Page 39: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Compositional Verification

Typical Model-Based Specification– Models are organized in a hierarchy of subsystems several levels deep– Most of the complexity is in the leaf models– Leaf models can often be verified through model checking

1In1 P2 & P3 > Q1

P1 & Q1 -> Q2 Composition of SubsystemsQ

P1

1Out1

In1

2In2

In_B1

In_B2Out_B

Subsystem B

In_A1

In_A2Out_A

Subsystem A

P2 & P3 -> Q1

Q2Q1

– Tends to be simple– Well suited for theorem proving

P2 & P3 => Q1P1 & Q1 => Q2

P1 & P2 & P3 => Q=>

Q

P2 & P3

P1 & Q1 => Q2

Issues– Lack of a unified automated verification system

• Use model-checking to verify leaf models and theorem proving for composition

– Avoid circular reasoning to ensure soundness

• Can be ensured by eliminating cyclic dependencies between atomic subsystems

Identifying the right leaf level invariants to support composition

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

39

– Identifying the right leaf level invariants to support composition

– Complexity of the proof obligations for the intermediate levels

WPAFB 08-5183 RBO-08685 8/20/2008

Page 40: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

System Architectural Modeling & AnalysisSystem Architectural Modeling & Analysis

SimulinkModel

VAPSModel

Level BClassified Level C

Unclassified

mplements So

Common Computing Resource 3

IMA CabinetSystemArchitecture

M d l

CCode

AdaCode

CCode

Level ATop Secret

Imp

Abstr

acts

oftware C

o

S S ifi Middl

App A App B App C

Common Computing Resource 1

Common Computing Resource 2

Common Computing Resource 3Performance

Analysis

Model

A t

Logical

A

omponent

Target Hardware

Separation Kernel

Reusable Trusted Middleware(RTOS, I/O , RT-CORBA)

Sys Specific Middleware(Schedule, Communication Routes)

SafetySecurity

ADL AutoGenerate

Developm

e

IMA BUS

SafetyAnalysis

SecurityAnalysis

Physical

ent

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

40

System Architecture Development

Page 41: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

Conclusions

• Formal Methods Are Practical and Are Being Widely Used– Model Based Development is the industrial face of formal methods

– The engineers get to pick the modeling tools!

– Semantics of some of the commercial tools could be improved

Formal Verification Tools Are Being Used in Industry• Formal Verification Tools Are Being Used in Industry– Key is to verify the models the engineers are already building

– Large portions of existing systems can be verified with model checkers

– Model checkers are only going to get betterModel checkers are only going to get better

– Theorem proving can be used on stable industrial systems

• Directions for the Future Work– Making verification tools more powerful and easier to use

– Addressing scalability through compositional verification

– Integration of theorem proving and model checking

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

41

– Modeling and analysis of system architectural models

Page 42: Will This Be Formal? - Concordia Universityusers.encs.concordia.ca/.../TPHOLs2008/WillThisbeFormal.pdfK P1 • Example of the industrial use of theorem proving using ACL2 • Generalized

For More Information

http://shemesh.larc.nasa.gov/fm/fm-collins-intro.html

• Whalen, M., Cofer, D., Miller, S., Krogh, B., Storm, W.: Integration of Formal Analysis into a Model-Based Software Development Process. In 12th International Workshop on Formal Methods for Industrial Critical Systems (FMICS2007), Berlin, Germany (2007).

• Whalen, M., Innis, J., Miller, S., Wagner, L.: ADGS-2100 Adaptive Display & Guidance System Window Manager Analysis, CR-2006-213952, NASA (2006).

• Miller, S., Tribble, A., Whalen, M., Heimdahl, M., Proving the Shalls, International Journal on Software Tools for Technology Transfer (STTT), Feb 2006.

• Miller, S., Anderson, E., Wagner, L., Whalen, M., Heimdahl, M.: Formal Verification of Flight Critical Software. In AIAA Guidance, Navigation and Control Conference and Exhibit AIAA 2005 6431 American Institute of Aeronautics and Astronautics (2005) Exhibit, AIAA-2005-6431, American Institute of Aeronautics and Astronautics (2005).

• Greve, D., Wilding, M., Vanfleet, W. M.: A Separation Kernel Formal Security Policy. In Fourth International Workshop on the ACL2 Prover and Its Applications (ACL2-2003) (2003).

• Greve, D., Richards, R., Wilding, M.: A Summary of Intrinsic Partitioning Verification. In Fifth I t ti l W k h th ACL2 P d It A li ti (ACL2 2004) Fifth International Workshop on the ACL2 Prover and Its Applications (ACL2-2004) (2004).

• Greve, D., Wilding, M., Richards, R., Vanfleet, W. M.: Formalizing Security Policies for Dynamic and Distributed Systems. In Systems and Software Technology Conference (SSTC 2005), Utah State University, (2005).

© Copyright 2008 Rockwell Collins, Inc. All rights reserved.

42