formal methods for critical systems
play

Formal Methods for Critical Systems: A verified implementation of - PowerPoint PPT Presentation

Formal Methods for Critical Systems: A verified implementation of nested procedures Tristan Crolard 1 ICAR15 8-9 October 2015 Joint work with: 1 Pierre Courtieu, 1 , 2 Maria-Virginia Aponte, Julia Lawall 3 1. CNAM / Cedric / CPR team 2.


  1. Formal Methods for Critical Systems: A verified implementation of nested procedures ⋆ Tristan Crolard 1 ICAR’15 8-9 October 2015 Joint work with: 1 Pierre Courtieu, 1 , 2 Maria-Virginia Aponte, Julia Lawall 3 1. CNAM / Cedric / CPR team 2. INRIA / Gallium team 3. UPMC / LIP6 / Whisper team ⋆ Research project funded by AdaCore, the GNAT Pro Company

  2. 1 Formal Methods for Critical Systems: Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  3. 1 Formal Methods for Critical Systems: based on a mathematical formalism Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  4. 1 Formal Methods for Critical Systems: based on a life -critical or mathematical safety -critical formalism Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  5. 1 Formal Methods for Critical Systems: based on a life -critical or embedded mathematical safety -critical systems formalism Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  6. 1 Formal Methods for Critical Systems: based on a life -critical or embedded mathematical safety -critical systems formalism Formal methods are about: � formal specifications � mathematical proofs of properties Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  7. 1 Formal Methods for Critical Systems: based on a life -critical or embedded mathematical safety -critical systems formalism machine - Formal methods are about: checked � formal specifications � mathematical proofs of properties Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  8. Machine-checked mathematical proofs 2 You might want to prove: � some safety and security properties of your system � the full correctness of your implementation with respect to its specification � only the partial correctness of your implementation (no buffer overflow, for instance) In any case, you need a formal specification of your system. Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  9. Machine-checked mathematical proofs 2 You might want to prove: � some safety and security properties of your system � the full correctness of your implementation with respect to its specification � only the partial correctness of your implementation (no buffer overflow, for instance) In any case, you need a formal specification of your system. Of course, testing is still allowed and a formal specification is also required in this case (when mixing tests and proofs). Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  10. Formal Methods: logics and tools 3 expressive Higher-order logics full correctness First-order logics partial correctness decidable Specialized logics specific properties Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  11. Formal Methods: logics and tools 3 interactive expressive Higher-order logics Proof assistants full correctness First-order logics Provers and solvers partial correctness automatic decidable Specialized logics Model checkers specific properties Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  12. Formal Methods: logics and tools 3 interactive expressive Higher-order logics Proof assistants full correctness Program logics First-order logics Provers and solvers partial correctness automatic decidable Specialized logics Model checkers specific properties Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  13. Limits of formal methods 4 “The correspondence between our formal models of programs and the actual behavior of real systems is limited by three factors: � the behavior of the programming language, � the operating system, � and the underlying hardware. For safety-critical systems, these limitations are crucially important and we cannot assume that a program is correct just because it has been proved.” Seven Myths of Formal Methods Anthony Hall, Praxis Sytems, September 1990 Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  14. Two success stories about formal methods 5 � The seL4 project developed at NICTA (SSRG). – seL4 is a formally-verified microkernel – Developed since 2006. – First public release in 2011 (open source since 2014). � The CompCert project developed at INRIA (Gallium team). – CompCert is a formally-verified C compiler – Developed since 2004. – First public release in 2008. Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  15. The seL4 project 6 seL4 is a high-performance general-purpose microkernel, that provides address spaces, threads, IPC and authorisation capabilities � Formal proof of correctness down to binary level � Developed for ARM and Intel processors � The fastest existing microkernel (faster than L4) � 10,000 lines of code � 200,000 lines of proof � about 30 person.years Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  16. The CompCert project 7 A formally-verified optimizing standard C compiler � Formal proof of correctness down to binary level � Developed for PowerPC, ARM and Intel processors � Generated code only 20% slower than gcc -O2 � 15,000 lines of code � 100,000 lines of proof � about 6 person.years Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  17. Proof Architecture 8 Specification correctness Implementation Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  18. Proof Architecture 8 Specification correctness Prototype correctness Implementation Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  19. Proof Architecture 8 proof assistant Specification (Isabelle/HOL, Coq, ...) correctness Prototype correctness Implementation Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  20. Proof Architecture 8 proof assistant Specification (Isabelle/HOL, Coq, ...) correctness “pure” language Prototype (Haskell, pure ML, pure Prolog, ...) correctness Implementation Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  21. Proof Architecture 8 proof assistant Specification (Isabelle/HOL, Coq, ...) correctness “pure” language Prototype (Haskell, pure ML, pure Prolog, ...) correctness mainstream language Implementation (C, Ada, ...) Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  22. Proof Architecture: seL4 9 Specification correctness Prototype correctness Implementation Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  23. Proof Architecture: seL4 9 proof assistant: Specification Isabelle/HOL correctness Prototype correctness Implementation Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  24. Proof Architecture: seL4 9 proof assistant: Specification Isabelle/HOL correctness “pure” language: Prototype Haskell correctness Implementation Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  25. Proof Architecture: seL4 9 proof assistant: Specification Isabelle/HOL correctness “pure” language: Prototype Haskell correctness mainstream language: Implementation C (compiled with gcc) Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  26. Proof Architecture: seL4 9 proof assistant: Specification Isabelle/HOL correctness generation “pure” language: Prototype Haskell correctness mainstream language: Implementation C (compiled with gcc) Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  27. Proof Architecture: CompCert 10 Specification correctness Prototype correctness Implementation Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  28. Proof Architecture: CompCert 10 proof assistant: Specification Coq correctness Prototype correctness Implementation Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  29. Proof Architecture: CompCert 10 proof assistant: Specification Coq correctness “pure” language: Prototype pure ML (OCaml) correctness Implementation Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

  30. Proof Architecture: CompCert 10 proof assistant: Specification Coq correctness “pure” language: Prototype pure ML (OCaml) correctness mainstream language: Implementation OCaml (native compiler) Formal Methods for Critical Systems: Tristan Crolard A verified implementation of nested procedures

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend