the use of formal methods on the ifacts air traffic control project

30

Upload: adacore

Post on 10-May-2015

3.671 views

Category:

Technology


0 download

DESCRIPTION

The next talk in our series from the recent Open-DO Conference is from Neil White,Principal Engineer with Altran Praxis. His talk provides an overview of the formal methods used on the iFACTS project. iFACTS is delivering increased Air Traffic Control capability to the UK.

TRANSCRIPT

Page 1: The Use of Formal Methods on the iFACTS Air Traffic Control Project
Page 2: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Formal Methods in Air Traffic Control

Neil White

Open-DO

Page 3: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Agenda

• A quick introduction– What is iFACTS?

• Formal methods for Specification– Z, State machines.

• Formal methods for Implementation– Implementation: SPARK.

• Formal methods for Test– Verification: more Z, Mathematica.

Page 4: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Context

• NATS, the UK’s leading air traffic services provider, has pioneered research and development of advanced air traffic control tools for several years from its simulator and research centre.  The iFACTS project will deliver a subset of these tools onto the system at the company’s main en-route Control Centre at Swanwick. 

• Further information is available at: www.nats.co.uk/article/218/62/nats_pioneers_biggest_atc_advance_since_radar.html

Page 5: The Use of Formal Methods on the iFACTS Air Traffic Control Project

UK Air Traffic Control

Copyright © Altran Praxis limited 2010

Page 6: The Use of Formal Methods on the iFACTS Air Traffic Control Project

– The Notes of this slide and the previous slide give some guidance on style and usage.

Copyright © Altran Praxis limited 2010

Page 7: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Why iFACTS?

• iFACTS – Interim Future Area Control Tools Support – will further improve safety and provide Controllers with a set of advanced support tools, which will  enable them to increase the amount of traffic they can comfortably handle.  In trials, the system has delivered significant capacity increases.

Page 8: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

What is iFACTS?

• iFACTS provides tools to support the controllers– Electronic flight strips replace the paper

flight strips.– Trajectory tools - including prediction,

deviation alerts, and conflict detection – are added.

• iFACTS is not an Air Traffic control system– Integrated with, but sits alongside, the

existing system.

Page 9: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Medium Term Conflict Detection:Separation Monitor

Separation Monitor

Cancel Alert Lines LabelsGreenSeparation (NM)

0

5

10

15

Time to Interaction (mins)0 155 10

SAS123BAW43BE

DLH4695AMM1077

AZA292BAL547

BAW028ANZ001

UAL2SAA321

BAW225UAL3

Copyright © Altran Praxis limited 2010

Page 10: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Agenda

• A quick introduction– What is iFACTS?

• Formal methods for Specification– Z, State machines.

• Formal methods for Implementation– Implementation: SPARK.

• Formal methods for Test– Verification: more Z, Mathematica.

Page 11: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

The complete iFACTS specification• The functional specification

– Z

• The algorithm specification– Maths

• The HMI specification– State tables

• The rest of the specification!– English

Page 12: The Use of Formal Methods on the iFACTS Air Traffic Control Project

The Z specification

Page 13: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Z training

• Z reader training– 3 day course; fluency then comes after 1

week on the job.– We have trained 75 people to read Z.– Engineers, domain experts, ATCOs.

• Z writer training– 3 day course, fluency then comes after 3

months on the job.– We have trained 11 people to write Z.– All engineers.

Page 14: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Z tools

• Z written in Microsoft Word– To get acceptance, you need to work with

what people know.– Supported by Word Add-ins.

• A Z character set.• A simple interface to the fuzz type

checker.• A graphical representation tool.

Page 15: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Z tools

• Advantages– Easy to develop commentary and Z

together.– Hyper linking of fuzz errors back to source.– Cross-referencing of Z names in final

document.

• Disadvantages– All the problems of large word documents.– Tools can be slow on 1000 page documents.– Merging branches is painful.

• The Future– Open Office XML?

Page 16: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

The state machine specification

Button 1 Checkbox 1

State 1 State 2 N/AState 2 State 1 State 3State 3 State 1 State 2

Transition ActionsState 1 -> State 2 : De-select Checkbox 1

Page 17: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

State machine training & tools• Training

– So trivial that we don’t train!– People “just get it”.

• Tools– Err …. None.

Page 18: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Agenda

• A quick introduction– What is iFACTS?

• Formal methods for Specification– Z, State machines.

• Formal methods for Implementation– Implementation: SPARK.

• Formal methods for Test– Verification: more Z, Mathematica.

Page 19: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

The SPARK Implementation

• SPARK Ada– An annotated subset of Ada.

• 150 KSLOC (Logical)• RTE Proof

– Formal partial correctness proof against specification not considered cost-effective.

Page 20: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Code

Page 21: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

SPARK Training

• 57 people trained in SPARK– Mostly contractors and clients.– Diverse programming background.– All SPARK coders are also Z readers.

• Effective as SPARK coders immediately• Picking up RTE proof takes longer.

– About 2 months.

• How long to pick up formal correctness proofs?– No data, but I suspect longer again.

Page 22: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

SPARK Tools

• The SPARK toolset– Examiner.– Proof Simplifier.– Proof Checker.

• See me later!

Page 23: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Agenda

• A quick introduction– What is iFACTS?

• Formal methods for Specification– Z, State machines.

• Formal methods for Implementation– Implementation: SPARK.

• Formal methods for Test– Verification: more Z, Mathematica.

Page 24: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Test Design

Page 25: The Use of Formal Methods on the iFACTS Air Traffic Control Project

The Challenge of Test Design

How many potential tests for this fragment?

Page 26: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

The Challenge of Test Design• If you just turn the handle there are

1134 conditions to test.• But if you work at it hard enough you

can cover the required subset in just 6 test scripts.

• Formal methods are not a substitute for initiative.

Page 27: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Test reference models

• Algorithms are specified in pure mathematics.– Working out the expected answer for test

cases is very difficult and error prone.

• We generate test cases as usual.• We create a test reference

implementation in Mathematica.• We do back-to-back testing of iFACTS

against the reference.– Diverse tools and implementers reduce

the possibility of a common failure.

Page 28: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Mathematica tools & training• Small team – only 5 trained.• Reference model has similar defect

density to SPARK implementation.• Limited conclusions to draw from such a

small activity.

Page 29: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Conclusions

• Formal methods are applicable to all phases of the lifecycle.

• Training engineers is not a barrier– It’s a one-off cost– Our data shows that training is easy and

cheap.

• Tool support is vital– The Achilles heel of formal methods

• Except the SPARK Examiner!

Page 30: The Use of Formal Methods on the iFACTS Air Traffic Control Project

Copyright © Altran Praxis

Altran Praxis Limited20 Manvers StreetBath BA1 1PXUnited KingdomTelephone: +44 (0) 1225 466991Facsimile: +44 (0) 1225 469006Website: www.altran-praxis.com

Email: [email protected]