Synthesizing from Components: Building from Blocks

Size: px
Start display at page:

Download "Synthesizing from Components: Building from Blocks"

Transcription

1 Synthesizing from Components: Building from Blocks Ashish Tiwari SRI International 333 Ravenswood Ave Menlo Park, CA Joint work with Sumit Gulwani (MSR), Vijay Anand Korthikanti (UIUC), Susmit Jha (UC Berkeley), Sanjit Seshia (UC Berkeley), Thomas Sturm (Munich), Ankur Taly (Stanford), Ramarathnam Venkatesan (MSR) MSR, Redmond Component-based Synthesis: 1

2 Component-Based Synthesis... Problem: How to wire the components to synthesize a desired system? MSR, Redmond Component-based Synthesis: 2

3 Concrete Examples Desired SystemF spec Components f i s sort an array comparators compute x+y 2 modulo arithmetic ops find rightmost one bitwise ops, arithmetic ops compute x 243 accept ω-regular language safe hybrid system geometry construction deobfuscated code verification proof multiplication Buchi automata multiple operating modes ruler-compass steps parts of obfuscated code verification inference rules Question: C : x : F spec (x) = C(f 1,f 2,...)(x) MSR, Redmond Component-based Synthesis: 3

4 Synthesis Problem Classes This is difficult This is ill posed This is too general to be solvable C : x : F spec (x) = C(f 1,f 2,...)(x) Parameters that define the synthesis problem: composition operator C class of specifications F spec class of component specifications f i Fixing the synthesis problem: fix these parameters, fix representation off spec,f i MSR, Redmond Component-based Synthesis: 4

5 Bounded Synthesis The synthesis problem is still hard We make it feasible by replacing the unbounded quantifier, C, by a bounded quantifier C : x : F spec (x) = C(f 1,f 2,...)(x) c : x : F spec (x) = c(f 1,f 2,f 3 )(x),c in some finite set This bounded synthesis problem is solved by deciding the formula MSR, Redmond Component-based Synthesis: 5

6 Straight-Line Program Synthesis composition operator components system function composition primitive functions complex function Bounded synthesis version: fix length of program fix upper bound on number of each component P : x : F spec (x) = P(x), P a straight-line program composingf i s π : x : F spec (x) = f π(1) (f π(2) (f π(3) (x))) MSR, Redmond Component-based Synthesis: 6

7 Example: Straight-Line Program Synthesis Specification: Evaluate polynomial a h 2 +b h+c Budget: two multiplication and two addition operators Finite search space Synthesized Program: 1. o 1 := a h; 2. o 2 := o 1 +b; 3. o 3 := o 2 h; 4. return o 3 +c; Correctness: (a h+b) h+c = a h 2 +b h+c MSR, Redmond Component-based Synthesis: 7

8 Example: Straight-Line Program Synthesis Specification: Turn-off rightmost contiguous 1 bits Example: Budget: two addition and at most four bitwise Boolean operators Finite search space: Also need some constants Synthesized Program: 1. o 1 := x+( 1); 2. o 2 := o 1 x; 3. o 3 := o 2 +1; 4. return o 3 &x; Correctness on sample input: MSR, Redmond Component-based Synthesis: 8

9 Loop-free Program Synthesis composition operator components system function composition primitive functions, if-then-else complex function Bounded synthesis version: fix length of program fix upper bound on number of each component including if-then-else P : x : F spec (x) = P(x), P a straight-line program composingf i s π : x : F spec (x) = f π(ǫ) (f π(1) (f π(11) (x 1 ),f π(12) (x 2,x 1 ))) MSR, Redmond Component-based Synthesis: 9

10 Example: Loop-free Program Synthesis Specification: Obfuscated code Example: We are given if (h(x)) if (x*(x+1)% 2 == 1) y := f(x) else y := g(x) else y := f(g(x)) Components Budget: f, g, h, if-then-else Synthesized Program: o := g(x); if (h(x)) y := o; else y := f(o); Correctness: Equivalence of two loop-free programs MSR, Redmond Component-based Synthesis: 10

11 Loop-free Program Synthesis π : x : F spec (x) = f π(ǫ) (f π(1) (f π(11) (x 1 ),f π(12) (x 2,x 1 ))) Enumerate all possible programs and check Enumerate all permutations π and check Checking if a synthesized program is the desired program is a verification problem Bounded Synthesis := iteratively perform verification But we can learn from failures... MSR, Redmond Component-based Synthesis: 11

12 φ Solvers Bounded Synthesis solving How to solve u : x : φ formulas? A1 Counter-example guided iterative solver A2 Distinguishing input solver Applies even when φ not fully known A3 Numerical solver MSR, Redmond Component-based Synthesis: 12

13 A1: Solving φ Counter-example guided iterative procedure for solving u : x : φ( u, x) 1. Guess u 0 for u 2. (Verification) Check if x : φ( u 0, x) 3. If true, then return u 0 4. Get counterexample x 0, add it tox 5. (Finite Synthesis) Find new u 0 such that u 0 : φ( u 0, x 0 ) x 0 X 6. Go to Step 2 MSR, Redmond Component-based Synthesis: 13

14 A1: Counter-example Guided Iterative Solving Needs a backend quantifier-free solver That can return counterexamples We use an SMT solver The structure of φ, and additional knowledge about what φ encodes, is used optimize the above procedure to expedite convergence Related Work: Sketch, Aha Reference: Synthesis of loop-free programs, PLDI 2011 MSR, Redmond Component-based Synthesis: 14

15 A2: Distinguishing Input Solver Solving u : x : φ( u, x) 1. X := some finite set of choices for x 2. Find two programs that work for X, but differ on some x 0 u 1, u 2, x 0 : ( (φ( u 1, x) φ( u 2, x))) (φ( u 1, x 0 ) φ( u 2, x 0 )) x X 3. If satisfiable, we add x 0 tox and go to (2) 4. If unsatisfiable, then find one program that works for X u 1 : φ( u 1, x) 5. If satisfiable, return u 1 x X 6. Otherwise, return not synthesizable MSR, Redmond Component-based Synthesis: 15

16 A2: Properties of the A2 Solver The second algorithm for solving u : x : φ( u, x) Does not need the full specification of the desired program We only need the knowledge of the specification on the set X Does not perform the verification step An interative implementation of A2: 1. Tool asks user for the expected output on input x 0 2. Tool synthesizes internally two programs that work correctly for X := { x 0 }, but differ on input x 1 3. Tool asks user for the expected output on input x 1 4. Add x 1 tox and repeat MSR, Redmond Component-based Synthesis: 16

17 A3: Nonsymbolic Solver A third algorithm for solving u : x : φ( u, x) 1. Find finite set X of input-output pairs of the specification 2. Synthesize program that works for finite set X 3. Verify the synthesized program on randomly sampled inputs We solved Step (2) using an SMT solver previously We can avoid the SMT solver and instead 1. hierarchical program synthesis: first synthesize high-level components 2. enumerate composition of high-level components guided by goal MSR, Redmond Component-based Synthesis: 17

18 Example: Synthesis Without Symbolic Reasoning Specification: Construct a triangle, given its base, a base angle and sum of the other two sides. Components: Ruler compass constructions Formal specification: Given pointsp 1,p 2 and numbers a,r, find point p φ pre := r > length(p 1,p 2 ) φ post := Angle(p,p 1,p 2 ) = a length(p,p 1 )+length(p,p 2 ) = r Construction: L1 := ConstructLineGivenAngleLine(L,a); C1 := ConstructCircleGivenPointLength(p1,r); (p3,p4) := LineCircleIntersection(L1,C1); L2 := PerpendicularBisector2Points(p2,p3); p5 := LineLineIntersection(L1,L2); MSR, Redmond Component-based Synthesis: 18

19 Example: Geometry Construction Synthesis Step 1 find concrete input-output pair consistent with specification L = Line( 81.62, 99.62, 99.62, ) r = a = 0.81 radians Compute output for this input: p := , Step 2 Start enumerating partial programs built using an extended library Step 3 Evaluate if intermediate objects generated by the partial program are good and try other choices in Step (2) otherwise MSR, Redmond Component-based Synthesis: 19

20 Geometry Construction Synthesis Evaluting effect of making search goal directed Points generated by goal-directed search Points generated by brute-force search depth 0 (Input) depth 1 depth 2 depth 3 depth 4 depth 5 (Output) 100 depth 0 (Input) depth 1 depth 2 depth 3 depth 4 depth 5 depth 6 (Output) y 100 y x x Points visited in a goal-directed search (left) and a brute-force search (right). MSR, Redmond Component-based Synthesis: 20

21 Geometry Construction Synthesis Extended library is forward search Encodes knowledge / concept taught in class Goal directness is backward search Corresponds to reasoning student expected to do Sample input-output points generated using numerical techniques MSR, Redmond Component-based Synthesis: 21

22 Switching Logic Synthesis Given a multimodal dynamical system Synthesize conditions for switching between modes such that some requirements are met MSR, Redmond Component-based Synthesis: 22

23 Example: Driving a Robot 10 The goal is to drive the robot starting from Init to Reach while remaining inside Safe: 3 0 Using the 2 modes: 3 Init := (x [ 1,1], y = 0, v x = 0, v y = 0) Reach := (y 10) Safe := ( x 3) Mode 1: Force applied in(1,1)-direction dx dt = v x, dv x dt = 1 v x, Mode 2: Force applied in( 1,1)-direction dx dt = v x, dv x dt = 1 v x, dy dt = v y, dy dt = v y, dv y dt = 1 v y dv y dt = 1 v y MSR, Redmond Component-based Synthesis: 23

24 Example: Driving a Robot We synthesize a non-deterministic controller: a set of different possible switchings that each satisfy the requirement SafeUReach. Two possible trajectories: Position x= 3 x=3 Alt Position 8 Position y Position x How to discover the correct switching logic? MSR, Redmond Component-based Synthesis: 24

25 Switching Logic Synthesis switching conditions : state variables : correctness We can again bound the search for switching conditions But that is a bad solution Need to go back to verification MSR, Redmond Component-based Synthesis: 25

26 Verification Techniques 1. Reachability-Based Verification 2. Abstraction-Based Verification 3. Certificate-Based Verification Key Observation: Verification = searching for right certificate Property Stability Safety Liveness Witness/Certificate Lyapunov function Inductive Invariant Ranking function MSR, Redmond Component-based Synthesis: 26

27 Certificate-Based Verification Verifying property P in system S := C : C is a certificate forp ins Can do a bounded search for C Also known as the constraint-based approach Certificates for Synthesis Problem: Property Safety Stability Witness/Certificate Controlled Inductive Invariant Controlled Lyapunov function MSR, Redmond Component-based Synthesis: 27

28 Bounded Synthesis of Switching Logic Given multimodal dynamical system, and property Safe: Guess templates for the certificate for controlled-safety Generate the a,b,... : x,y,... : φ Solve the formula to get values for a,b,... MSR, Redmond Component-based Synthesis: 28

29 Solvers Need u : x : φ solvers for the reals We can use the same ideas as before Symbolic Numeric Approach: Symbolic: A combination of QEPCAD, redlog, slfq to eliminate inner Numeric: Gradient descent to findufrom resulting formula Iterative learning: Iteratively prune out u values based on simulations MSR, Redmond Component-based Synthesis: 29

