SlideShare a Scribd company logo
The Industrial Use of Formal Methods:
     Experiences of an Optimist

     Prof. Jonathan P. Bowen
      London South Bank University
         University of Westminster
           Museophile Limited
            www.jpbowen.com
       jonathan.bowen@lsbu.ac.uk
Experiences of an Optimist




http://en.wikipedia.org/wiki/John_Redcliffe-Maud
Background: Safety and reliability
Airbus A380
 simulator




Emirates Aviation College
Dubai, 3 February 2011
Theory and Practice

“It has long been my personal view that the
separation of practical and theoretical work is
artificial and injurious. Much of the practical work
done in computing, both in software and in hardware
design, is unsound and clumsy because the
people who do it have not any clear understanding
of the fundamental design principles of their work.
Most of the abstract mathematical and theoretical
work is sterile because it has no point of contact
with real computing.”
                 — Christopher Strachey (1916-1975)
Formal Methods

• Term established by late 1970s
  – Next stage from structured design
  – Mathematical basis
• Formal specification and (optionally) proof:
  – Validation (correct specification)
  – Verification (correct implementation wrt spec)
• But engineers calculate rather than prove
• Please contribute to the Formal Methods Wiki:
  – http://formalmethods.wikia.com
Z notation
• Formal specification – predicate logic, set
  theory, and schema boxes
  – Courses (academia & industry)

  – Textbooks (reasonable choice)

  – Tools (type-checkers, provers, …)

• Web resources – www.zuser.org

• Google group – comp.specification.z

• Z User Group (meetings) & Z standard
Z Standard

• ISO/IEC 13568
  – Long process (1990s)
  – Inconsistencies found!

• Final Committee Draft
  – accepted in 2001
• Useful for tools and
  industrial application
Levels of Complexity – Abstraction


• 25 lines of informal requirements
• 250 lines of specification (e.g., Z)
• 2,500 lines of design description
• 25,000 lines of high-level program code
• 250,000 machine instructions of object code
• 2,500,000 CMOS transistors in hardware!
Technology
transfer
problems
Choosing a formal method – difficult
Tools –
difficult
to use
Applications of Formal Methods
          Examples:
          • Tektronix (Z)
          • STV algorithm (VDM)
          • IBM CICS (Z/B)
          • AAMP5 microproc. (PVS)
          • GEC Alsthom (B)
          • A300/340 (Z)
Industrial-Strength Formal Methods in Practice
                    Examples:
                    • Motorola CAP DSP
                      (ACL2)
                    • Radiation Therapy
                      Machine (Z)
                    • ATC system (VDM)
                    • Railways (Prover
                      Technology)
                    And more recently:
                     Microsoft
National Air Traffic Services

• Handled 2.2 million flights (in 2009), covering
  the UK and eastern North Atlantic.
• And carried more than 200 million passengers
  safely through some of the busiest and most
  complex airspace in the world.
• Provides air traffic control from its centres at
  Swanwick, Hampshire and Prestwick, Ayrshire.
• Also provides air traffic control services at 15 of the UK's
  major airports including Heathrow, Gatwick, Stansted,
  Birmingham, Manchester, Edinburgh, and Glasgow,
  together with air traffic services at Gibraltar Airport.
National Air Traffic Services, UK




                     Swanwick
                  southern England

       www.nats.co.uk
Flight strips
  on paper




        Last flight of Concorde
European airspace
Source: Wikipedia

London:
England
& Wales
National Air Traffic Services

• Advertisement & leaflet at
  Heathrow Airport 
• Air Traffic Management
  (ATM)
• Single European Sky
  ATM Research (SESAR)
• SESAR Joint Undertaking
• www.sesarju.eu
• SESAR project (2004–20)
Altran Praxis




          www.altran-praxis.com
Open-DO




    Formal Methods in Air Traffic Control


                                    Slides by Neil White



    www.slideshare.net/AdaCore/white-open-do
    www.youtube.com/watch?v=IQMWVqQfm5A
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.

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.computerweekly.com/Articles/2007/03/07/222258/Nats-
      claims-the-biggest-air-traffic-control-innovation-since.htm




