Computer Systems Laboratory Stanford University Clark W. Barrett David L. Dill Aaron Stump A Framework for Cooperating Decision Procedures.

Slides:



Advertisements
Similar presentations
Assertion Checking over Combined Abstraction of Linear Arithmetic and Uninterpreted Functions Sumit Gulwani Microsoft Research, Redmond Ashish Tiwari SRI.
Advertisements

A Randomized Satisfiability Procedure for Arithmetic and Uninterpreted Function Symbols Sumit Gulwani George Necula EECS Department University of California,
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?
Checking Validity of Quantifier-Free Formulas in Combinations of First-Order Theories Clark W. Barrett Ph.D. Dissertation Defense Department of Computer.
2005conjunctive-ii1 Query languages II: equivalence & containment (Motivation: rewriting queries using views)  conjunctive queries – CQ’s  Extensions.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
An Open-Source, Object-Oriented General Cartographic Transformation Program (GCTP) Michael S. Williams, Michael P. Finn*, and Robert A. Buehler** United.
Deciding Equality with Uninterpreted Functions using Congruence Closure Constantinos Bartzis.
1 Conditional XPath, the first order complete XPath dialect Maarten Marx Presented by: Einav Bar-Ner.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Plan for today Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
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.
1 Deciding separation formulas with SAT Ofer Strichman Sanjit A. Seshia Randal E. Bryant School of Computer Science, Carnegie Mellon University.
The Theory of NP-Completeness
` ² Q E D I Nelson-Oppen review
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
Introduction to Optimization Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved.
1 A propositional world Ofer Strichman School of Computer Science, Carnegie Mellon University.
1 A Combination Method for Generating Interpolants by G. Yorsh and M. Masuvathi Presentation by: Emilia Katz.
ECE 667 Synthesis and Verification of Digital Systems
Ofer Strichman, Technion 1 Decision Procedures in First Order Logic Part II – Equality Logic and Uninterpreted Functions.
Course eval results More applications Last question –Luging: 0.5 –Curling: 1.5 –Figure skating: 2 –Ice fishing: 6.5 –Foosball: 0.5.
Ofer Strichman, Technion Deciding Combined Theories.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
Introduction to Computer Science. A Quick Puzzle Well-Formed Formula  any formula that is structurally correct  may be meaningless Axiom  A statement.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
CMU, Oct 4 DPLL-based Checkers for Satisfiability Modulo Theories Cesare Tinelli Department of Computer Science The University of Iowa Joint work with.
1 A Combination Method for Generating Interpolants Greta Yorsh Madan Musuvathi Tel Aviv University, Israel Microsoft Research, Redmond, US CAV’05.
1 MVD 2010 University of Iowa New York University Comparing Proof Systems for Linear Real Arithmetic Using LFSC Andrew Reynolds September 17, 2010.
In section 11.9, we were able to find power series representations for a certain restricted class of functions. Here, we investigate more general problems.
Algorithms for SAT Based on Search in Hamming Balls Author : Evgeny Dantsin, Edward A. Hirsch, and Alexander Wolpert Speaker : 羅正偉.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. 2.6 Solving Equations: The Addition and Multiplication Properties.
CSE Winter 2008 Introduction to Program Verification January 31 proofs through simplification.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Function Definition by Cases and Recursion Lecture 2, Programmeringsteknik del A.
Lesson 1.4 Equations and Inequalities Goal: To learn how to solve equations and check solutions of equations and inequalities.
Math 20-1 Chapter 5 Radical Expressions and Equations
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
Random Interpretation Sumit Gulwani UC-Berkeley. 1 Program Analysis Applications in all aspects of software development, e.g. Program correctness Compiler.
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
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.
1 2/21/2016 MATH 224 – Discrete Mathematics Sequences and Sums A sequence of the form ar 0, ar 1, ar 2, ar 3, ar 4, …, ar n, is called a geometric sequence.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Deciding Combined Theories Presented by Adi Sosnovich Based on presentation from: Decision Procedures An Algorithmic Point of View Daniel Kroening and.
Extension of Separation Logic for Stack Reasoning Jiang Xinyu.
2009/6/30 CAV Quantifier Elimination via Functional Composition Jie-Hong Roland Jiang Dept. of Electrical Eng. / Grad. Inst. of Electronics Eng.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
COMP 412, FALL Type Systems C OMP 412 Rice University Houston, Texas Fall 2000 Copyright 2000, Robert Cartwright, all rights reserved. Students.
1.7: Adding Like Terms TERM: A number, a variable, or the product of the two.Ex: a, 3x, 2x, 5, CONSTANT: a term with no variable (number) Ex: 4, -1, 6,
Satisfiability Modulo Theories and DPLL(T) Andrew Reynolds March 18, 2015.
Decision Procedures in First Order Logic
Chapter 10 NP-Complete Problems.
Introduction to Optimization
Satisfiability Modulo Theories
Propositional Calculus: Boolean Algebra and Simplification
Introduction to Optimization
Elementary Metamathematics
Dr. Clincy Professor of CS
Logics for Data and Knowledge Representation
Introduction to Optimization
Copyright © 2017, 2013, 2009 Pearson Education, Inc.
Presentation transcript:

Computer Systems Laboratory Stanford University Clark W. Barrett David L. Dill Aaron Stump A Framework for Cooperating Decision Procedures

Outline Motivation The Framework Correctness of the Framework Using the Framework Conclusions

The Need for Decision Procedures Many interesting and practical problems can be expressed as problems in a decidable theory. General purpose decision procedures can save time and effort when approaching new problems. Decision procedures have been used in theorem proving, model checking, symbolic simulation, system specification, and other applications, many of which were unanticipated.

The Stanford Validity Checker (SVC) This work is a result of ongoing attempts to improve the decision procedures of SVC. Despite theoretical and architectural weaknesses, SVC has been surprisingly successful. Our goals with SVC include the following:  Provably correct,  Adequately expressive, yet still decidable,  Flexible and easy to extend,  Maximum performance.

SVC Core: Cooperating Decision Procedures Suppose are decidable theories, with disjoint signatures Let and  is a quantifier-free formula in the language of . Is  satisfiable in the theory

Cooperating Decision Procedures Two main approaches  Nelson and Oppen [‘79]  Shostak [‘84] Original papers are confusing and incomplete.  [Tinelli & Harandi ‘96]  [Cyrluk et al. ‘96, Shankar & Ruess ‘00] This work seeks to unify and further clarify these two approaches.

Outline Motivation The Framework Correctness of the Framework Using the Framework Conclusions

Preliminaries Expressions  DAG representation of terms and formulas.  Operator applied to 0 or more children. Union-Find  Each expression (including Boolean constants true and false) belongs to an equivalence class with a unique representative.  Find(x) returns the equivalence class representative of x.  Union(x,y) merges the equivalence classes associated with x and y and makes y the new representative.

Framework Interface AddFormula(  ) (  a literal in  )  C := C  {  }; (Initially, C = Ø) Satisfiable()  Returns TRUE iff Find(true)  Find(false). Satisfiability of an arbitrary formula  in  is determined by converting  to DNF and then testing each conjunct for satisfiability.

The Framework AddFormula AssertSimplify Setup MergeRewrite    ’’ Theory-specific code a=b a,b t t’ t t a=b Propagate

AddFormula and Assert Assert(  ) processes the formula  by first simplifying it and then calling Merge. AddFormula is a wrapper around Assert which allows each theory to assert new facts. AddFormula(  ) Assert(  ); REPEAT FOREACH theory i DO Propagate(i); UNTIL no change; Assert(  )  ’ := Simplify(  ); IF  ’ not an equation THEN  ’ := (  ’ = true); Merge(  ’);

The Framework AddFormula AssertSimplify Setup MergeRewrite    ’’ Theory-specific code a=b a,b t t’ t t a=b Propagate

Simplify and Rewrite Simplify returns an expression which is equivalent in the current context.  Recursively replaces each sub-expression with its equivalence class representative.  Applies theory-specific rewrites. Simplify(  ) IF Find(  ) THEN RETURN Find(  );  ’ := Simplify each child of  ;  ’ := Rewrite(  ’); RETURN  ’; Rewrite(t) t’ := TheoryRewrite(t); IF t  t’ THEN t’ := Rewrite(t’); RETURN t’;

The Framework AddFormula AssertSimplify Setup MergeRewrite    ’’ Theory-specific code a=b a,b t t’ t t a=b Propagate

Setup and Merge Merge records that two expressions a and b are equal by merging their equivalence classes.  Calls Setup on each expression.  Notifies theories that care about a. Merge(a=b) Setup(a);Setup(b); Union(a,b); FOREACH  a.notify Call f(a=b,d); Setup(t) IF Find(t) THEN RETURN; FOREACH child c Setup(c); TheorySetup(c); Find(c) := c;

A Simple Example AddFormula AssertSimplify Setup MergeRewrite    ’’ Theory-specific code a=b a,b t t’ t t a=b Propagate a = b b = b b = b  true true Find(a) = b

Outline Motivation The Framework Correctness of the Framework Using the Framework Conclusions

Approach to Correctness Develop a set of preconditions and requirements that must hold for the framework to be correct. Prove that, as long as the code associated with individual theories adheres to these general requirements, the framework is correct. Prove the main theorems once, then prove a small set of theorems each time a theory is added.

Example: Completeness Theorem [Tinelli et al. ‘96]: Let T 1 and T 2 be two disjoint theories and let  1 be a formula in the language of T 1 and  2 a formula in the language of T 2. Let V be the set of their shared variables and let  (V) be an arrangement of V. If  1   (V) is satisfiable in T 1 and  2   (V) is satisfiable in T 2, then  1   2 is satisfiable in T 1  T 2.

Example: Completeness Every formula recorded by Merge is associated with an individual theory. Each theory T i determines whether the conjunction of its formulas together with the arrangement of shared variables induced by the expression equivalence classes is satisfiable in T i. By application of the previous theorem, we can then determine whether the conjunction of all formulas recorded by Merge is satisfiable.

Outline Motivation The Framework Correctness of the Framework Using the Framework Conclusions

The Framework AddFormula AssertSimplify Setup MergeRewrite    ’’ Theory-specific code a=b a,b t t’ t t a=b Propagate

Nelson-Oppen Style Combinations Input formulas are transformed into equivalent formulas, each of which is in a single theory. Suppose f and g are symbols from two different theories. Each theory must determine whether any equalities between (shared) variables are entailed by its formulas and propagate these equalities.

Our Approach to Nelson-Oppen The flexible nature of the framework allows us to directly implement and prove correctness of a more efficient algorithm:  Don’t transform the formulas or introduce new variables. It is sufficient to partition the formulas and mark which terms are “used” by more than one theory.  Only propagate equalities between terms used by more than one theory, and only to theories which use the left side of the equality.

Nelson-Oppen Example Combines three theories:  Uninterpreted functions  Arithmetic with inequalities  Arrays

Nelson-Oppen Example AddFormula AssertSimplify Setup MergeRewrite   ’’ a=b a,b t t’ t t a=b Propagate UninterpretedArithmeticArrays

Shostak Style Combinations More efficient than Nelson-Oppen, but not as widely applicable. Only applies to theories which are canonizable and algebraically solvable. Input formulas are solved for a single variable. No need to propagate equalities.

Our Approach to Shostak Use theory-specific Rewrite code to solve and canonize formulas. Both Shostak and Nelson-Oppen style theories can be integrated in the same framework. Proof of correctness is easier than in other treatments of Shostak because we can treat uninterpreted functions as belonging to a separate Nelson-Oppen style theory.

Outline Motivation The Framework Correctness of the Framework Using the Framework Conclusions

What Have We Learned?  There is a demand for efficient cooperating decision procedures.  Getting it right is hard.  A solid theoretical foundation is necessary. Future Work  The next version of SVC is under development.  New theories.  Relax restrictions on what kinds of theories can be integrated.

Stay tuned Visit the SVC home page at