30 Conclusion Synthesis: solving Bounded synthesis: Make problem tractable by making afinite quantification Component-based Synthesis Various approaches to solve depending on application Switching logic synthesis : search for controlled certificates MSR, Redmond Component-based Synthesis: 30

Verification and Synthesis. Using Real Quantifier Elimination. Ashish Tiwari, SRI Intl. Verif. and Synth. Using Real QE: 1

Verification and Synthesis. Using Real Quantifier Elimination. Ashish Tiwari, SRI Intl. Verif. and Synth. Using Real QE: 1 Verification and Synthesis Using Real Quantifier Elimination Thomas Sturm Max-Planck-Institute for Informatik Saarbrucken, Germany sturm@mpi-inf.mpg.de Ashish Tiwari SRI International Menlo Park, USA tiwari@csl.sri.com

More information

Formally Analyzing Adaptive Flight Control

Formally Analyzing Adaptive Flight Control Formally Analyzing Adaptive Flight Control Ashish Tiwari SRI International 333 Ravenswood Ave Menlo Park, CA 94025 Supported in part by NASA IRAC NRA grant number: NNX08AB95A Ashish Tiwari Symbolic Verification

More information

Integrating Induction, Deduction and Structure for Synthesis

Integrating Induction, Deduction and Structure for Synthesis Integrating Induction, Deduction and Structure for Synthesis Sanjit A. Seshia Associate Professor EECS Department UC Berkeley Students & Postdocs: S. Jha, W.Li, A. Donze, L. Dworkin, B. Brady, D. Holcomb,

More information

Teaching vs. Learning, and Course Wrap-Up

Teaching vs. Learning, and Course Wrap-Up Teaching vs. Learning, and Course Wrap-Up Sanjit A. Seshia EECS 219C EECS Department UC Berkeley Teaching vs. Learning Learning: Examples Concept Teaching: Concept Examples Given a concept, give a good

More information

Deductive Verification of Continuous Dynamical Systems

Deductive Verification of Continuous Dynamical Systems Deductive Verification of Continuous Dynamical Systems Dept. of Computer Science, Stanford University (Joint work with Ashish Tiwari, SRI International.) 1 Introduction What are Continuous Dynamical Systems?

More information

Nonlinear Control as Program Synthesis (A Starter)

Nonlinear Control as Program Synthesis (A Starter) Nonlinear Control as Program Synthesis (A Starter) Sicun Gao MIT December 15, 2014 Preliminaries Definition (L RF ) L RF is the first-order language over the reals that allows arbitrary numerically computable

More information

Integrating Induction and Deduction for Verification and Synthesis

Integrating Induction and Deduction for Verification and Synthesis Integrating Induction and Deduction for Verification and Synthesis Sanjit A. Seshia Associate Professor EECS Department UC Berkeley DATE 2013 Tutorial March 18, 2013 Bob s Vision: Exploit Synergies between

More information

Stability and Stabilization of polynomial dynamical systems. Hadi Ravanbakhsh Sriram Sankaranarayanan University of Colorado, Boulder

Stability and Stabilization of polynomial dynamical systems. Hadi Ravanbakhsh Sriram Sankaranarayanan University of Colorado, Boulder Stability and Stabilization of polynomial dynamical systems Hadi Ravanbakhsh Sriram Sankaranarayanan University of Colorado, Boulder Proving Asymptotic Stability: Lyapunov Functions Lyapunov Function:

More information

Synthesizing Switching Logic using Constraint Solving

Synthesizing Switching Logic using Constraint Solving Synthesizing Switching Logic using Constraint Solving Ankur Taly 1, Sumit Gulwani 2, and Ashish Tiwari 3 1 Computer Science Dept., Stanford University ataly@stanford.edu 2 Microsoft Research, Redmond,

More information

HybridSAL Relational Abstracter

HybridSAL Relational Abstracter HybridSAL Relational Abstracter Ashish Tiwari SRI International, Menlo Park, CA. ashish.tiwari@sri.com Abstract. In this paper, we present the HybridSAL relational abstracter a tool for verifying continuous

More information

Computer Science Laboratory, SRI International. Hybrid Systems. Ashish Tiwari SRI International

Computer Science Laboratory, SRI International. Hybrid Systems. Ashish Tiwari SRI International Computer Science Laboratory, SRI International Hybrid Systems Ashish Tiwari SRI International Hybrid Dynamical Systems A hybrid dynamical system consists of hybrid-space: X N n R m That is, some variables

More information

Compositionally Analyzing a Proportional-Integral Controller Family

Compositionally Analyzing a Proportional-Integral Controller Family 2 5th IEEE Conference on Decision and Control and European Control Conference (CDC-ECC) Orlando, FL, USA, December 2-5, 2 Compositionally Analyzing a Proportional-Integral Controller Family Ashish Tiwari

More information

Synthesizing Switching Logic using Constraint Solving

Synthesizing Switching Logic using Constraint Solving Synthesizing Switching Logic using Constraint Solving Ankur Taly 1, Sumit Gulwani 2, and Ashish Tiwari 3 1 Computer Science Dept., Stanford University ataly@stanford.edu 2 Microsoft Research, Redmond,

More information

Symbolic Reachability Analysis of Lazy Linear Hybrid Automata. Susmit Jha, Bryan Brady and Sanjit A. Seshia

Symbolic Reachability Analysis of Lazy Linear Hybrid Automata. Susmit Jha, Bryan Brady and Sanjit A. Seshia Symbolic Reachability Analysis of Lazy Linear Hybrid Automata Susmit Jha, Bryan Brady and Sanjit A. Seshia Traditional Hybrid Automata Traditional Hybrid Automata do not model delay and finite precision

More information

Scalable and Accurate Verification of Data Flow Systems. Cesare Tinelli The University of Iowa

Scalable and Accurate Verification of Data Flow Systems. Cesare Tinelli The University of Iowa Scalable and Accurate Verification of Data Flow Systems Cesare Tinelli The University of Iowa Overview AFOSR Supported Research Collaborations NYU (project partner) Chalmers University (research collaborator)

More information

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39 Bounded Model Checking with SAT/SMT Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39 Recap: Symbolic Model Checking with BDDs Method used by most industrial strength model checkers:

More information

Integrating Induction, Deduction and Structure for Synthesis

Integrating Induction, Deduction and Structure for Synthesis Integrating Induction, Deduction and Structure for Synthesis Sanjit A. Seshia Associate Professor EECS Department UC Berkeley Students: S. Jha, W.Li, L. Dworkin, D. Sadigh Collaborators: A. Tiwari, S.

More information

Compositionally Analyzing a Proportional-Integral Controller Family

Compositionally Analyzing a Proportional-Integral Controller Family Compositionally Analyzing a Proportional-Integral Controller Family Ashish Tiwari Abstract We define always eventually region stability and then formulate the absolute always eventually region stability

More information

Topics in Model-Based Reasoning

Topics in Model-Based Reasoning Towards Integration of Proving and Solving Dipartimento di Informatica Università degli Studi di Verona Verona, Italy March, 2014 Automated reasoning Artificial Intelligence Automated Reasoning Computational

More information

Hoare Logic I. Introduction to Deductive Program Verification. Simple Imperative Programming Language. Hoare Logic. Meaning of Hoare Triples

Hoare Logic I. Introduction to Deductive Program Verification. Simple Imperative Programming Language. Hoare Logic. Meaning of Hoare Triples Hoare Logic I Introduction to Deductive Program Verification Işıl Dillig Program Spec Deductive verifier FOL formula Theorem prover valid contingent Example specs: safety (no crashes), absence of arithmetic

More information

Non-linear Interpolant Generation and Its Application to Program Verification

Non-linear Interpolant Generation and Its Application to Program Verification Non-linear Interpolant Generation and Its Application to Program Verification Naijun Zhan State Key Laboratory of Computer Science, Institute of Software, CAS Joint work with Liyun Dai, Ting Gan, Bow-Yaw

More information

Implan: Scalable Incremental Motion Planning for Multi-Robot Systems

Implan: Scalable Incremental Motion Planning for Multi-Robot Systems Implan: Scalable Incremental Motion Planning for Multi-Robot Systems Indranil Saha UC Berkeley and UPenn Joint work with Rattanachai Ramaithitima (UPenn), Vijay Kumar (UPenn), George Pappas (UPenn) and

More information

ONR MURI AIRFOILS: Animal Inspired Robust Flight with Outer and Inner Loop Strategies. Calin Belta

ONR MURI AIRFOILS: Animal Inspired Robust Flight with Outer and Inner Loop Strategies. Calin Belta ONR MURI AIRFOILS: Animal Inspired Robust Flight with Outer and Inner Loop Strategies Provable safety for animal inspired agile flight Calin Belta Hybrid and Networked Systems (HyNeSs) Lab Department of

More information

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak Computer-Aided Reasoning for Software CSE507 Satisfiability Modulo Theories courses.cs.washington.edu/courses/cse507/18sp/ Emina Torlak emina@cs.washington.edu Today Last lecture Practical applications

More information

UCLID: Deciding Combinations of Theories via Eager Translation to SAT. SAT-based Decision Procedures

UCLID: Deciding Combinations of Theories via Eager Translation to SAT. SAT-based Decision Procedures UCLID: Deciding Combinations of Theories via Eager Translation to SAT Sanjit A. Seshia SAT-based Decision Procedures Input Formula Input Formula Satisfiability-preserving Boolean Encoder Boolean Formula

More information

Algorithmic Verification of Stability of Hybrid Systems

Algorithmic Verification of Stability of Hybrid Systems Algorithmic Verification of Stability of Hybrid Systems Pavithra Prabhakar Kansas State University University of Kansas February 24, 2017 1 Cyber-Physical Systems (CPS) Systems in which software "cyber"

More information

Synthesis and Inductive Learning Part 3

Synthesis and Inductive Learning Part 3 Synthesis and Inductive Learning Part 3 Sanjit A. Seshia EECS Department UC Berkeley Acknowledgments: Susmit Jha, Alexandre Donze, Edward Lee NSF ExCAPE Summer School June 23-25, 2015 Questions of Interest

More information

SMT BASICS WS 2017/2018 ( ) LOGIC SATISFIABILITY MODULO THEORIES. Institute for Formal Models and Verification Johannes Kepler Universität Linz

SMT BASICS WS 2017/2018 ( ) LOGIC SATISFIABILITY MODULO THEORIES. Institute for Formal Models and Verification Johannes Kepler Universität Linz LOGIC SATISFIABILITY MODULO THEORIES SMT BASICS WS 2017/2018 (342.208) Armin Biere Martina Seidl biere@jku.at martina.seidl@jku.at Institute for Formal Models and Verification Johannes Kepler Universität

More information

Sanjit A. Seshia EECS, UC Berkeley

Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Computer-Aided Verification Explicit-State Model Checking: Additional Material Sanjit A. Seshia EECS, UC Berkeley Acknowledgments: G. Holzmann Checking if M satisfies : Steps 1. Compute Buchi

More information

Deductive Verification