Copyright © Altran Praxis
UK Air Traffic Control




Copyright © Altran Praxis limited 2010
ATC team

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




            Planner                           Tactical                    Assistant
            (in/out)                           (controller)               (flight strips)
Copyright © Altran Praxis limited 2010
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.




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.




Copyright © Altran Praxis
Medium Term Conflict Detection:
Separation Monitor
                                                  Separation Monitor
                  Separation (NM)          Cancel Alert           Green        Lines      Labels
                   15

                                                                          BAW225
                                                                          UAL3


                                                       UAL2
                    10                                 SAA321

                                         BAW028
                                         ANZ001
                                                                 AZA292
                                                                 BAL547
                                                                                DLH4695
                                                                                AMM1077
                     5
                                               SAS123
                                               BAW43BE




                      0

                          0                       5                      10                   15
                                                  Time to Interaction (mins)

Copyright © Altran Praxis limited 2010
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.

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




Copyright © Altran Praxis
The Z specification
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.

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.




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?

Copyright © Altran Praxis
The state machine specification

                            Button 1   Checkbox 1

State 1                     State 2    N/A
State 2                     State 1    State 3
State 3                     State 1    State 2

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



Copyright © Altran Praxis
State machine training & tools

• Training
        – So trivial that we don’t train!
        – People “just get it”.
• Tools
        – Err …. None.




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.

Copyright © Altran Praxis
The SPARK Implementation

• SPARK Ada
        – An annotated subset of Ada.
• 150 KSLOC (Logical)
• RTE (Run-Time Exception) Proof
        – Formal partial correctness proof against
          specification not considered cost-effective.




Copyright © Altran Praxis
Code
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.


Copyright © Altran Praxis
SPARK Tools

• The SPARK toolset
        – Examiner.
        – Proof Simplifier.
        – Proof Checker.
• See me later!




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.

Copyright © Altran Praxis
Test Design
The Challenge of Test Design




           How many potential tests for this fragment?
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.




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.

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.




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!

Copyright © Altran Praxis
Altran Praxis



Altran Praxis Limited
20 Manvers Street
Bath BA1 1PX
United Kingdom
Telephone: +44 (0) 1225 466991
Facsimile: +44 (0) 1225 469006
Website: www.altran-praxis.com

Email: neil.white@altran-praxis.com




Copyright © Altran Praxis
Tracing
• Completeness of coverage
  – e.g., testing all parts of a Z specification
• DOORS tool
  – Integrate Systems Engineering
• Link all specification components with test
  case(s) or argument for safety case
• Flag unlinked components
• Also visualization of schema structure
www.integrate.biz/casestudies/BusinessGoalAlignment.aspx
Future
• Traffic Load Prediction Device (TLPD)
• Forecast air traffic load up to 4 hours ahead
• Plan workloads for optimum traffic flows
www.altran-praxis.com/news/nats_control_system_21_Sep_10.aspxx
Reflection

 Oui, l'ouvre sort plus belle
 D'une forme au travail
 Rebelle,
 Vers, marbre, onyx, émail.

 [Yes, the work comes out more beautiful from a
  material that resists the process, verse, marble,
  onyx, or enamel.]
          — Théophile Gautier (1811–1872) L'Art
Beware
Panaceas!




 Cf. Formal
  methods
Caviat
Emptor!

Cf. Software
The Industrial Use of Formal Methods:
     Experiences of an Optimist

     Prof. Jonathan P. Bowen
      London South Bank University
         University of Westminster
           Museophile Limited
            www.jpbowen.com
       jonathan.bowen@lsbu.ac.uk

More Related Content

PPT
The Use of Formal Methods on the iFACTS Air Traffic Control Project
AdaCore
 
PDF
An integrative solution towards SOTIF and AV safety
Bernhard Kaiser
 
PPT
Augmented Reality Testing Future Technology At Our Help! Iqnite 2010
aandelkovic
 
PDF
Verification and Validation of Robotic Assistants
AdaCore
 
PPT
ICIC2015_327
Natasha Jeppu
 
PDF
Experiences
Joydev Jana
 
