Verifying a Lustre Compiler Part 2
|
|
- Abraham Cannon
- 6 years ago
- Views:
Transcription
1 Verifying a Lustre Compiler Part 2 Lélio Brun PARKAS (Inria - ENS) Timothy Bourke, Pierre-Évariste Dagand, Xavier Leroy, Marc Pouzet, Lionel Rieg SYNCHRON 2016 December 7, 2016 Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
2 Introduction Context (normalized) elaboration / scheduling check parsing Unannotated Lustre elaboration Lustre normalization N-Lustre scheduling SN-Lustre dataflow imperative fusion optimization translation Verified Lustre compiler several passes intermediary imperative language: Obc Obc Clight Obc generation Clight compilation Assembly printing Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
3 Introduction Context (normalized) elaboration / scheduling check parsing Unannotated Lustre elaboration Lustre normalization N-Lustre scheduling SN-Lustre dataflow imperative fusion optimization translation Verified Lustre compiler several passes intermediary imperative language: Obc Obc Clight Contribution implementation and correctness proof in Coq Obc generation Clight compilation Assembly printing Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
4 Obc Syntax Obc: Abstract Syntax e := expression x (local variable) state(x) (state variable) c (constant) e (unary operator) e e (binary operator) s := statement x := e (update) state(x) := e (state update) if e then s else s (conditional) x := c(i).m( e ) (method call) s; s (composition) skip (do nothing) cls := declaration class c { (class) memory x ty instance i c m( x ty ) returns ( x ty ) [var x ty ] { s } } Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
5 Obc Syntax Example node rect (d: int ) returns (y: int ) var py: int ; let y = py + d; py = 0 fby y; tel node integrator (a: int ) returns (v, x: int ) let v = rect (a); x = rect (v); tel node excess (max, a: int ) returns (e: bool ; x: int ) var v: int ; let (v, x) = integrator (a); e = v > max ; tel class rect { memory py: int ; reset () { state (py) := 0 } step (d: int ) returns (y: int ) { y := state (py) + d; state (py) := y } } class integrator { instance v, x: rect ; reset () { rect (v). reset (); rect (x). reset () } step (a: int ) returns (v, x: int ) { v := rect (v). step (a); x := rect (x). step (v) } } class excess { instance vx: integrator ; reset () { integrator (vx). reset () } step (max, a: int ) returns (e: bool, x: int ) var v: int { v, x := integrator (vx). step (a); e := v > max } } Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
6 Obc Semantics State and memory model menv venv ident val { memories : ident val menv instances : ident menv instances(v) instances(vx) instances(x) memories(py) memories(py) Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
7 Obc Semantics Statements rules me, ve exp e v p, me, ve st x := e me, ve {x v} me, ve exp e v p, me, ve st state(x) := e update_mem(me, x, v), ve... Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
8 TranslGeneration of Clight Clight CompCert s frontend language block memory model 2 types of variables: local and temporaries 2 semantics variants: parameters as local variables or as temporaries 2 semantics: small and big step small step: continuations big step: state (e, le, m) e local variables environment : ident block int le temporaries environment : ident val m memory : block int byte Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
9 TranslGeneration of Clight Generation function Obc class Clight structure Obc method void-returning Clight function state: pointer self multiple outputs: pointer out Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
10 TranslGeneration of Clight Example class rect { memory py : int ; [...] } class integrator { instance v, x: rect ; [...] } class excess { instance vx: integrator ; [...] struct rect { int py; }; struct integrator { struct rect v; struct rect x; }; struct excess { struct integrator vx; }; [...] step (max, a: int ) returns (e: bool, x: int ) var v: int { v, x := integrator (vx). step (a); e := v > max } } struct excess_step { _Bool e; int x; }; void excess_step ( struct excess *self, struct excess_step *out, int max, int a) { struct integrator_step vx_step ; register int v; integrator_step (&(* self ).vx, &vx_step, a); v = vx_step.v; (* out ).x = sx_step.x; (* out ).e = v > max ; } Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
11 Semantics preservation Obc : (me, ve) ; Clight : (e, le, m) me 1, ve 1 st s me 2, ve 2 match_states e 1, le 1, m 1 Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
12 Semantics preservation Obc : (me, ve) ; Clight : (e, le, m) match_states me 1, ve 1 st s me 2, ve 2 match_states e 1, le 1, m 1 Clight s s e 1, le 2, m 2 Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
13 Separation logic Consequences of CompCert s memory model: aliasing (overlapping) alignment permissions sizes Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
14 Separation logic Consequences of CompCert s memory model: aliasing (overlapping) alignment permissions sizes Solution use a separation logic formalism Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
15 Separation logic in CompCert { mfoot : block int P predicate P :, m P (mpred P) m mpred : memory P conjonction m P Q pure formula m pure (P) Q P m Q Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
16 Separation logic in CompCert { mfoot : block int P predicate P :, m P (mpred P) m mpred : memory P conjonction m P Q pure formula m pure (P) Q P m Q mfoot = λ b ofs. mfoot P b ofs mfoot Q b ofs P Q = mpred = λ m. mpred P m mpred Q m disjoint(mfoot P) (mfoot Q) Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
17 States correspondence Obc : (me, ve) ; Clight : (e, le, m) match_states = Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
18 States correspondence Obc : (me, ve) ; Clight : (e, le, m) match_states = pure (le(self) = (b s, ofs)) pure (le(out) = (b o, 0)) pure (ge(f_c) = co out ) self pointer out pointer output structure Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
19 States correspondence Obc : (me, ve) ; Clight : (e, le, m) match_states = pure (le(self) = (b s, ofs)) pure (le(out) = (b o, 0)) pure (ge(f_c) = co out ) pure (wt_env ve m) pure (wt_mem me p c) Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
20 States correspondence Obc : (me, ve) ; Clight : (e, le, m) match_states = pure (le(self) = (b s, ofs)) pure (le(out) = (b o, 0)) pure (ge(f_c) = co out ) pure (wt_env ve m) pure (wt_mem me p c) staterep p c me b s ofs memory me structure pointed by self Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
21 States correspondence Obc : (me, ve) ; Clight : (e, le, m) match_states = pure (le(self) = (b s, ofs)) pure (le(out) = (b o, 0)) pure (ge(f_c) = co out ) pure (wt_env ve m) pure (wt_mem me p c) staterep p c me b s ofs blockrep ve co out b o output variables of m fields of co out pointed by out Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
22 States correspondence Obc : (me, ve) ; Clight : (e, le, m) match_states = pure (le(self) = (b s, ofs)) pure (le(out) = (b o, 0)) pure (ge(f_c) = co out ) pure (wt_env ve m) pure (wt_mem me p c) staterep p c me b s ofs blockrep ve co out b o varsrep m ve le parameters and local variables temporaries Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
23 States correspondence Obc : (me, ve) ; Clight : (e, le, m) match_states = pure (le(self) = (b s, ofs)) pure (le(out) = (b o, 0)) pure (ge(f_c) = co out ) pure (wt_env ve m) pure (wt_mem me p c) staterep p c me b s ofs blockrep ve co out b o varsrep m ve le subrep_range e subcalls output structures allocation Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
24 Staterep on the example menv instances(vx) excess integrator vx rect v int py instances(v) memories(py) instances(x) memories(py) rect x int py Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
25 Staterep on the example menv instances(vx) excess integrator vx rect v int py instances(v) memories(py) instances(x) memories(py) rect x int py staterep excess menv b s ofs Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
26 Staterep on the example menv instances(vx) excess integrator vx rect v int py instances(v) memories(py) instances(x) memories(py) rect x int py staterep integrator menv.instances(vx) b s (ofs + δ excess vx ) Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
27 Staterep on the example menv instances(vx) excess integrator vx rect v int py instances(v) memories(py) instances(x) memories(py) rect x int py staterep rect menv.instances(vx).instances(v) b s (ofs + δ excess vx + δ integrator v ) Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
28 Staterep on the example menv instances(vx) excess integrator vx rect v int py instances(v) memories(py) instances(x) memories(py) rect x int py staterep rect menv.instances(vx).instances(x) b s (ofs + δ excess vx + δ integrator x ) Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
29 Staterep on the example menv instances(vx) excess integrator vx rect v int py instances(v) memories(py) instances(x) memories(py) rect x int py contains int32s b s (ofs + δ excess vx + δ integrator v + δ rect py ) menv.instances(vx).instances(v).memories(py) Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
30 Staterep on the example menv instances(vx) excess integrator vx rect v int py instances(v) memories(py) instances(x) memories(py) rect x int py contains int32s b s (ofs + δ excess vx + δ integrator x + δ rect py ) menv.instances(vx).instances(x).memories(py) Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
31 Staterep staterep [ ] c me b s ofs = staterep (class k{... } :: p) c me b s ofs = staterep p c me b s ofs if k c staterep (class c{ x ty i k... } :: p) c me b s ofs = x ty contains ty b s (ofs + field_offset(x, x ty i k )) me.memories(x) i k staterep p l me.instances(k) b s (ofs + field_offset(i, x ty i k )) Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
32 Invariant preservation frame rule emulation : m P F hypotheses m, properties m P F proof structure : simultaneous inductions (function calls, function bodies) ; ; x := e ; x = e ; x := C.f σ (e) ; ; ; x := e skip C_f (σ, o, e) ; x = e Sskip x = o.y 1 x = o.y 2 Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
33 Invariant preservation frame rule emulation : m P F hypotheses m, properties m P F proof structure : simultaneous inductions (function calls, function bodies) ; ; x := e ; x = e ; x := C.f σ (e) ; ; ; x := e skip C_f (σ, o, e) ; x = e Sskip x = o.y 1 x = o.y 2 Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
34 Invariant preservation frame rule emulation : m P F hypotheses m, properties m P F proof structure : simultaneous inductions (function calls, function bodies) ; ; x := e ; x = e ; x := C.f σ (e) ; ; ; x := e skip C_f (σ, o, e) ; x = e Sskip x = o.y 1 x = o.y 2 Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
35 Invariant preservation frame rule emulation : m P F hypotheses m, properties m P F proof structure : simultaneous inductions (function calls, function bodies) ; ; x := e ; x = e ; x := C.f σ (e) ; specialized invariant ; ; x := e skip C_f (σ, o, e) ; x = e Sskip x = o.y 1 x = o.y 2 Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
36 Invariant preservation frame rule emulation : m P F hypotheses m, properties m P F proof structure : simultaneous inductions (function calls, function bodies) ; induction ; x := e ; x = e ; x := C.f σ (e) ; ; ; x := e skip C_f (σ, o, e) ; x = e Sskip x = o.y 1 x = o.y 2 Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
37 Proof case match_states me, ve st state(x) := a me, ve match_states e, le, m s ( self).x = a e e, le, m Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
38 Proof case me, ve st state(x) := a me, ve match_states match_states e, le, m s ( self).x = a e e, le, m le(self) = (b s, ofs)... e, le, m e self (b s, ofs) match_states field_offset(x,... ) = δ x staterep_field_offset e, le, m lv ( self).x b s, ofs + δ x Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
39 Proof case me, ve st state(x) := a me, ve match_states match_states e, le, m s ( self).x = a e e, le, m le(self) = (b s, ofs)... e, le, m e self (b s, ofs) match_states field_offset(x,... ) = δ x staterep_field_offset e, le, m lv ( self).x b s, ofs + δ x me, ve exp a v e, le, m e a e v expr_eval_simu Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
40 Proof case me, ve st state(x) := a me, ve match_states match_states e, le, m s ( self).x = a e e, le, m le(self) = (b s, ofs)... e, le, m e self (b s, ofs) match_states field_offset(x,... ) = δ x staterep_field_offset e, le, m lv ( self).x b s, ofs + δ x me, ve exp a v e, le, m e a e v expr_eval_simu match_states store(m, b s, ofs + δ x, v) = m match_states_assign_state Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
41 Conclusion Summary size: translation: 300 loc separation: 2000 loc correctness: 3300 loc memory models correspondence: separation logic other source languages certified Lustre compilation Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
42 Conclusion Final lemma (normalized) elaboration / scheduling check parsing Unannotated Lustre elaboration Lustre normalization N-Lustre scheduling SN-Lustre dataflow imperative behavior_asm : wc_global G wt_global G wt_io G main ins outs sem_node G main ins outs compile G main = OK P ( t, program_behaves (Asm.semantics P) (Diverges t)) T, program_behaves (Asm.semantics P) (Reacts T ) bisim_io G main ins outs T translation fusion optimization Obc generation Clight compilation Assembly printing Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 19
43 Future Works complete the toolchain optimizations PhD: semantics, automata, reset Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 5
44 Other works synchronous languages, Lustre [Ben+03; Cas+87; Bie+08; Aug13; Aug+14; Bou+16] certified compilation: CompCert [BDL06; Ler09a; Ler09b] automatic proof of a compiler [CG15] denotational semantics [Chl07; BKV09; BH09] Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 5
45 References I [Ben+03] [Cas+87] [Bie+08] Albert Benveniste, Paul Caspi, Stephen A. Edwards, Paul Le Guernic, Nicolas Halbwachs, and Robert De Simone. The synchronous languages 12 years later. In: proceedings of the IEEE. Vol Jan. 2003, pp Paul Caspi, Nicolas Halbwachs, Daniel Pilaud, and John Alexander Plaice. LUSTRE: A declarative language for programming synchronous systems. In: POPL 87. ACM. Jan. 1987, pp Dariusz Biernacki, Jean-Louis Colaço, Grégoire Hamon, and Marc Pouzet. Clock-directed Modular Code Generation of Synchronous Data-flow Languages. In: ACM International Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES). Tucson, Arizona, June [Aug13] Cédric Auger. Compilation certifiée de SCADE/LUSTRE. PhD thesis. Orsay, France: Univ. Paris Sud 11, Apr [Aug+14] Cédric Auger, Jean-Louis Colaço, Grégoire Hamon, and Marc Pouzet. A Formalization and Proof of a Modular Lustre Code Generator. En préparation Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 5
46 References II [Bou+16] [BDL06] Timothy Bourke, Pierre-Évariste Dagand, Marc Pouzet, and Lionel Rieg. Verifying Clock-Directed Modular Code Generation for Lustre. En préparation Sandrine Blazy, Zaynah Dargaye, and Xavier Leroy. Formal verification of a C compiler front-end. In: FM 2006: Int. Symp. on Formal Methods volume 4085 de LNCS (2006), pp [Ler09a] Xavier Leroy. A formally verified compiler back-end. In: Journal of Automated Reasoning 43.4 (2009), pp [Ler09b] Xavier Leroy. Formal verification of a realistic compiler. In: Comms. ACM 52.7 (2009), pp [CG15] [Chl07] Martin Clochard and Léon Gondelman. Double WP : Vers une preuve automatique d un compilateur. In: Journées Francophones des Langages Applicatifs. INRIA. Jan Adam Chlipala. A certified type-preserving compiler from lambda calculus to assembly language. In: Programming Language Design and Implementation. ACM. 2007, pp Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 5
47 References III [BKV09] [BH09] Nick Benton, Andrew Kennedy, and Carsten Varming. Some domain theory and denotational semantics in Coq. In: Theorem Proving in Higher Order Logics. volume 5674 de LNCS. 2009, pp Nick Benton and Chung-Kil Hur. Biorthogonality, step-indexing and compiler correctness. In: International Conference on Functional Programming. ACM. 2009, pp Lélio Brun Verifying a Lustre Compiler Part 2 December 7, / 5
A Formally Verified Compiler for Lustre
A Formally Verified Compiler for Lustre Timothy Bourke 1,2 Lélio Brun 1,2 Pierre-Évariste Dagand 4,3,1 Xavier Leroy 1 Marc Pouzet 4,2,1 Lionel Rieg 5,6 1. Inria Paris 2. DI, École normale supérieure 3.
More informationClock-directed Modular Code-generation for Synchronous Data-flow Languages
1 Clock-directed Modular Code-generation for Synchronous Data-flow Languages Dariusz Biernacki Univ. of Worclaw (Poland) Jean-Louis Colaço Prover Technologies (France) Grégoire Hamon The MathWorks (USA)
More informationA concrete memory model for CompCert
A concrete memory model for CompCert Frédéric Besson Sandrine Blazy Pierre Wilke Rennes, France P. Wilke A concrete memory model for CompCert 1 / 28 CompCert real-world C to ASM compiler used in industry
More informationHOW TO GIVE TALKS THAT PEOPLE CAN FOLLOW
HOW TO GIVE TALKS THAT PEOPLE CAN FOLLOW Derek Dreyer MPI for Software Systems PLMW@POPL 2017 Paris, France My job as a researcher Do research My job as a researcher Do research Write papers Give talks
More informationA formally verified compiler for Lustre
A formally verified compiler for Lustre Timothy Bourke This course describes an ongoing research collaboration with Lélio Brun, Pierre-Évariste Dagand, Xavier Leroy, Marc Pouzet, and Lionel Rieg. Cours
More informationA Synchronous-based Code Generator For Explicit Hybrid Systems Languages
A Synchronous-based Code Generator For Explicit Hybrid Systems Languages Timothy Bourke 1 Jean-Louis Colaço 2 Bruno Pagano 2 Cédric Pasteur 2 Marc Pouzet 3,1 1. INRIA Paris-Rocquencourt 2. Esterel-Technologies/ANSYS,
More informationVerified Characteristic Formulae for CakeML. Armaël Guéneau, Magnus O. Myreen, Ramana Kumar, Michael Norrish April 27, 2017
Verified Characteristic Formulae for CakeML Armaël Guéneau, Magnus O. Myreen, Ramana Kumar, Michael Norrish April 27, 2017 Goal: write programs in a high-level (ML-style) language, prove them correct interactively,
More informationTowards a verified Lustre compiler with modular reset
Toward a verified Lutre compiler with modular reet Timothy Bourke, Lélio Brun, Marc Pouzet To cite thi verion: Timothy Bourke, Lélio Brun, Marc Pouzet. Toward a verified Lutre compiler with modular reet.
More informationSynchronous Kahn Networks (ten years later)
Synchronous Kahn Networks (ten years later) Marc Pouzet LRI Marc.Pouzet@lri.fr Workshop SYNCHRON, 27/11/06 Overview The origins From Lustre to Lucid Synchrone Developping a Language Conclusion The origins
More informationAn Eect Type System for Modular Distribution of Dataow Programs
An Eect Type System for Modular Distribution of Dataow Programs Gwenaël Delaval 1 Alain Girault 1 Marc Pouzet 2 P P 1 INRIA Rhône-Alpes, Pop-Art project ART 2 LRI, Demons team June 13, 2008 LCTES, Tucson,
More informationFormal verification of program obfuscations
Formal verification of program obfuscations Sandrine Blazy joint work with Roberto Giacobazzi and Alix Trieu IFIP WG 2.11, 2015-11-10 1 Background: verifying a compiler Compiler + proof that the compiler
More informationMemory optimisation in a first-order dataflow synchronous language
Memory optimisation in a first-order dataflow synchronous language Cédric Pasteur PARKAS team, Laboratoire d Informatique de l Ecole Normale Supérieure, Paris November 29th, 2010 Contents 1. Introduction
More informationFormal C semantics: CompCert and the C standard
Formal C semantics: CompCert and the C standard Robbert Krebbers 1, Xavier Leroy 2, and Freek Wiedijk 1 1 ICIS, Radboud University Nijmegen, The Netherlands 2 Inria Paris-Rocquencourt, France Abstract.
More informationA Proposal for Verified Code Generation from Modelica
A Proposal for Verified Code Generation from Modelica Bernhard Thiele PELAB Linköping University 04. February 2015-9th MODPROD Workshop on Model-Based Product Development 1 / 22 Goals of this presentation
More informationDeductive Program Verification with Why3, Past and Future
Deductive Program Verification with Why3, Past and Future Claude Marché ProofInUse Kick-Off Day February 2nd, 2015 A bit of history 1999: Jean-Christophe Filliâtre s PhD Thesis Proof of imperative programs,
More informationProgramming the Simulink Standard Library with Zélus: experience report 1
Programming the Simulink Standard Library with Zélus: experience report 1 Marc Pouzet Marc.Pouzet@ens.fr DI, ENS ANR Cafein Les Angles February 2, 2016 1 Joint work with Timothy Bourke (INRIA Paris) and
More informationSynchronous Specification
Translation Validation for Synchronous Specification in the Signal Compiler Van-Chan Ngo Jean-Pierre Talpin Thierry Gautier INRIA Rennes, France FORTE 2015 Construct a modular translation validationbased
More informationChapter 1. Introduction
1 Chapter 1 Introduction An exciting development of the 21st century is that the 20th-century vision of mechanized program verification is finally becoming practical, thanks to 30 years of advances in
More informationFrom IMP to Java. Andreas Lochbihler. parts based on work by Gerwin Klein and Tobias Nipkow ETH Zurich
From IMP to Java Andreas Lochbihler ETH Zurich parts based on work by Gerwin Klein and Tobias Nipkow 2015-07-14 1 Subtyping 2 Objects and Inheritance 3 Multithreading 1 Subtyping 2 Objects and Inheritance
More informationAn experiment with variable binding, denotational semantics, and logical relations in Coq. Adam Chlipala University of California, Berkeley
A Certified TypePreserving Compiler from Lambda Calculus to Assembly Language An experiment with variable binding, denotational semantics, and logical relations in Coq Adam Chlipala University of California,
More informationReminder of the last lecture. Aliasing Issues: Call by reference, Pointer programs. Introducing Aliasing Issues. Home Work from previous lecture
Reminder of the last lecture Aliasing Issues: Call by reference, Pointer programs Claude Marché Cours MPRI 2-36-1 Preuve de Programme 18 janvier 2017 Additional features of the specification language Abstract
More informationUML Profile for MARTE: Time Model and CCSL
UML Profile for MARTE: Time Model and CCSL Frédéric Mallet 1 Université Nice Sophia Antipolis, Aoste team INRIA/I3S, Sophia Antipolis, France Frederic.Mallet@unice.fr Abstract. This 90 minutes tutorial
More informationA Typed Calculus Supporting Shallow Embeddings of Abstract Machines
A Typed Calculus Supporting Shallow Embeddings of Abstract Machines Aaron Bohannon Zena M. Ariola Amr Sabry April 23, 2005 1 Overview The goal of this work is to draw a formal connection between steps
More informationAn Introduction to Lustre
An Introduction to Lustre Monday Oct 06, 2014 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/35 ES Programming languages Which language to write embedded software in? Traditional: low-level
More informationA CRASH COURSE IN SEMANTICS
LAST TIME Recdef More induction NICTA Advanced Course Well founded orders Slide 1 Theorem Proving Principles, Techniques, Applications Slide 3 Well founded recursion Calculations: also/finally {P}... {Q}
More informationVerasco: a Formally Verified C Static Analyzer
Verasco: a Formally Verified C Static Analyzer Jacques-Henri Jourdan Joint work with: Vincent Laporte, Sandrine Blazy, Xavier Leroy, David Pichardie,... June 13, 2017, Montpellier GdR GPL thesis prize
More informationFormal verification of an optimizing compiler
Formal verification of an optimizing compiler Xavier Leroy INRIA Rocquencourt RTA 2007 X. Leroy (INRIA) Formal compiler verification RTA 2007 1 / 58 The compilation process General definition: any automatic
More informationAdam Chlipala University of California, Berkeley ICFP 2006
Modular Development of Certified Program Verifiers with a Proof Assistant Adam Chlipala University of California, Berkeley ICFP 2006 1 Who Watches the Watcher? Program Verifier Might want to ensure: Memory
More informationFormal Verification of MIX Programs
Formal Verification of MIX Programs Jean-Christophe Filliâtre CNRS LRI, Univ Paris-Sud, Orsay F-91405 INRIA Futurs, ProVal, Orsay F-91893 Abstract We introduce a methodology to formally verify MIX programs.
More informationAliasing restrictions of C11 formalized in Coq
Aliasing restrictions of C11 formalized in Coq Robbert Krebbers Radboud University Nijmegen December 11, 2013 @ CPP, Melbourne, Australia Aliasing Aliasing: multiple pointers referring to the same object
More informationVerifying a Lustre Compiler (Part 1)
Verifying a Lustre Compiler (Part 1) Timothy Bourke 1,2 Lélio Brun 1,2 Pierre-Évariste Dagand 3 Xavier Leroy 1 Marc Pouzet 4,2,1 Lionel Rieg 5 1. INRIA Paris 2. DI, École normale supérieure 3. CNRS 4.
More informationCalculating Correct Compilers
university of copenhagen department of computer science Faculty of Science Calculating Correct Compilers Patrick Bahr1 Graham Hutton2 1 University of Copenhagen, Department of Computer Science paba@diku.dk
More informationContents. Chapter 1 SPECIFYING SYNTAX 1
Contents Chapter 1 SPECIFYING SYNTAX 1 1.1 GRAMMARS AND BNF 2 Context-Free Grammars 4 Context-Sensitive Grammars 8 Exercises 8 1.2 THE PROGRAMMING LANGUAGE WREN 10 Ambiguity 12 Context Constraints in Wren
More informationValidating LR(1) parsers
Validating LR(1) parsers Jacques-Henri Jourdan François Pottier Xavier Leroy INRIA Paris-Rocquencourt, projet Gallium Journées LTP/MTVV, 2011-10-28 Parsing: recap text or token stream abstract syntax tree
More informationFormal verification of a C-like memory model and its uses for verifying program transformations
Formal verification of a C-like memory model and its uses for verifying program transformations Xavier Leroy, Sandrine Blazy To cite this version: Xavier Leroy, Sandrine Blazy. Formal verification of a
More informationAbstract Interpretation
Abstract Interpretation Ranjit Jhala, UC San Diego April 22, 2013 Fundamental Challenge of Program Analysis How to infer (loop) invariants? Fundamental Challenge of Program Analysis Key issue for any analysis
More informationStatic semantics. Lecture 3-6: Semantics. Attribute grammars (2) Attribute grammars. Attribute grammars example. Dynamic semantics
Lecture 3-6: Semantics Static semantics Attribute grammars Dynamic semantics Denotational semantics: semantic equations Axiomatic semantics: inference rules and correctness proofs Static semantics Semantics
More informationIntegrating verification in programming languages
Integrating verification in programming languages Thomas Jensen, INRIA Seminar INRIA Rennes, 04/11/2015 Collège de France Chaire Algorithmes, machines et langages x / y Types For division to make sense,
More informationA New Verified Compiler Backend for CakeML. Yong Kiam Tan* Magnus O. Myreen Ramana Kumar Anthony Fox Scott Owens Michael Norrish
A New Verified Compiler Backend for CakeML Yong Kiam Tan* Magnus O. Myreen Ramana Kumar Anthony Fox Scott Owens Michael Norrish 1 CakeML Has: references, modules, signatures, datatypes, exceptions,...
More informationFORC 3 ES. FMF October 10 th Contributors Forces 3: Pierre-Loïc Garoche, Thomas Loquen, Eric Noulard, Claire Pagetti, Clément Roos, Pierre Roux
FORC 3 ES Contributors Forces 3: Pierre-Loïc Garoche, Thomas Loquen, Eric Noulard, Claire Pagetti, Clément Roos, Pierre Roux FMF October 10 th 2017 1 Outline! Introduction 1. Project description 2. Example
More informationWhy. an intermediate language for deductive program verification
Why an intermediate language for deductive program verification Jean-Christophe Filliâtre CNRS Orsay, France AFM workshop Grenoble, June 27, 2009 Jean-Christophe Filliâtre Why tutorial AFM 09 1 / 56 Motivations
More informationReactive Types. Jean-Pierre Talpin. Campus de Beaulieu, Rennes, France.
Reactive Types Jean-Pierre Talpin IRISA (INRIA-Rennes & CNRS URA 227) Campus de Beaulieu, 35000 Rennes, France E-mail: talpin@irisa.fr Abstract. Synchronous languages, such as Signal, are best suited for
More informationBeluga: A Framework for Programming and Reasoning with Deductive Systems (System Description)
Beluga: A Framework for Programming and Reasoning with Deductive Systems (System Description) Brigitte Pientka and Joshua Dunfield McGill University, Montréal, Canada {bpientka,joshua}@cs.mcgill.ca Abstract.
More informationCoq, a formal proof development environment combining logic and programming. Hugo Herbelin
Coq, a formal proof development environment combining logic and programming Hugo Herbelin 1 Coq in a nutshell (http://coq.inria.fr) A logical formalism that embeds an executable typed programming language:
More informationCoq. LASER 2011 Summerschool Elba Island, Italy. Christine Paulin-Mohring
Coq LASER 2011 Summerschool Elba Island, Italy Christine Paulin-Mohring http://www.lri.fr/~paulin/laser Université Paris Sud & INRIA Saclay - Île-de-France September 2011 Lecture 4 : Advanced functional
More informationSimply-Typed Lambda Calculus
#1 Simply-Typed Lambda Calculus #2 Back to School What is operational semantics? When would you use contextual (small-step) semantics? What is denotational semantics? What is axiomatic semantics? What
More informationChapter 3. Describing Syntax and Semantics ISBN
Chapter 3 Describing Syntax and Semantics ISBN 0-321-49362-1 Chapter 3 Topics Describing the Meanings of Programs: Dynamic Semantics Copyright 2015 Pearson. All rights reserved. 2 Semantics There is no
More informationWhy3 where programs meet provers
Why3 where programs meet provers Jean-Christophe Filliâtre CNRS KeY Symposium 2017 Rastatt, Germany October 5, 2017 history started in 2001, as an intermediate language in the process of verifying C and
More informationHow much is a mechanized proof worth, certification-wise?
How much is a mechanized proof worth, certification-wise? Xavier Leroy Inria Paris-Rocquencourt PiP 2014: Principles in Practice In this talk... Some feedback from the aircraft industry concerning the
More informationThe CompCert verified compiler
The CompCert verified compiler Tahina Ramananandro 1 1 Yale University November 28th, 2012 Ramananandro (Yale) CompCert November 28th, 2012 1 / 99 Outline 1 General overview: compiler correctness 2 The
More informationFormal semantics and other research around Spark2014
Formal semantics and other research around Spark2014 Virginia Aponte, Pierre Courtieu, Tristan Crolard (CPR Team - Cnam) Zhi Zhang (SAnToS, KSU) November 2014 Aponte, Courtieu, Crolard, Zhang Formal semantics
More informationPROPER TECHNIQUE OF SOFTWARE INSPECTION USING GUARDED COMMAND LANGUAGE
International Journal of Computer Science and Communication Vol. 2, No. 1, January-June 2011, pp. 153-157 PROPER TECHNIQUE OF SOFTWARE INSPECTION USING GUARDED COMMAND LANGUAGE Neeraj Kumar Singhania University,
More informationRepresentation Independence, Confinement and Access Control
Representation Independence, Confinement and Access Control Anindya Banerjee and David Naumann ab@cis.ksu.edu and naumann@cs.stevens-tech.edu Kansas State University and Stevens Institute of Technology,
More informationType Theory meets Effects. Greg Morrisett
Type Theory meets Effects Greg Morrisett A Famous Phrase: Well typed programs won t go wrong. 1. Describe abstract machine: M ::= 2. Give transition relation: M 1 M 2
More informationStatic Program Analysis
Static Program Analysis Thomas Noll Software Modeling and Verification Group RWTH Aachen University https://moves.rwth-aachen.de/teaching/ws-1617/spa/ Recap: Taking Conditional Branches into Account Extending
More informationAn Annotated Language
Hoare Logic An Annotated Language State and Semantics Expressions are interpreted as functions from states to the corresponding domain of interpretation Operators have the obvious interpretation Free of
More informationIntroduction to the Calculus of Inductive Definitions
Introduction to the Calculus of Inductive Definitions Christine Paulin-Mohring 1 LRI, Univ Paris-Sud, CNRS and INRIA Saclay - Île-de-France, Toccata, Orsay F-91405 Christine.Paulin@lri.fr 1 Introduction
More informationDenotational Semantics. Domain Theory
Denotational Semantics and Domain Theory 1 / 51 Outline Denotational Semantics Basic Domain Theory Introduction and history Primitive and lifted domains Sum and product domains Function domains Meaning
More informationŒuf: Minimizing the Coq Extraction TCB
Œuf: Minimizing the Coq Extraction TCB Eric Mullen University of Washington, USA USA Abstract Zachary Tatlock University of Washington, USA USA Verifying systems by implementing them in the programming
More informationCertified compilers. Do you trust your compiler? Testing is immune to this problem, since it is applied to target code
Certified compilers Do you trust your compiler? Most software errors arise from source code But what if the compiler itself is flawed? Testing is immune to this problem, since it is applied to target code
More informationA Formally-Verified C static analyzer
A Formally-Verified C static analyzer David Pichardie joint work with J.-H. Jourdan, V. Laporte, S.Blazy, X. Leroy, presented at POPL 15!! How do you trust your software? bug finders sound verifiers verified
More informationTypes and Programming Languages. Lecture 6. Normalization, references, and exceptions
Types and Programming Languages Lecture 6. Normalization, references, and exceptions Xiaojuan Cai cxj@sjtu.edu.cn BASICS Lab, Shanghai Jiao Tong University Fall, 2016 Coming soon One more language features:
More informationFormal verification of a static analyzer based on abstract interpretation
Formal verification of a static analyzer based on abstract interpretation Sandrine Blazy joint work with J.-H. Jourdan, V. Laporte, A. Maroneze, X. Leroy, D. Pichardie IFIP WG 1.9/2.15, 2014-07-14 1 Background:
More informationAdam Chlipala University of California, Berkeley PLDI 2007
A Certified Type- Preserving Compiler from Lambda Calculus to Assembly Language Adam Chlipala University of California, Berkeley PLDI 2007 1 Why Certified Compilers? Manual Code Auditing Static Analysis
More informationCIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)
By the end of this course, students should CIS 1.5 Course Objectives a. Understand the concept of a program (i.e., a computer following a series of instructions) b. Understand the concept of a variable
More informationA Conservative Extension of Synchronous Data-flow with State Machines
A Conservative Extension of Synchronous Data-flow with State Machines Jean-Louis Colaço Esterel-Technologies France Bruno Pagano Esterel-Technologies France Marc Pouzet LRI, Université Paris-Sud France
More informationCom S 541. Programming Languages I
Programming Languages I Lecturer: TA: Markus Lumpe Department of Computer Science 113 Atanasoff Hall http://www.cs.iastate.edu/~lumpe/coms541.html TR 12:40-2, W 5 Pramod Bhanu Rama Rao Office hours: TR
More informationFormal Verification of a Big Integer Library
Formal Verification of a Big Integer Library Sabine Fischer Department of Computer Science Saarland University Saarbruecken, Germany sabine@wjpserver.cs.uni-sb.de Abstract We present formal correctness
More informationLecture 2. The SCADE Language Data Flow Kernel. Daniel Kästner AbsInt GmbH 2012
Lecture 2 The SCADE Language Data Flow Kernel Daniel Kästner AbsInt GmbH 2012 2 Synchronous Programming Two simple ways of implementing reactive systems: Event-driven Foreach input_event
More informationSynchronous reactive programming
Synchronous reactive programming Marcus Sundman Department of Computer Science Åbo Akademi University, FIN-20520 Åbo, Finland e-mail: marcus.sundman@iki.fi URL: http://www.iki.fi/marcus.sundman/ Abstract
More informationPolyhedral Analysis for Synchronous Languages
Polyhedral Analysis for Synchronous Languages Frdric Besson, Thomas Jensen, and Jean-Pierre Talpin Irisa/Cnrs/Inria Campus de Beaulieu, F-35042 Rennes Cedex, France {fbesson,jensen,talpin}@irisa.fr Abstract.
More informationFormal Verication of C++ Object Construction and Destruction
Formal Verication of C++ Object Construction and Destruction Tahina Ramananandro 1 1 INRIA Paris-Rocquencourt November 18th, 2011 Ramananandro (INRIA) Formal verif. of C++ object constr. and destr.november
More informationProgramming Languages
CSE 230: Winter 2008 Principles of Programming Languages Ocaml/HW #3 Q-A Session Push deadline = Mar 10 Session Mon 3pm? Lecture 15: Type Systems Ranjit Jhala UC San Diego Why Typed Languages? Development
More informationSemantics of Imperative Objects
Semantics of Imperative Objects Catalin Hritcu Supervisor: Jan Schwinghammer Responsible: Prof. Gert Smolka Programming Systems Lab Saarland University, Saarbrücken November 2006 1 Overview Imperative
More informationPart II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs?
Part II. Hoare Logic and Program Verification Part II. Hoare Logic and Program Verification Dilian Gurov Props: Models: Specs: Method: Tool: safety of data manipulation source code logic assertions Hoare
More informationRefinements to techniques for verifying shape analysis invariants in Coq
Refinements to techniques for verifying shape analysis invariants in Coq Kenneth Roe and Scott Smith The Johns Hopkins University Abstract. We describe the PEDANTIC framework for verifying the correctness
More informationPart VI. Imperative Functional Programming
Part VI Imperative Functional Programming Chapter 14 Mutable Storage MinML is said to be a pure language because the execution model consists entirely of evaluating an expression for its value. ML is
More informationProgramming Embedded Systems
Programming Embedded Systems Lecture 10 An introduction to Lustre Wednesday Feb 15, 2012 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/34 Course topic: programming lang. Which language to
More informationExtracting the Range of cps from Affine Typing
Extracting the Range of cps from Affine Typing Extended Abstract Josh Berdine, Peter W. O Hearn Queen Mary, University of London {berdine, ohearn}@dcs.qmul.ac.uk Hayo Thielecke The University of Birmingham
More informationFoundations. Yu Zhang. Acknowledgement: modified from Stanford CS242
Spring 2013 Foundations Yu Zhang Acknowledgement: modified from Stanford CS242 https://courseware.stanford.edu/pg/courses/317431/ Course web site: http://staff.ustc.edu.cn/~yuzhang/fpl Reading Concepts
More informationA Simple Supercompiler Formally Verified in Coq
A Simple Supercompiler Formally Verified in Coq IGE+XAO Balkan 4 July 2010 / META 2010 Outline 1 Introduction 2 3 Test Generation, Extensional Equivalence More Realistic Language Use Information Propagation
More informationCS 242. Fundamentals. Reading: See last slide
CS 242 Fundamentals Reading: See last slide Syntax and Semantics of Programs Syntax The symbols used to write a program Semantics The actions that occur when a program is executed Programming language
More informationA Lift Controller in Lustre. (a case study in developing a reactive system) Leszek Holenderski
Presented at 5 th Nordic Workshop on Program Correctness, Turku, Finland, October 25{28, 1993. Published in Proc. of the 5 th Nordic Workshop on Program Correctness, ed. R.J.R. Back and K. Sere, Abo Akademi
More informationFrom Math to Machine A formal derivation of an executable Krivine Machine Wouter Swierstra Brouwer Seminar
From Math to Machine A formal derivation of an executable Krivine Machine Wouter Swierstra Brouwer Seminar β reduction (λx. t0) t1 t0 {t1/x} Substitution Realizing β-reduction through substitution is a
More informationDenotational Semantics of a Simple Imperative Language Using Intensional Logic
Denotational Semantics of a Simple Imperative Language Using Intensional Logic Marc Bender bendermm@mcmaster.ca CAS 706 - Programming Languages Instructor: Dr. Jacques Carette Dept. of Computing and Software
More informationSémantique des Langages de Programmation (SemLP) DM : Region Types
Sémantique des Langages de Programmation (SemLP) DM : Region Types I) Submission Submission Date : 21/05/2017 Submission Format : Submit a virtual machine (.ova) 1 with 1. an executable of the interpreter,
More informationEfficient compilation of array iterators for Lustre
Replace this file with prentcsmacro.sty for your meeting, or with entcsmacro.sty for your meeting. Both can be found at the ENTCS Macro Home Page. Efficient compilation of array iterators for Lustre Lionel
More informationCompCertS: A Memory-Aware Verified C Compiler using Pointer as Integer Semantics
CompCertS: A Memory-Aware Verified C Compiler using Pointer as Integer Semantics Frédéric Besson 1, Sandrine Blazy 2, and Pierre Wilke 3 1 Inria, Rennes, France 2 Université Rennes 1 - CNRS - IRISA, Rennes,
More informationCS 314 Principles of Programming Languages
CS 314 Principles of Programming Languages Lecture 15: Review and Functional Programming Zheng (Eddy) Zhang Rutgers University March 19, 2018 Class Information Midterm exam forum open in Sakai. HW4 and
More informationFormal proofs of code generation and verification tools
Formal proofs of code generation and verification tools Xavier Leroy To cite this version: Xavier Leroy. Formal proofs of code generation and verification tools. Dimitra Giannakopoulou and Gwen Salaün.
More informationAn Extensible Programming Language for Verified Systems Software. Adam Chlipala MIT CSAIL WG 2.16 meeting, 2012
An Extensible Programming Language for Verified Systems Software Adam Chlipala MIT CSAIL WG 2.16 meeting, 2012 The status quo in computer system design DOM JS API Web page Network JS API CPU Timer interrupts
More informationADAM CHLIPALA. Research interests. Education. Refereed conference papers
579 Soda Hall Berkeley, CA 94720-1776 USA adamc@cs.berkeley.edu http://www.cs.berkeley.edu/ adamc/ Research interests ADAM CHLIPALA Dependent type systems; interactive theorem proving; type-based programming
More informationHeq: a Coq library for Heterogeneous Equality
Heq: a Coq library for Heterogeneous Equality Chung-Kil Hur PPS, Université Paris Diderot Abstract. We give an introduction to the library Heq, which provides a set of tactics to manipulate heterogeneous
More informationThe Prototype Verification System PVS
The Prototype Verification System PVS Wolfgang Schreiner Wolfgang.Schreiner@risc.uni-linz.ac.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.uni-linz.ac.at
More informationThunks (continued) Olivier Danvy, John Hatcli. Department of Computing and Information Sciences. Kansas State University. Manhattan, Kansas 66506, USA
Thunks (continued) Olivier Danvy, John Hatcli Department of Computing and Information Sciences Kansas State University Manhattan, Kansas 66506, USA e-mail: (danvy, hatcli)@cis.ksu.edu Abstract: Call-by-name
More informationProgram certification with computational
Program certification with computational effects Burak Ekici j.w.w. Jean-Guillaume Dumas, Dominique Duval, Damien Pous y LJK, University Joseph Fourier, Grenoble y LIP, ENS-Lyon November 5, 2014 JNCF 14,
More informationTurning proof assistants into programming assistants
Turning proof assistants into programming assistants ST Winter Meeting, 3 Feb 2015 Magnus Myréen Why? Why combine proof- and programming assistants? Why proofs? Testing cannot show absence of bugs. Some
More informationToward a Verified Rela.onal Database Management System
Toward a Verified Rela.onal Database Management System Gregory Malecha, Greg Morrise0, Avraham Shinnar, Ryan Wisnesky POPL 2010 Overview We built a verified RDBMS. DB2, Oracle, BerkeleyDB, MySQL, SQLite,
More informationVerification of an ML compiler. Lecture 1: An introduction to compiler verification
Verification of an ML compiler Lecture 1: An introduction to compiler verification Marktoberdorf Summer School MOD 2017 Magnus O. Myreen, Chalmers University of Technology Introduction Your program crashes.
More informationRepresentation Independence, Confinement and Access Control
Representation Independence, Confinement and Access Control Anindya Banerjee and David Naumann ab@cis.ksu.edu and naumann@cs.stevens-tech.edu Kansas State University and Stevens Institute of Technology
More information