Deductive Verification Deductive Verification Mooly Sagiv Slides from Zvonimir Rakamaric First-Order Logic A formal notation for mathematics, with expressions involving Propositional symbols Predicates Functions and constant

More information

FMCAD 2013 Parameter Synthesis with IC3

FMCAD 2013 Parameter Synthesis with IC3 FMCAD 2013 Parameter Synthesis with IC3 A. Cimatti, A. Griggio, S. Mover, S. Tonetta FBK, Trento, Italy Motivations and Contributions Parametric descriptions of systems arise in many domains E.g. software,

More information

Automatic Generation of Polynomial Invariants for System Verification

Automatic Generation of Polynomial Invariants for System Verification Automatic Generation of Polynomial Invariants for System Verification Enric Rodríguez-Carbonell Technical University of Catalonia Talk at EPFL Nov. 2006 p.1/60 Plan of the Talk Introduction Need for program

More information

Constraint Solving for Program Verification: Theory and Practice by Example

Constraint Solving for Program Verification: Theory and Practice by Example Constraint Solving for Program Verification: Theory and Practice by Example Andrey Rybalchenko Technische Universität München Abstract. Program verification relies on the construction of auxiliary assertions

More information

Unbounded, Fully Symbolic Model Checking of Timed Automata using Boolean Methods

Unbounded, Fully Symbolic Model Checking of Timed Automata using Boolean Methods Unbounded, Fully Symbolic Model Checking of Timed Automata using Boolean Methods Sanjit A. Seshia and Randal E. Bryant Computer Science Department Carnegie Mellon University Verifying Timed Embedded Systems

More information

Termination Analysis of Loops

Termination Analysis of Loops Termination Analysis of Loops Zohar Manna with Aaron R. Bradley Computer Science Department Stanford University 1 Example: GCD Algorithm gcd(y 1, y 2 ) = gcd(y 1 y 2, y 2 ) if y 1 > y 2 gcd(y 1, y 2 y

More information

Quantifiers. Leonardo de Moura Microsoft Research

Quantifiers. Leonardo de Moura Microsoft Research Quantifiers Leonardo de Moura Microsoft Research Satisfiability a > b + 2, a = 2c + 10, c + b 1000 SAT a = 0, b = 3, c = 5 Model 0 > 3 + 2, 0 = 2 5 + 10, 5 + ( 3) 1000 Quantifiers x y x > 0 f x, y = 0

More information

Tutorial 1: Modern SMT Solvers and Verification

Tutorial 1: Modern SMT Solvers and Verification University of Illinois at Urbana-Champaign Tutorial 1: Modern SMT Solvers and Verification Sayan Mitra Electrical & Computer Engineering Coordinated Science Laboratory University of Illinois at Urbana

More information

or simply: IC3 A Simplified Description

or simply: IC3 A Simplified Description Incremental Construction of Inductive Clauses for Indubitable Correctness or simply: IC3 A Simplified Description Based on SAT-Based Model Checking without Unrolling Aaron Bradley, VMCAI 2011 Efficient

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems Sanjit A. Seshia UC Berkeley EECS 149/249A Fall 2015 2008-2015: E. A. Lee, A. L. Sangiovanni-Vincentelli, S. A. Seshia. All rights reserved. Chapter 13: Specification and

More information

a > 3, (a = b a = b + 1), f(a) = 0, f(b) = 1

a > 3, (a = b a = b + 1), f(a) = 0, f(b) = 1 Yeting Ge New York University Leonardo de Moura Microsoft Research a > 3, (a = b a = b + 1), f(a) = 0, f(b) = 1 Dynamic symbolic execution (DART) Extended static checking Test-case generation Bounded model

More information

Motion planning applications of Satisfiability Modulo Convex Optimization

Motion planning applications of Satisfiability Modulo Convex Optimization Motion planning applications of Satisfiability Modulo Convex Optimization Yasser Shoukry (1) and Paulo Tabuada (2) (1) Department of Electrical and Computer Engineering, UMD (2) Electrical and Computer

More information

Verifying Safety Properties of Hybrid Systems.

Verifying Safety Properties of Hybrid Systems. Verifying Safety Properties of Hybrid Systems. Sriram Sankaranarayanan University of Colorado, Boulder, CO. October 22, 2010. Talk Outline 1. Formal Verification 2. Hybrid Systems 3. Invariant Synthesis

More information

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Discrete Systems Lecture: Automata, State machines, Circuits Stavros Tripakis University of California, Berkeley Stavros

More information

Interpolation and Symbol Elimination in Vampire

Interpolation and Symbol Elimination in Vampire Interpolation and Symbol Elimination in Vampire Kryštof Hoder 1, Laura Kovács 2, and Andrei Voronkov 1 1 University of Manchester 2 TU Vienna Abstract. It has recently been shown that proofs in which some

More information

The Impact of Craig s Interpolation Theorem. in Computer Science

The Impact of Craig s Interpolation Theorem. in Computer Science The Impact of Craig s Interpolation Theorem in Computer Science Cesare Tinelli tinelli@cs.uiowa.edu The University of Iowa Berkeley, May 2007 p.1/28 The Role of Logic in Computer Science Mathematical logic

More information

Complexity and algorithms for monomial and clausal predicate abstraction

Complexity and algorithms for monomial and clausal predicate abstraction Complexity and algorithms for monomial and clausal predicate abstraction Shuvendu K. Lahiri and Shaz Qadeer Microsoft Research Abstract. In this paper, we investigate the asymptotic complexity of various

More information

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms First-Order Logic 1 Syntax Domain of Discourse The domain of discourse for first order logic is FO structures or models. A FO structure contains Relations Functions Constants (functions of arity 0) FO

More information

The TLA + proof system

The TLA + proof system The TLA + proof system Stephan Merz Kaustuv Chaudhuri, Damien Doligez, Leslie Lamport INRIA Nancy & INRIA-MSR Joint Centre, France Amir Pnueli Memorial Symposium New York University, May 8, 2010 Stephan

More information

Sciduction: Combining Induction, Deduction, and Structure for Verification and Synthesis

Sciduction: Combining Induction, Deduction, and Structure for Verification and Synthesis Sciduction: Combining Induction, Deduction, and Structure for Verification and Synthesis Sanjit A. Seshia Electrical Engineering and Computer Sciences University of California at Berkeley Technical Report

More information

Intelligent Tutoring Systems A Logical Perspective

Intelligent Tutoring Systems A Logical Perspective Intelligent Tutoring Systems A Logical Perspective Sumit Gulwani Microsoft Research, Redmond July 2012 Background: Program Synthesis Application domain Software Developers End-Users Education Specification

More information

Ivy: Safety Verification by Interactive Generalization

Ivy: Safety Verification by Interactive Generalization Ivy: Safety Verification by Interactive Generalization Oded Padon Verification Day 1-June-2016 [PLDI 16] Oded Padon, Kenneth McMillan, Aurojit Panda, Mooly Sagiv, Sharon Shoham. Ivy: Safety Verification

More information

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008 WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008 WHAT I LL TALK ABOUT Propositional Logic Terminology, Satisfiability, Decision Procedure First-Order Logic Terminology, Background Theories Satisfiability

More information

1 Computational Problems

1 Computational Problems Stanford University CS254: Computational Complexity Handout 2 Luca Trevisan March 31, 2010 Last revised 4/29/2010 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation

More information

The Polyranking Principle

The Polyranking Principle The Polyranking Principle Aaron R. Bradley, Zohar Manna, and Henny B. Sipma Computer Science Department Stanford University Stanford, CA 94305-9045 {arbrad,zm,sipma}@theory.stanford.edu Abstract. Although

More information

Floyd-Hoare Style Program Verification

Floyd-Hoare Style Program Verification Floyd-Hoare Style Program Verification Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 9 Feb 2017 Outline of this talk 1 Overview 2 Hoare Triples 3

More information

Logical Abstract Domains and Interpretations

Logical Abstract Domains and Interpretations Logical Abstract Domains and Interpretations Patrick Cousot 2,3, Radhia Cousot 3,1, and Laurent Mauborgne 3,4 1 Centre National de la Recherche Scientifique, Paris 2 Courant Institute of Mathematical Sciences,

More information

Introduction to Z3. Bow-Yaw Wang. December 19, Institute of Information Science Academia Sinica, Taiwan

Introduction to Z3. Bow-Yaw Wang. December 19, Institute of Information Science Academia Sinica, Taiwan Introduction to Z3 Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan December 19, 2017 Bow-Yaw Wang (Academia Sinica) Introduction to Z3 December 19, 2017 1 / 26 Outline 1 Introduction

More information

Incremental Proof-Based Verification of Compiler Optimizations

Incremental Proof-Based Verification of Compiler Optimizations Incremental Proof-Based Verification of Compiler Optimizations Grigory Fedyukovich joint work with Arie Gurfinkel and Natasha Sharygina 5 of May, 2015, Attersee, Austria counter-example change impact Big

More information

Notes for Lecture Notes 2

Notes for Lecture Notes 2 Stanford University CS254: Computational Complexity Notes 2 Luca Trevisan January 11, 2012 Notes for Lecture Notes 2 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation

More information

Abstractions and Decision Procedures for Effective Software Model Checking

Abstractions and Decision Procedures for Effective Software Model Checking Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture

More information

The Eager Approach to SMT. Eager Approach to SMT

The Eager Approach to SMT. Eager Approach to SMT The Eager Approach to SMT Sanjit A. Seshia UC Berkeley Slides based on ICCAD 09 Tutorial Eager Approach to SMT Input Formula Satisfiability-preserving Boolean Encoder Boolean Formula SAT Solver SAT Solver

More information

Algebra II. In this technological age, mathematics is more important than ever. When students

Algebra II. In this technological age, mathematics is more important than ever. When students In this technological age, mathematics is more important than ever. When students leave school, they are more and more likely to use mathematics in their work and everyday lives operating computer equipment,

More information

Formal Inductive Synthesis -- Theory and Applications

Formal Inductive Synthesis -- Theory and Applications Formal Inductive Synthesis -- Theory and Applications Sanjit A. Seshia Professor EECS Department UC Berkeley Acknowledgments to several Ph.D. students, postdoctoral researchers, and collaborators, and

More information

Controller Synthesis for Hybrid Systems using SMT Solving

Controller Synthesis for Hybrid Systems using SMT Solving Controller Synthesis for Hybrid Systems using SMT Solving Ulrich Loup AlgoSyn (GRK 1298) Hybrid Systems Group Prof. Dr. Erika Ábrahám GRK Workshop 2009, Schloss Dagstuhl Our model: hybrid system Discrete

More information

Decision Procedure Based Discovery of Rare Behaviors in Stochastic Differential Equation Models of Biological Systems

Decision Procedure Based Discovery of Rare Behaviors in Stochastic Differential Equation Models of Biological Systems Decision Procedure Based Discovery of Rare Behaviors in Stochastic Differential Equation Models of Biological Systems Arup K. Ghosh, Faraz Hussain, Sumit K. Jha EECS Department University of Central Florida

More information

Satisfiability Modulo Theories (SMT)

Satisfiability Modulo Theories (SMT) CS510 Software Engineering Satisfiability Modulo Theories (SMT) Slides modified from those by Aarti Gupta Textbook: The Calculus of Computation by A. Bradley and Z. Manna 1 Satisfiability Modulo Theory

More information

Property Directed Equivalence via Abstract Simulation. Grigory Fedyukovich, Arie Gurfinkel, and Natasha Sharygina

Property Directed Equivalence via Abstract Simulation. Grigory Fedyukovich, Arie Gurfinkel, and Natasha Sharygina Property Directed Equivalence via Abstract Simulation Grigory Fedyukovich, Arie Gurfinkel, and Natasha Sharygina CAV, Jul 23, 2016 Motivation / Goals Little Leaks Add Up to Big Bills software safety must

More information

Specification Mining of Industrial-scale Control Systems

Specification Mining of Industrial-scale Control Systems 100 120 Specification Mining of Industrial-scale Control Systems Alexandre Donzé Joint work with Xiaoqing Jin, Jyotirmoy V. Deshmuck, Sanjit A. Seshia University of California, Berkeley May 14, 2013 Alexandre

More information

LOGIC PROPOSITIONAL REASONING

LOGIC PROPOSITIONAL REASONING LOGIC PROPOSITIONAL REASONING WS 2017/2018 (342.208) Armin Biere Martina Seidl biere@jku.at martina.seidl@jku.at Institute for Formal Models and Verification Johannes Kepler Universität Linz Version 2018.1

More information

Equivalence Checking of Sequential Circuits

Equivalence Checking of Sequential Circuits Equivalence Checking of Sequential Circuits Sanjit Seshia EECS UC Berkeley With thanks to K. Keutzer, R. Rutenbar 1 Today s Lecture What we know: How to check two combinational circuits for equivalence

More information

Abstractions for Hybrid Systems

Abstractions for Hybrid Systems Abstractions for Hybrid Systems Ashish Tiwari (tiwari@csl.sri.com) SRI International, 333 Ravenswood Ave, Menlo Park, CA, U.S.A Abstract. We present a procedure for constructing sound finite-state discrete

More information

Satisfiability Modulo Theories

Satisfiability Modulo Theories Satisfiability Modulo Theories Summer School on Formal Methods Menlo College, 2011 Bruno Dutertre and Leonardo de Moura bruno@csl.sri.com, leonardo@microsoft.com SRI International, Microsoft Research SAT/SMT

More information

Notes. Corneliu Popeea. May 3, 2013

Notes. Corneliu Popeea. May 3, 2013 Notes Corneliu Popeea May 3, 2013 1 Propositional logic Syntax We rely on a set of atomic propositions, AP, containing atoms like p, q. A propositional logic formula φ Formula is then defined by the following

More information

NP-completeness. Chapter 34. Sergey Bereg

NP-completeness. Chapter 34. Sergey Bereg NP-completeness Chapter 34 Sergey Bereg Oct 2017 Examples Some problems admit polynomial time algorithms, i.e. O(n k ) running time where n is the input size. We will study a class of NP-complete problems

More information

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem. 1 More on NP In this set of lecture notes, we examine the class NP in more detail. We give a characterization of NP which justifies the guess and verify paradigm, and study the complexity of solving search

More information

Information Flow Analysis via Path Condition Refinement

Information Flow Analysis via Path Condition Refinement Information Flow Analysis via Path Condition Refinement Mana Taghdiri, Gregor Snelting, Carsten Sinz Karlsruhe Institute of Technology, Germany FAST September 16, 2010 KIT University of the State of Baden-Wuerttemberg

More information

Taming Past LTL and Flat Counter Systems

Taming Past LTL and Flat Counter Systems Taming Past LTL and Flat Counter Systems Amit Kumar Dhar LIAFA, Univ Paris Diderot, Paris Cité Sorbonne, CNRS, France April 2, 2012 Joint work with : Stéphane Demri(LSV) and Arnaud Sangnier(LIAFA) LIAFA

More information

20.1 2SAT. CS125 Lecture 20 Fall 2016

20.1 2SAT. CS125 Lecture 20 Fall 2016 CS125 Lecture 20 Fall 2016 20.1 2SAT We show yet another possible way to solve the 2SAT problem. Recall that the input to 2SAT is a logical expression that is the conunction (AND) of a set of clauses,

More information

Combinations of Theories for Decidable Fragments of First-order Logic

Combinations of Theories for Decidable Fragments of First-order Logic Combinations of Theories for Decidable Fragments of First-order Logic Pascal Fontaine Loria, INRIA, Université de Nancy (France) Montreal August 2, 2009 Montreal, August 2, 2009 1 / 15 Context / Motivation

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems Edward A. Lee & Sanjit A. Seshia UC Berkeley EECS 124 Spring 2008 Copyright 2008, Edward A. Lee & Sanjit A. Seshia, All rights reserved Lecture 6: Modeling Modal Behavior,

More information

Lecture 2 Automata Theory

Lecture 2 Automata Theory Lecture 2 Automata Theory Ufuk Topcu Nok Wongpiromsarn Richard M. Murray Outline: Transition systems Linear-time properties Regular propereties EECI, 14 May 2012 This short-course is on this picture applied

More information

Topic 17. Analysis of Algorithms

Topic 17. Analysis of Algorithms Topic 17 Analysis of Algorithms Analysis of Algorithms- Review Efficiency of an algorithm can be measured in terms of : Time complexity: a measure of the amount of time required to execute an algorithm

More information

Constraint Solving for Program Verification: Theory and Practice by Example

Constraint Solving for Program Verification: Theory and Practice by Example Constraint Solving for Program Verification: Theory and Practice by Example Andrey Rybalchenko Technische Universität München Abstract. Program verification relies on the construction of auxiliary assertions

More information

Discrete abstractions of hybrid systems for verification

Discrete abstractions of hybrid systems for verification Discrete abstractions of hybrid systems for verification George J. Pappas Departments of ESE and CIS University of Pennsylvania pappasg@ee.upenn.edu http://www.seas.upenn.edu/~pappasg DISC Summer School

More information

Polynomial-Time Verification of PCTL Properties of MDPs with Convex Uncertainties and its Application to Cyber-Physical Systems

Polynomial-Time Verification of PCTL Properties of MDPs with Convex Uncertainties and its Application to Cyber-Physical Systems Polynomial-Time Verification of PCTL Properties of MDPs with Convex Uncertainties and its Application to Cyber-Physical Systems Alberto Puggelli DREAM Seminar - November 26, 2013 Collaborators and PIs:

More information

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino Formal Verification Techniques Riccardo Sisto, Politecnico di Torino State exploration State Exploration and Theorem Proving Exhaustive exploration => result is certain (correctness or noncorrectness proof)

More information

Synthesizing Switching Logic for Safety and Dwell-Time Requirements

Synthesizing Switching Logic for Safety and Dwell-Time Requirements Synthesizing Switching Logic for Safety and Dwell-Time Requirements Susmit Jha UC Berkeley jha@eecs.berkeley.edu Sumit Gulwani Microsoft Research sumitg@microsoft.com Sanjit A. Seshia UC Berkeley sseshia@eecs.berkeley.edu

More information

Representing Arithmetic Constraints with Finite Automata: An Overview

Representing Arithmetic Constraints with Finite Automata: An Overview Representing Arithmetic Constraints with Finite Automata: An Overview Bernard Boigelot Pierre Wolper Université de Liège Motivation Linear numerical constraints are a very common and useful formalism (our

More information

Logic and Automata I. Wolfgang Thomas. EATCS School, Telc, July 2014

Logic and Automata I. Wolfgang Thomas. EATCS School, Telc, July 2014 Logic and Automata I EATCS School, Telc, July 2014 The Plan We present automata theory as a tool to make logic effective. Four parts: 1. Some history 2. Automata on infinite words First step: MSO-logic

More information

Computation and Inference

Computation and Inference Computation and Inference N. Shankar Computer Science Laboratory SRI International Menlo Park, CA July 13, 2018 Length of the Longest Increasing Subsequence You have a sequence of numbers, e.g., 9, 7,

More information

Symbolic Computation and Theorem Proving in Program Analysis

Symbolic Computation and Theorem Proving in Program Analysis Symbolic Computation and Theorem Proving in Program Analysis Laura Kovács Chalmers Outline Part 1: Weakest Precondition for Program Analysis and Verification Part 2: Polynomial Invariant Generation (TACAS

More information

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for?

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for? Computer Engineering and Networks Overview Discrete Event Systems Verification of Finite Automata Lothar Thiele Introduction Binary Decision Diagrams Representation of Boolean Functions Comparing two circuits

More information

Quadratics and Other Polynomials

Quadratics and Other Polynomials Algebra 2, Quarter 2, Unit 2.1 Quadratics and Other Polynomials Overview Number of instructional days: 15 (1 day = 45 60 minutes) Content to be learned Know and apply the Fundamental Theorem of Algebra

More information

Relational Abstractions For Continuous and Hybrid Systems

Relational Abstractions For Continuous and Hybrid Systems Relational Abstractions For Continuous and Hybrid Systems Sriram Sankaranarayanan 1 and Ashish Tiwari 2 1. University of Colorado, Boulder, CO. srirams@colorado.edu 2. SRI International, Menlo Park, CA.

More information

CS357: CTL Model Checking (two lectures worth) David Dill

CS357: CTL Model Checking (two lectures worth) David Dill CS357: CTL Model Checking (two lectures worth) David Dill 1 CTL CTL = Computation Tree Logic It is a propositional temporal logic temporal logic extended to properties of events over time. CTL is a branching

More information

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Discrete Systems Lecture: State-Space Exploration Stavros Tripakis University of California, Berkeley Stavros Tripakis:

More information

CSC 8301 Design & Analysis of Algorithms: Lower Bounds

CSC 8301 Design & Analysis of Algorithms: Lower Bounds CSC 8301 Design & Analysis of Algorithms: Lower Bounds Professor Henry Carter Fall 2016 Recap Iterative improvement algorithms take a feasible solution and iteratively improve it until optimized Simplex

More information

Reduced Ordered Binary Decision Diagrams

Reduced Ordered Binary Decision Diagrams Reduced Ordered Binary Decision Diagrams Lecture #13 of Advanced Model Checking Joost-Pieter Katoen Lehrstuhl 2: Software Modeling & Verification E-mail: katoen@cs.rwth-aachen.de June 5, 2012 c JPK Switching

More information

From Electrical Switched Networks to Hybrid Automata. Alessandro Cimatti 1, Sergio Mover 2, Mirko Sessa 1,3

From Electrical Switched Networks to Hybrid Automata. Alessandro Cimatti 1, Sergio Mover 2, Mirko Sessa 1,3 1 2 3 From Electrical Switched Networks to Hybrid Automata Alessandro Cimatti 1, Sergio Mover 2, Mirko Sessa 1,3 Multidomain physical systems Multiple physical domains: electrical hydraulic mechanical

More information

Automatic Synthesis of Distributed Protocols

Automatic Synthesis of Distributed Protocols Automatic Synthesis of Distributed Protocols Rajeev Alur Stavros Tripakis 1 Introduction Protocols for coordination among concurrent processes are an essential component of modern multiprocessor and distributed

More information