DOC
Controlling interests editors
eldhoev
 
PDF
EMPhASIS - Work Organisation
NECST Lab @ Politecnico di Milano
 
The Use of Formal Methods on the iFACTS Air Traffic Control Project
AdaCore
 
An integrative solution towards SOTIF and AV safety
Bernhard Kaiser
 
Augmented Reality Testing Future Technology At Our Help! Iqnite 2010
aandelkovic
 
Verification and Validation of Robotic Assistants
AdaCore
 
ICIC2015_327
Natasha Jeppu
 
Experiences
Joydev Jana
 
Controlling interests editors
eldhoev
 
EMPhASIS - Work Organisation
NECST Lab @ Politecnico di Milano
 

What's hot (20)

PPTX
19 Jun 2018 - Hazard Analysis and Functional Safety Compliance
Intland Software GmbH
 
PPTX
SEooC ISO 26262 | What is Safety Element Out of Context in Automotive Functio...
Embitel Technologies - A VOLKSWAGEN GROUP COMPANY
 
PDF
Breakthrough in Quality Management
OptimalPlus
 
PDF
ITC 2015 - Marvell Present : "Improving Quality and Yield Through Optimal+ Bi...
OptimalPlus
 
PPTX
Optimal+ GSA 2014
OptimalPlus
 
PPTX
Part 5 of 6 - Implementation Phase - Safety Lifecycle Seminar - Emerson Excha...
Mike Boudreaux
 
PDF
HIS 2015: Neil White - Advances in Practical Techniques for Critical Developm...
AdaCore
 
PDF
Code Management Workshop
Sameh El-Ashry
 
PDF
Leveraging Cross-Operational Test Data for Manufacturing Yield and DPPM/RMA I...
OptimalPlus
 
DOCX
Resume New
Shajee Jeyaraj
 
PDF
PyData Paris - Track 4.2 Vincent Feuillard
Pôle Systematic Paris-Region
 
PDF
1330 anderson
Rising Media, Inc.
 
PDF
An Alternative Approach to DO-178B
AdaCore
 
PDF
Bosch ConnectedWorld 2017: Striving for Zero DPPM
David Park
 
PDF
AMD at ITC 2014
OptimalPlus
 
PDF
Increasing Efficiency of ISO 26262 Verification and Validation by Combining F...
RAKESH RANA
 
DOCX
shuja's cv for Instrumentation, DCS and Power plant.
Shuja Khalid
 
PDF
Practical Application of Agile Techniques in Developing Safety Related Systems
AdaCore
 
DOCX
Gunasekhar Karnatham_Profile_Continental
Gunasekhar Karnatham
 
PDF
Digital Design With Systemc (with notes)
Marc Engels
 
19 Jun 2018 - Hazard Analysis and Functional Safety Compliance
Intland Software GmbH
 
SEooC ISO 26262 | What is Safety Element Out of Context in Automotive Functio...
Embitel Technologies - A VOLKSWAGEN GROUP COMPANY
 
Breakthrough in Quality Management
OptimalPlus
 
ITC 2015 - Marvell Present : "Improving Quality and Yield Through Optimal+ Bi...
OptimalPlus
 
Optimal+ GSA 2014
OptimalPlus
 
Part 5 of 6 - Implementation Phase - Safety Lifecycle Seminar - Emerson Excha...
Mike Boudreaux
 
HIS 2015: Neil White - Advances in Practical Techniques for Critical Developm...
AdaCore
 
Code Management Workshop
Sameh El-Ashry
 
Leveraging Cross-Operational Test Data for Manufacturing Yield and DPPM/RMA I...
OptimalPlus
 
Resume New
Shajee Jeyaraj
 
PyData Paris - Track 4.2 Vincent Feuillard
Pôle Systematic Paris-Region
 
1330 anderson
Rising Media, Inc.
 
An Alternative Approach to DO-178B
AdaCore
 
Bosch ConnectedWorld 2017: Striving for Zero DPPM
David Park
 
AMD at ITC 2014
OptimalPlus
 
Increasing Efficiency of ISO 26262 Verification and Validation by Combining F...
RAKESH RANA
 
