Carnegie Mellon Vadim Zaliva, Franz Franchetti Carnegie Mellon University Department of Electrical and Computer Engineering Funded by the DARPA I2O HACMS.

Slides:



Advertisements
Similar presentations
Type Inference David Walker COS 320. Criticisms of Typed Languages Types overly constrain functions & data polymorphism makes typed constructs useful.
Advertisements

Semantics Static semantics Dynamic semantics attribute grammars
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Foundational Certified Code in a Metalogical Framework Karl Crary and Susmit Sarkar Carnegie Mellon University.
1 1 Regression Verification for Multi-Threaded Programs Sagar Chaki, SEI-Pittsburgh Arie Gurfinkel, SEI-Pittsburgh Ofer Strichman, Technion-Haifa Originally.
Translator Architecture Code Generator ParserTokenizer string of characters (source code) string of tokens abstract program string of integers (object.
1 Translation Validation: From Simulink to C Michael RyabtsevOfer Strichman Technion, Haifa, Israel Acknowledgement: sponsored by a grant from General.
LIFE CYCLE MODELS FORMAL TRANSFORMATION
Nicholas Moore Bianca Curutan Pooya Samizadeh McMaster University March 30, 2012.
ISBN Chapter 3 Describing Syntax and Semantics.
Copyright © 2006 Addison-Wesley. All rights reserved. 3.5 Dynamic Semantics Meanings of expressions, statements, and program units Static semantics – type.
Fall Semantics Juan Carlos Guzmán CS 3123 Programming Languages Concepts Southern Polytechnic State University.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
CS 355 – Programming Languages
Automated Soundness Proofs for Dataflow Analyses and Transformations via Local Rules Sorin Lerner* Todd Millstein** Erika Rice* Craig Chambers* * University.
On-the-fly Synthesis of Multi-Clock SVA Jiang Long Andrew Seawright Paparao Kavalipati IWLS’ 2008.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
Comp 205: Comparative Programming Languages Semantics of Imperative Programming Languages denotational semantics operational semantics logical semantics.
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
Transaction Ordering Verification using Trace Inclusion Refinement Mike Jones 11 January 2000.
Catriel Beeri Pls/Winter 2004/5 inductive-revisited 1 Inductive definitions revisited  Generated and Freely generated sets oPattern match, unification.
Chair of Software Engineering 1 Concurrent Object-Oriented Programming Arnaud Bailly, Bertrand Meyer and Volkan Arslan.
Towards a HOL Framework for the Deductive Analysis of Hybrid Control Systems ADPM’2000 Norbert Völker University of Essex, England.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
Describing Syntax and Semantics
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Building An Interpreter After having done all of the analysis, it’s possible to run the program directly rather than compile it … and it may be worth it.
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Have Your Verified Compiler And Extend It Too Zachary Tatlock Sorin Lerner UC San Diego.
Coinduction in a language and verifier K. Rustan M. Leino Research in Software Engineering (RiSE) Microsoft Research, Redmond IFIP WG 2.3 meeting Seattle,
Concordia University Department of Computer Science and Software Engineering Click to edit Master title style COMPILER DESIGN Review Joey Paquet,
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
CS 363 Comparative Programming Languages Semantics.
Type Safety Kangwon National University 임현승 Programming Languages.
Checking Reachability using Matching Logic Grigore Rosu and Andrei Stefanescu University of Illinois, USA.
1 Programming Languages Fundamentals Cao Hoaøng Truï Khoa Coâng Ngheä Thoâng Tin Ñaïi Hoïc Baùch Khoa TP. HCM.
Semantics. Semantics is a precise definition of the meaning of a syntactically and type-wise correct program. Ideas of meaning: –Operational Semantics.
Muhammad Idrees Lecturer University of Lahore 1. Outline Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute.
CPS 506 Comparative Programming Languages Syntax Specification.
Program Analysis and Verification Spring 2014 Program Analysis and Verification Lecture 4: Axiomatic Semantics I Roman Manevich Ben-Gurion University.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
ISBN Chapter 3 Describing Semantics.
Chapter 3 Part II Describing Syntax and Semantics.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Semantics In Text: Chapter 3.
Syntax and Semantics CIS 331 Syntax: the form or structure of the expressions, statements, and program units. Semantics: the meaning of the expressions,
Compiler Introduction 1 Kavita Patel. Outlines 2  1.1 What Do Compilers Do?  1.2 The Structure of a Compiler  1.3 Compilation Process  1.4 Phases.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
Automated tactics for separation logic VeriML Reconstruct Z3 Proof Safe incremental type checker Certifying code transformation Proof carrying hardware.
CSE-321 Programming Languages Review POSTECH June 14, 2011 박성우.
Carnegie Mellon Program Generation with Spiral: Beyond Transforms This work was supported by DARPA DESA program, NSF-NGS/ITR, NSF-ACR, Mercury Inc., and.
C H A P T E R T W O Linking Syntax And Semantics Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
Duminda WijesekeraSWSE 623: Introduction1 Introduction to Formal and Semi- formal Methods Based on A Specifier's Introduction to Formal Methods (J. Wing)
Interpreters and Higher-Order Functions CSE 413 Autumn 2008 Credit: CSE341 notes by Dan Grossman.
Overview of Previous Lesson(s) Over View 3 Model of a Compiler Front End.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
C HAPTER 3 Describing Syntax and Semantics. D YNAMIC S EMANTICS Describing syntax is relatively simple There is no single widely acceptable notation or.
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Functional Verification I Prepared by Stephen M. Thebaut, Ph.D. University of Florida Software Testing and Verification Lecture Notes 21.
Overview of Compilation Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Programming Language Principles Lecture 2.
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture 1 Ahmed Ezzat.
Software Engineering Algorithms, Compilers, & Lifecycle.
Credible Compilation With Pointers Martin Rinard and Darko Marinov Laboratory for Computer Science Massachusetts Institute of Technology.
1 Interactive Computer Theorem Proving CS294-9 October 19, 2006 Adam Chlipala UC Berkeley Lecture 9: Beyond Primitive Recursion.
1 Interactive Computer Theorem Proving CS294-9 September 7, 2006 Adam Chlipala UC Berkeley Lecture 3: Data structures and Induction.
Generic Language Technology (2IS15) Dynamic Semantics
Semantics In Text: Chapter 3.
Programming Languages and Compilers (CS 421)
Presentation transcript:

Carnegie Mellon Vadim Zaliva, Franz Franchetti Carnegie Mellon University Department of Electrical and Computer Engineering Funded by the DARPA I2O HACMS Program through award FA Formal Verification of Hybrid Control Operator Language Formal Verification of Hybrid Control Operator Language

Carnegie Mellon Project’s Goal and High Level Approach Goal Approach To synthesize executable code for the control system of a robot satisfying certain safety and security properties and to produce machine-checkable proofs assuring that this code implements functional specification.  Vehicular control system is specified in HCOL language  HCOL specification is transformed to the code via a series of steps  Transformation steps are formally verified in Coq proof assistant  SPIRAL-Synthesized and formally verified code deployed on a robot. Abstract code HCOL specification HCOL (dataflow) expression Optimized Ʃ-HCOL expression Ʃ-HCOL (loop) expression Optimized abstract code C code Expansion + backtracking Recursive descent Confluent term rewriting Recursive descent Confluent term rewriting Final code

Carnegie Mellon HCOL Basic Operators

Carnegie Mellon HCOL Formalization An HCOL expression can be represented by an Abstract Syntax Tree (AST). A subset of the language syntax could be defined in Coq using the following inductive type : Example definitions of Polynomial operator: The semantics of is defined via an evaluation function, which takes an HOperator object and an input vector and returns the resulting vector: evalHCOOL: ∀ {m n}, HOperator m n → vector A m → vector A n. Inductive HOperator: nat→ nat → Type := │HOReduction : ∀ m (f: A → A →) ‘{pF: !Proper ( (=) ==> (=) ==> (=) ) f } (id:A), HOperator m 1 │HOPointWise : ∀ n (f: A → A →A) ‘{pF: !Proper ( (=) ==> (=) ==> (=) ) f }, HOperator (n+n) n │HOScalarProd: ∀ {k:nat}, HOperator (k+k) 1 │HOEvalPolynomial: ∀ {n} (a:vector A n), HOperator 1 1 │HOCompose: ∀ m {k} n, HOperator k n → HOperator m k → → HOperator m n. Fixpoint EvalPolynomial {n} ‘{SemiRing A} (a: vector A n) (x:A) : A := match a with nil ⇒ 0 │ cons a0 p a ’ ⇒ a0 + (x × (EvalPolynomial a x )) end Syntax: Semantics: Operators’ definition:

Carnegie Mellon HCOL Rewriting Rules

Carnegie Mellon Proving HCOL Rewriting Using Coq Proof Assistant Syntax: Inductive type for HCOL expressions Semantics: evaluation Equivalence: extensionality Rewriting rules as lemmas “Translation validation” – proving sequence of rule applications from SPIRAL trace.

Carnegie Mellon Rewriting Rules as Lemmas We express each rule as a lemma stating equality of two operators. For example, We defined operator extensional equality: Lemma breakdown_ScalarProd: ∀ {h:nat}, HOScalarProd h = HOCompose _ _ (HOReduction _ (+) 0) (HOPointWise _ (.*.) ). Global Instance HCOL_equiv {i o: nat}: Equiv (HOperator i o) := fun a b ⇒ ∀ (x: vector A i), evalHCOL a x = evalHCOL b x. Informally: two operators “a” and “b” are equal if for any input vector “x” the values of (evalHCOL a x) and (evalHCOL b x) are also equal.

Carnegie Mellon Results and Future Directions We completed Axiomatic proofs of the HCOL operator language transformations: 7 breakdown rules 76 Lemmas 2,138 lines of Coq code Next steps to prove:  HCOL ➣ Ʃ-HCOL  Ʃ-HCOL transformations  Ʃ-HCOL ➣ i-Code  i-Code ➣ “C” code generation  “C” code ➣ machine code compilation

Carnegie Mellon THANKS! For more information go to: Contact: