1 Cover Algorithms and Their Combination Sumit Gulwani, Madan Musuvathi Microsoft Research, Redmond.

Slides:



Advertisements
Similar presentations
Model Checking Base on Interoplation
Advertisements

Assertion Checking over Combined Abstraction of Linear Arithmetic and Uninterpreted Functions Sumit Gulwani Microsoft Research, Redmond Ashish Tiwari SRI.
Join Algorithms for the Theory of Uninterpreted Functions Sumit Gulwani Ashish Tiwari George Necula UC-Berkeley SRI UC-Berkeley.
Combining Abstract Interpreters Sumit Gulwani Microsoft Research Redmond, Group Ashish Tiwari SRI RADRAD.
A Randomized Satisfiability Procedure for Arithmetic and Uninterpreted Function Symbols Sumit Gulwani George Necula EECS Department University of California,
A Polynomial-Time Algorithm for Global Value Numbering SAS 2004 Sumit Gulwani George C. Necula.
Path-Sensitive Analysis for Linear Arithmetic and Uninterpreted Functions SAS 2004 Sumit Gulwani George Necula EECS Department University of California,
Program Verification using Probabilistic Techniques Sumit Gulwani Microsoft Research Invited Talk: VSTTE Workshop August 2006 Joint work with George Necula.
Global Value Numbering using Random Interpretation Sumit Gulwani George C. Necula CS Department University of California, Berkeley.
Precise Interprocedural Analysis using Random Interpretation Sumit Gulwani George Necula UC-Berkeley.
Program Analysis using Random Interpretation Sumit Gulwani UC-Berkeley March 2005.
Logical Abstract Interpretation Sumit Gulwani Microsoft Research, Redmond.
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Linked List Implementation class List { private List next; private Object data; private static List root; private static int size; public static void addNew(Object.
SYMBOLIC MODEL CHECKING: STATES AND BEYOND J.R. Burch E.M. Clarke K.L. McMillan D. L. Dill L. J. Hwang Presented by Rehana Begam.
Program Analysis as Constraint Solving Sumit Gulwani (MSR Redmond) Ramarathnam Venkatesan (MSR Redmond) Saurabh Srivastava (Univ. of Maryland) TexPoint.
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
Discovering Affine Equalities Using Random Interpretation Sumit Gulwani George Necula EECS Department University of California, Berkeley.
Lifting Abstract Interpreters to Quantified Logical Domains Sumit Gulwani, MSR Bill McCloskey, UCB Ashish Tiwari, SRI 1.
Program Verification as Probabilistic Inference Sumit Gulwani Nebojsa Jojic Microsoft Research, Redmond.
Assertion Checking Unified Sumit Gulwani Microsoft Research, Redmond Ashish Tiwari SRI.
1 Model Checking, Abstraction- Refinement, and Their Implementation Based on slides by: Orna Grumberg Presented by: Yael Meller June 2008.
Precise Inter-procedural Analysis Sumit Gulwani George C. Necula using Random Interpretation presented by Kian Win Ong UC Berkeley.
Interpolants [Craig 1957] G(y,z) F(x,y)
1 Satisfiability Modulo Theories Sinan Hanay. 2 Boolean Satisfiability (SAT) Is there an assignment to the p 1, p 2, …, p n variables such that  evaluates.
Abstractions. Outline Informal intuition Why do we need abstraction? What is an abstraction and what is not an abstraction A framework for abstractions.
Automated Theorem Proving Lecture 4.   Formula := A |  |    A  Atom := b | t = 0 | t < 0 | t  0 t  Term := c | x | t + t | t – t | ct | Select(m,t)
1 Quantified Formulas Acknowledgement: QBF slides borrowed from S. Malik.
Program Analysis Using Randomization Sumit Gulwani, George Necula (U.C. Berkeley)
CMSC 250 Discrete Structures Number Theory. 20 June 2007Number Theory2 Exactly one car in the plant has color H( a ) := “ a has color”  x  Cars –H(
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Technion 1 (Yet another) decision procedure for Equality Logic Ofer Strichman and Orly Meir Technion.
ECE Synthesis & Verification - L211 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Verification Equivalence checking.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
A two-tier approach for supporting quantifiers in a lazily proof-explicating theorem prover K. Rustan M. Leino Microsoft Research, Redmond Madan Musuvathi.
A Polynomial-Time Algorithm for Global Value Numbering SAS 2004 Sumit Gulwani George C. Necula.
Ofer Strichman, Technion Deciding Combined Theories.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
1 First order theories. 2 Satisfiability The classic SAT problem: given a propositional formula , is  satisfiable ? Example:  Let x 1,x 2 be propositional.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
Dagstuhl Seminar "Applied Deductive Verification" November Symbolically Computing Most-Precise Abstract Operations for Shape.
1 A Combination Method for Generating Interpolants Greta Yorsh Madan Musuvathi Tel Aviv University, Israel Microsoft Research, Redmond, US CAV’05.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
1 Automatic Refinement and Vacuity Detection for Symbolic Trajectory Evaluation Orna Grumberg Technion Haifa, Israel Joint work with Rachel Tzoref.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Lazy Annotation for Program Testing and Verification Speaker: Chen-Hsuan Adonis Lin Advisor: Jie-Hong Roland Jiang November 26,
Integrating high-level constructs into programming languages Language extensions to make programming more productive Underspecified programs –give assertions,
Random Interpretation Sumit Gulwani UC-Berkeley. 1 Program Analysis Applications in all aspects of software development, e.g. Program correctness Compiler.
The decidability of Presburger Arithmetic By Guillermo Guillen 04/13/05 Dr. Smith COT 6421 FIU Spring 2005.
Sullivan Algebra and Trigonometry: Section 1.1 Objectives of this Section Solve an Equation in One Variable Solve a Linear Equation Solve Equations That.
SAT-Based Model Checking Without Unrolling Aaron R. Bradley.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
CS357 Lecture 13: Symbolic model checking without BDDs Alex Aiken David Dill 1.
Relational String Verification Using Multi-track Automata.
Selected Decision Procedures and Techniques for SMT More on combination – theories sharing sets – convex theory Un-interpreted function symbols (quantifier-free.
1 Simulating Reachability using First-Order Logic with Applications to Verification of Linked Data Structures Tal Lev-Ami 1, Neil Immerman 2, Tom Reps.
Deciding Combined Theories Presented by Adi Sosnovich Based on presentation from: Decision Procedures An Algorithmic Point of View Daniel Kroening and.
2009/6/30 CAV Quantifier Elimination via Functional Composition Jie-Hong Roland Jiang Dept. of Electrical Eng. / Grad. Inst. of Electronics Eng.
Computer Systems Laboratory Stanford University Clark W. Barrett David L. Dill Aaron Stump A Framework for Cooperating Decision Procedures.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
Satisfiability Modulo Theories and DPLL(T) Andrew Reynolds March 18, 2015.
Complexity Relief Techniques for Model Checking METU, Aug SOFTWARE VERIFICATION WORKSHOP Hüsnü Yenigün Sabanci University Informatics Institute,
Counterexample-Guided Abstraction Refinement By Edmund Clarke, Orna Grumberg, Somesh Jha, Yuan Lu, and Helmut Veith Presented by Yunho Kim Provable Software.
Decision Procedures in First Order Logic
The Relation Induced by a Partition
CTL model checking algorithms
Satisfiability Modulo Theories
Herbrand Logic Semantics
Presentation transcript:

1 Cover Algorithms and Their Combination Sumit Gulwani, Madan Musuvathi Microsoft Research, Redmond

2 Cover Definition  Cover operation is useful for simplifying a formula by discarding facts related to a set of variables  Given A quantifier-free formula  in theory T A set of symbols V  Cover(, V) is The most-precise quantifier-free formula implied by  that does not involve V e.g. Cover(y=f(a+v)–f(b+v), {v}) : (a=b) ) y=0

3 Cover vs. Quantifier Elimination  Quantifier Elimination: Given a quantified formula, output a logically equivalent quantifier-free formula  9 V  ´ Cover T (,V) if T admits quantifier elimination  Some theories do not: theory of uninterpreted functions Example: f(y) = 0 Cannot say “0 is in the range of f” without using quantifiers  Cover(,V) is the most-precise quantifier-free approximation to 9 V 

4 Applications  Strongest post-condition Useful for abstract interpretation on logical formulas Existential quantification of dead variables SP(, x := e) = 9 x’ ([x’/x] Æ x = e[x’/x])  Image computation Useful for reachability analysis in symbolic model checking Existential quantification of old state variables R i+1 (S) = 9 S’(R i [S’/S] Æ T(S’,S)) Ç R i (S)

5 Applications  Procedure summaries Existential quantification of local variables Useful for interprocedural analysis  Interpolants Suppose A ) B. Then I is the Interpolant(A,B) if  A ) I ) B  I only contains variables common to A and B Cover(A, V A ) is most precise Interpolant(A,B) : Cover( : B, V B ) is least precise Interpolant(A,B)