shuja's cv for Instrumentation, DCS and Power plant.
Shuja Khalid
 
Practical Application of Agile Techniques in Developing Safety Related Systems
AdaCore
 
Gunasekhar Karnatham_Profile_Continental
Gunasekhar Karnatham
 
Digital Design With Systemc (with notes)
Marc Engels
 
Ad

Viewers also liked (13)

PPS
Formal Methods
HendMuhammad
 
PPTX
#1 formal methods – introduction for software engineering
Sharif Omar Salem
 
PPT
Formal Specification in Software Engineering SE9
koolkampus
 
PDF
The Brooklyn Visual Heritage Website: Brooklyn’s Museums and Libraries Collab...
Jonathan Bowen
 
PDF
Online Academic Tools for Engagement
Jonathan Bowen
 
PDF
Visibility and visualisation of scholarly publications online: Erdős and beyond
Jonathan Bowen
 
PPT
Ch10
phanleson
 
PPTX
Formal methods 1 - introduction
Vlad Patryshev
 
PDF
Using formal methods in Industrial Software Development
Robert van Lieshout
 
PPTX
Formal Methods lecture 01
Sidra Ashraf
 
PDF
Formal methods 4 - Z notation
Vlad Patryshev
 
PDF
The Importance of System Software
IBM India Smarter Computing
 
PPTX
Software quality
Sara Mehmood
 
Formal Methods
HendMuhammad
 
#1 formal methods – introduction for software engineering
Sharif Omar Salem
 
Formal Specification in Software Engineering SE9
koolkampus
 
The Brooklyn Visual Heritage Website: Brooklyn’s Museums and Libraries Collab...
Jonathan Bowen
 
Online Academic Tools for Engagement
Jonathan Bowen
 
Visibility and visualisation of scholarly publications online: Erdős and beyond
Jonathan Bowen
 
Ch10
phanleson
 
Formal methods 1 - introduction
Vlad Patryshev
 
Using formal methods in Industrial Software Development
Robert van Lieshout
 
Formal Methods lecture 01
Sidra Ashraf
 
Formal methods 4 - Z notation
Vlad Patryshev
 
The Importance of System Software
IBM India Smarter Computing
 
Software quality
Sara Mehmood
 
Ad

Similar to Industrial use of formal methods (20)

PDF
What is field bus
victorshalom
 
PDF
IRJET- FPGA Implementation of an Improved Watchdog Timer for Safety-Critical ...
IRJET Journal
 
PDF
Eng Ibrahim Omar
ibrahim omar
 
PDF
GE_Bently_Nevada_3500_42_Manual_20171113133924.pdf
NelioMelendez1
 
DOC
Resume
vasanth TP
 
PPTX
Arizona State University Test Lecture
Pete Sarson, PH.D
 
PPTX
High-Tech Printed Circuit Boards Overview
Epec Engineered Technologies
 
PDF
Cisco: Care and Feeding of Smart Licensing
daxtindavon
 
PDF
Introduction to TTCN-3 and AUTOSAR Conformance Testing
Oak Systems
 
PDF
Practical Medium and High voltage Testing of Electrical Equipment for Enginee...
kfwbwps3207
 
PDF
Practical Medium and High voltage Testing of Electrical Equipment for Enginee...
rhazalafnane86
 
PDF
Manual licor 6200 condensado
Ignacio Delfino Yurin
 
PDF
Aircraft Finite Element Modelling for structure analysis using Altair Products
Altair
 
PPT
Soc.pptx
Jagu Mounica
 
PPTX
Industrial automation - Sensors and Transducers
RamaniIA
 
PDF
itu-t recommendation g671, g703
FrankNguyen48
 
PDF
Future Onshore Wind Energy Technology
Philip Totaro
 
PDF
AFL Fiber Optic Test and Inspection Solutions 2017
Christian Kraemer
 
PDF
ETAP - Arc flash analysis etap
Himmelstern
 
PDF
ETAP - Arc flash analysis done Right
Himmelstern
 
What is field bus
victorshalom
 
IRJET- FPGA Implementation of an Improved Watchdog Timer for Safety-Critical ...
IRJET Journal
 
Eng Ibrahim Omar
ibrahim omar
 
GE_Bently_Nevada_3500_42_Manual_20171113133924.pdf
NelioMelendez1
 
Resume
vasanth TP
 
Arizona State University Test Lecture
Pete Sarson, PH.D
 
High-Tech Printed Circuit Boards Overview
Epec Engineered Technologies
 
Cisco: Care and Feeding of Smart Licensing
daxtindavon
 
Introduction to TTCN-3 and AUTOSAR Conformance Testing
Oak Systems
 
Practical Medium and High voltage Testing of Electrical Equipment for Enginee...
kfwbwps3207
 
Practical Medium and High voltage Testing of Electrical Equipment for Enginee...
rhazalafnane86
 
Manual licor 6200 condensado
Ignacio Delfino Yurin
 
Aircraft Finite Element Modelling for structure analysis using Altair Products
Altair
 
Soc.pptx
Jagu Mounica
 
Industrial automation - Sensors and Transducers
RamaniIA
 
itu-t recommendation g671, g703
FrankNguyen48
 
Future Onshore Wind Energy Technology
Philip Totaro
 
AFL Fiber Optic Test and Inspection Solutions 2017
Christian Kraemer
 
ETAP - Arc flash analysis etap
Himmelstern
 
ETAP - Arc flash analysis done Right
Himmelstern
 

More from Jonathan Bowen (13)

PDF
Formal Methods: Whence and Whither? [Martin Fränzle Festkolloquium, 2025]
Jonathan Bowen
 
PDF
Formal Methods: Whence and Whither? (keynote)
Jonathan Bowen
 
PDF
Communities and Ancestors Associated with Egon Börger and ASM
Jonathan Bowen
 
PDF
Alan Turing and Oxford
Jonathan Bowen
 
PDF
The Digital Renaissance from da Vinci to Turing
Jonathan Bowen
 
PDF
Alan Turing: Founder of Computer Science
Jonathan Bowen
 
PDF
Patterns in scholarly publications online: Erdős and beyond
Jonathan Bowen
 
PPTX
Online Communities: Visualization and Formalization.
Jonathan Bowen
 
PDF
Computer science education in universities
Jonathan Bowen
 
PPTX
Making scholarly publications accessible online
Jonathan Bowen
 
PPT
From a Community of Practice to a Body of Knowledge: A case study of the form...
Jonathan Bowen
 
PDF
Wiki Software and Facilities for Museums
Jonathan Bowen
 
PDF
Ten Commandments of Formal Methods: A decade later
Jonathan Bowen
 
Formal Methods: Whence and Whither? [Martin Fränzle Festkolloquium, 2025]
Jonathan Bowen
 
Formal Methods: Whence and Whither? (keynote)
Jonathan Bowen
 
Communities and Ancestors Associated with Egon Börger and ASM
Jonathan Bowen
 
Alan Turing and Oxford
Jonathan Bowen
 
The Digital Renaissance from da Vinci to Turing
Jonathan Bowen
 
Alan Turing: Founder of Computer Science
Jonathan Bowen
 
Patterns in scholarly publications online: Erdős and beyond
Jonathan Bowen
 
Online Communities: Visualization and Formalization.
Jonathan Bowen
 
Computer science education in universities
Jonathan Bowen
 
Making scholarly publications accessible online
Jonathan Bowen
 
From a Community of Practice to a Body of Knowledge: A case study of the form...
Jonathan Bowen
 
Wiki Software and Facilities for Museums
Jonathan Bowen
 
Ten Commandments of Formal Methods: A decade later
Jonathan Bowen
 

Recently uploaded (20)

PPTX
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
PDF
Virat Kohli- the Pride of Indian cricket
kushpar147
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
PDF
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PDF
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
PPTX
Artificial-Intelligence-in-Drug-Discovery by R D Jawarkar.pptx
Rahul Jawarkar
 
DOCX
pgdei-UNIT -V Neurological Disorders & developmental disabilities
JELLA VISHNU DURGA PRASAD
 
PPTX
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
PPTX
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
PPTX
How to Apply for a Job From Odoo 18 Website
Celine George
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PPTX
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
PPTX
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
Virat Kohli- the Pride of Indian cricket
kushpar147
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
Artificial-Intelligence-in-Drug-Discovery by R D Jawarkar.pptx
Rahul Jawarkar
 
pgdei-UNIT -V Neurological Disorders & developmental disabilities
JELLA VISHNU DURGA PRASAD
 
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
How to Apply for a Job From Odoo 18 Website
Celine George
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
Virus sequence retrieval from NCBI database
yamunaK13
 

Industrial use of formal methods

  • 1. The Industrial Use of Formal Methods: Experiences of an Optimist Prof. Jonathan P. Bowen London South Bank University University of Westminster Museophile Limited www.jpbowen.com [email protected]
  • 2. Experiences of an Optimist http://en.wikipedia.org/wiki/John_Redcliffe-Maud
  • 4. Airbus A380 simulator Emirates Aviation College Dubai, 3 February 2011
  • 5. Theory and Practice “It has long been my personal view that the separation of practical and theoretical work is artificial and injurious. Much of the practical work done in computing, both in software and in hardware design, is unsound and clumsy because the people who do it have not any clear understanding of the fundamental design principles of their work. Most of the abstract mathematical and theoretical work is sterile because it has no point of contact with real computing.” — Christopher Strachey (1916-1975)
  • 6. Formal Methods • Term established by late 1970s – Next stage from structured design – Mathematical basis • Formal specification and (optionally) proof: – Validation (correct specification) – Verification (correct implementation wrt spec) • But engineers calculate rather than prove • Please contribute to the Formal Methods Wiki: – http://formalmethods.wikia.com
  • 7. Z notation • Formal specification – predicate logic, set theory, and schema boxes – Courses (academia & industry) – Textbooks (reasonable choice) – Tools (type-checkers, provers, …) • Web resources – www.zuser.org • Google group – comp.specification.z • Z User Group (meetings) & Z standard
  • 8. Z Standard • ISO/IEC 13568 – Long process (1990s) – Inconsistencies found! • Final Committee Draft – accepted in 2001 • Useful for tools and industrial application
  • 9. Levels of Complexity – Abstraction • 25 lines of informal requirements • 250 lines of specification (e.g., Z) • 2,500 lines of design description • 25,000 lines of high-level program code • 250,000 machine instructions of object code • 2,500,000 CMOS transistors in hardware!
  • 11. Choosing a formal method – difficult
  • 13. Applications of Formal Methods Examples: • Tektronix (Z) • STV algorithm (VDM) • IBM CICS (Z/B) • AAMP5 microproc. (PVS) • GEC Alsthom (B) • A300/340 (Z)
  • 14. Industrial-Strength Formal Methods in Practice Examples: • Motorola CAP DSP (ACL2) • Radiation Therapy Machine (Z) • ATC system (VDM) • Railways (Prover Technology) And more recently: Microsoft
  • 15. National Air Traffic Services • Handled 2.2 million flights (in 2009), covering the UK and eastern North Atlantic. • And carried more than 200 million passengers safely through some of the busiest and most complex airspace in the world. • Provides air traffic control from its centres at Swanwick, Hampshire and Prestwick, Ayrshire. • Also provides air traffic control services at 15 of the UK's major airports including Heathrow, Gatwick, Stansted, Birmingham, Manchester, Edinburgh, and Glasgow, together with air traffic services at Gibraltar Airport.
  • 16. National Air Traffic Services, UK Swanwick southern England www.nats.co.uk
  • 17. Flight strips on paper Last flight of Concorde
  • 19. National Air Traffic Services • Advertisement & leaflet at Heathrow Airport  • Air Traffic Management (ATM) • Single European Sky ATM Research (SESAR) • SESAR Joint Undertaking • www.sesarju.eu • SESAR project (2004–20)
  • 20. Altran Praxis www.altran-praxis.com
  • 21. Open-DO Formal Methods in Air Traffic Control Slides by Neil White www.slideshare.net/AdaCore/white-open-do www.youtube.com/watch?v=IQMWVqQfm5A Copyright © Altran Praxis
  • 22. 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. Copyright © Altran Praxis
  • 23. 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.computerweekly.com/Articles/2007/03/07/222258/Nats- claims-the-biggest-air-traffic-control-innovation-since.htm Copyright © Altran Praxis
  • 24. UK Air Traffic Control Copyright © Altran Praxis limited 2010
  • 25. ATC team – The Notes of this slide and the previous slide give some guidance on style and usage. Planner Tactical Assistant (in/out) (controller) (flight strips) Copyright © Altran Praxis limited 2010
  • 26. 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. Copyright © Altran Praxis
  • 27. 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. Copyright © Altran Praxis
  • 28. Medium Term Conflict Detection: Separation Monitor Separation Monitor Separation (NM) Cancel Alert Green Lines Labels 15 BAW225 UAL3 UAL2 10 SAA321 BAW028 ANZ001 AZA292 BAL547 DLH4695 AMM1077 5 SAS123 BAW43BE 0 0 5 10 15 Time to Interaction (mins) Copyright © Altran Praxis limited 2010
  • 29. 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. Copyright © Altran Praxis
  • 30. The complete iFACTS specification • The functional specification – Z • The algorithm specification – Maths • The HMI specification – State tables • The rest of the specification! – English Copyright © Altran Praxis
  • 32. 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. Copyright © Altran Praxis
  • 33. 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. Copyright © Altran Praxis
  • 34. 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? Copyright © Altran Praxis
  • 35. The state machine specification Button 1 Checkbox 1 State 1 State 2 N/A State 2 State 1 State 3 State 3 State 1 State 2 Transition Actions State 1 -> State 2 : De-select Checkbox 1 Copyright © Altran Praxis
  • 36. State machine training & tools • Training – So trivial that we don’t train! – People “just get it”. • Tools – Err …. None. Copyright © Altran Praxis
  • 37. 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. Copyright © Altran Praxis
  • 38. The SPARK Implementation • SPARK Ada – An annotated subset of Ada. • 150 KSLOC (Logical) • RTE (Run-Time Exception) Proof – Formal partial correctness proof against specification not considered cost-effective. Copyright © Altran Praxis
  • 39. Code
  • 40. 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. Copyright © Altran Praxis
  • 41. SPARK Tools • The SPARK toolset – Examiner. – Proof Simplifier. – Proof Checker. • See me later! Copyright © Altran Praxis
  • 42. 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. Copyright © Altran Praxis
  • 44. The Challenge of Test Design How many potential tests for this fragment?
  • 45. 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. Copyright © Altran Praxis
  • 46. 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. Copyright © Altran Praxis
  • 47. 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. Copyright © Altran Praxis
  • 48. 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! Copyright © Altran Praxis
  • 49. Altran Praxis Altran Praxis Limited 20 Manvers Street Bath BA1 1PX United Kingdom Telephone: +44 (0) 1225 466991 Facsimile: +44 (0) 1225 469006 Website: www.altran-praxis.com Email: [email protected] Copyright © Altran Praxis
  • 50. Tracing • Completeness of coverage – e.g., testing all parts of a Z specification • DOORS tool – Integrate Systems Engineering • Link all specification components with test case(s) or argument for safety case • Flag unlinked components • Also visualization of schema structure www.integrate.biz/casestudies/BusinessGoalAlignment.aspx
  • 51. Future • Traffic Load Prediction Device (TLPD) • Forecast air traffic load up to 4 hours ahead • Plan workloads for optimum traffic flows www.altran-praxis.com/news/nats_control_system_21_Sep_10.aspxx
  • 52. Reflection Oui, l'ouvre sort plus belle D'une forme au travail Rebelle, Vers, marbre, onyx, émail. [Yes, the work comes out more beautiful from a material that resists the process, verse, marble, onyx, or enamel.] — Théophile Gautier (1811–1872) L'Art
  • 55. The Industrial Use of Formal Methods: Experiences of an Optimist Prof. Jonathan P. Bowen London South Bank University University of Westminster Museophile Limited www.jpbowen.com [email protected]