6 Outline  Symbolic model checking using Cover  Cover algorithm for uninterpreted functions  Cover algorithm for the combination of uninterpreted functions and linear arithmetic

Symbolic Model Checking Algorithm  I(S) : initial states, E(S) : error states  T(S’,S) : transition from old state S’ to new state S  R(S): reachable states R 0 (S) = I(S) R i+1 (S) = 9 S’(R i [S’/S] Æ T(S’,S)) Ç R i (S)  Error found if R n+1 (S) Æ E(S) is satisfiable 7

Symbolic Model Checking Using Cover  I(S) : initial states, E(S) : error states  T(S’,S) : transition from old state S’ to new state S  R(S): reachable states R 0 (S) = I(S) R i+1 (S) = Cover(R i [S’/S] Æ T(S’,S), S’) Ç R i (S) 8

Symbolic Model Checking Using Cover  I(S) : initial states, E(S) : error states  T(S’,S) : transition from old state S’ to new state S  R(S): reachable states R 0 (S) = I(S) R i+1 (S) = Cover(R i [S’/S] Æ T(S’,S), S’) Ç R i (S)  This algorithm can find false errors As Cover over-approximates the set of reachable states 9

Symbolic Model Checking Using Cover  I(S) : initial states, E(S) : error states  T(S’,S) : transition from old state S’ to new state S  R(S): reachable states R 0 (S) = I(S) R i+1 (S) = Cover(R i [S’/S] Æ T(S’,S), S’) Ç R i (S)  Theorem: If the transition system is described using quantifier-free formulas, symbolic model checking using cover is sound and precise 10

11 Outline  Symbolic model checking using Cover  Cover algorithm for uninterpreted functions  Cover algorithm for the combination of uninterpreted functions and linear arithmetic

12 Cover Algorithm for Unary Uninterpreted Functions  Cover(, V) = Erase V from congruence closure of   Example: Let  be x=f(v 1 ) Æ y=f(v 2 ) Æ v 1 = v 2 Cover(, {v 1,v 2 }) is x=y v1v1 f v2v2 f y x

13 Cover Algorithm for Binary Uninterpreted Functions  The erasure technique does not work Let  be x=f(a,v) Æ y=f(b,v) Erasure(, {v}) is true Cover(, {v}) is a=b ) x=y  Cover(, V) is: For all partitions E of congruence classes in  E ) Erasure( Æ E, V)

14 Example x1x1 b1b1 f v x2x2 b2b2 f v a1a1 v y f f f a2a2 v y x1x1 f x1x1 a 1 = b 1 Æ a 2 = b 1 ) y x1x1 f x2x2 a 1 = b 1 Æ a 2 = b 2 ) x2x2 x2x2 y x2x2 f x1x1 a 1 = b 2 Æ a 2 = b 1 ) y fa 1 = b 2 Æ a 2 = b 2 )  Cover(,{v}) Cover(, {v}) can be exponential in 

15 Outline  Cover algorithm for linear arithmetic  Cover algorithm for uninterpreted functions  Cover algorithm for combination of theories

16 Combining Cover Algorithms: Idea 1 Cover T 1 [ T 2 ( 1 Æ  2, V): Return Cover T 1 ( 1,V) Æ Cover T 2 ( 2,V) Fails on x=v 1 +1 Æ y=v 2 +1 Æ v 1 =f(z) Æ v 2 =f(z) Algorithm returns true Cover is x=y Solution: Share variable equalities

17 Combining Cover Algorithms: Idea 2 Cover T 1 [ T 2 ( 1 Æ  2, V): E Ã Saturate( 1, 2 ) Return Cover T 1 ( 1 Æ E,V) Æ Cover T 2 ( 2 Æ E,V) Fails on v=x+1 Æ y=f(v) Algorithm returns true Cover is y=f(x+1) Solution: Share equalities between variables and “simple” terms

18 Combining Cover Algorithms: Idea 3 Cover T 1 [ T 2 ( 1 Æ  2, V): E Ã Saturate( 1, 2 ) Return Cover T 1 ( 1 Æ E,V) Æ Cover T 2 ( 2 Æ E,V) Fails on x · v Æ v · y Æ v=f(z,v) Algorithm returns x · y Cover is x · y Æ (x=y ) x=f(z,x)) Solution: Share conditional equalities

19 Example Cover(y=f(a+v)–f(b+v), {v}) v 1 = a+v v 2 = b+v y = v 3 -v 4 v 3 = f(v 1 ) v 4 = f(v 2 ) a=b ) v 1 =v 2 a=b ) v 3 =v 4 a=b ) y=0 true

20 Conclusion  Cover is the most-precise quantifier-free approximation to quantifier elimination  Cover algorithm for uninterpreted functions  Cover algorithm for combination of theories Exchange equalities between variables and good terms Exchange conditional equalities