Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.

Slides:



Advertisements
Similar presentations
Model Checking Lecture 4. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Advertisements

Logical Abstract Interpretation Sumit Gulwani Microsoft Research, Redmond.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
On Solving Presburger and Linear Arithmetic with SAT Ofer Strichman Carnegie Mellon University.
Technion 1 Generating minimum transitivity constraints in P-time for deciding Equality Logic Ofer Strichman and Mirron Rozanov Technion, Haifa, Israel.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View SAT.
1/30 SAT Solver Changki PSWLAB SAT Solver Daniel Kroening, Ofer Strichman.
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:
Plan for today Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search.
Carnegie Mellon University Boolean Satisfiability with Transitivity Constraints Boolean Satisfiability with Transitivity Constraints
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
Ofer Strichman, Technion 1 Decision Procedures in First Order Logic Part III – Decision Procedures for Equality Logic and Uninterpreted Functions.
1 Deciding separation formulas with SAT Ofer Strichman Sanjit A. Seshia Randal E. Bryant School of Computer Science, Carnegie Mellon University.
Technion 1 Generating minimum transitivity constraints in P-time for deciding Equality Logic Ofer Strichman and Mirron Rozanov Technion, Haifa, Israel.
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.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Reduced Functional Consistency of Uninterpreted Functions.
1 A propositional world Ofer Strichman School of Computer Science, Carnegie Mellon University.
Ofer Strichman, Technion 1 Decision Procedures in First Order Logic Part II – Equality Logic and Uninterpreted Functions.
On Solving Presburger and Linear Arithmetic with SAT Ofer Strichman Carnegie Mellon University.
Ofer Strichman, Technion Deciding Combined Theories.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
Daniel Kroening and Ofer Strichman Decision Procedure
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 ≤ L 2 means: For some polynomial time computable map r : x: x L 1 iff r(x)
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
Binary Decision Diagrams (BDDs)
Quantified Formulas - Decision Procedure Daniel Kroening, Ofer Strichman Presented by Changki Hong 07 NOV 08.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic Range Allocation.
Daniel Kroening and Ofer Strichman 1 Decision Proceduresfoe Equality Logic 4 Range Allocation.
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.
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
1 P P := the class of decision problems (languages) decided by a Turing machine so that for some polynomial p and all x, the machine terminates after at.
Propositional calculus
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
Planning as Satisfiability (SAT-Plan). SAT-Plan Translate the planning problem into a satisfiability problem for length n of Plan garb 0 (proposition)present.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
28.
NPC.
1/20 Arrays Changki PSWLAB Arrays Daniel Kroening and Ofer Strichman Decision Procedure.
1 Boolean Satisfiability (SAT) Class Presentation By Girish Paladugu.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Complexity ©D.Moshkovits 1 2-Satisfiability NOTE: These slides were created by Muli Safra, from OPICS/sat/)
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
1 A framework for eager encoding Daniel Kroening ETH, Switzerland Ofer Strichman Technion, Israel (Executive summary) (submitted to: Formal Aspects of.
Deciding Combined Theories Presented by Adi Sosnovich Based on presentation from: Decision Procedures An Algorithmic Point of View Daniel Kroening and.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
 2005 SDU Lecture15 P,NP,NP-complete.  2005 SDU 2 The PATH problem PATH = { | G is a directed graph that has a directed path from s to t} s t
On the Relation Between Simulation-based and SAT-based Diagnosis CMPE 58Q Giray Kömürcü Boğaziçi University.
Satisfiability Modulo Theories and DPLL(T) Andrew Reynolds March 18, 2015.
Daniel Kroening and Ofer Strichman 1 Decision Procedures for Equality Logic 1.
Decision Procedures in First Order Logic
Decision Procedures in Equality Logic
L is in NP means: There is a language L’ in P and a polynomial p so that L1 ≤ L2 means: For some polynomial time computable map r :  x: x  L1 iff.
Richard Anderson Lecture 26 NP-Completeness
Polynomial-Time Reduction
Richard Anderson Lecture 26 NP-Completeness
(xy)(yz)(xz)(zy)
CS21 Decidability and Tractability
Propositional Calculus: Boolean Algebra and Simplification
Decision Procedures An Algorithmic Point of View
Presentation transcript:

Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic

Decision Procedures An algorithmic point of view 2 Outline Deciding Equality Logic and uninterpreted functions (EUF)  Solving a conjunction of equalities  Simplifications     

Decision Procedures An algorithmic point of view 3 Basic assumptions and notations Input formulas are in NNF Input formulas are checked for satisfiability Formula with Uninterpreted Functions:  UF Equality formula:  E

Decision Procedures An algorithmic point of view 4 First: conjunction of equalities Input: A conjunction of equalities and disequalities 1. Define an equivalence class for each variable. For each equality x = y unite the equivalence classes of x and y. Repeat until convergence. 2. For each disequality u  v if u is in the same equivalence class as v return 'UNSAT'. 3. Return 'SAT'.

Decision Procedures An algorithmic point of view 5 Example x 1 = x 2 Æ x 2 = x 3 Æ x 4 = x 5 Æ x 5  x 1 x1,x2,x3x1,x2,x3 x4,x5x4,x5 Equivalence class Is there a disequality between members of the same class ?

Adding Uninterpreted Functions EUF: The logic of equalities and Uninterpreted Functions. We already saw that UFs can be reduced to equalities, via Ackermann reduction We will now see that UFs can also be handled directly. Decision Procedures An algorithmic point of view 6

7 Add Uninterpreted Functions x 1 = x 2 Æ x 2 = x 3 Æ x 4 = x 5 Æ x 5  x 1 Æ F ( x 1 )  F ( x 2 ) x1,x2,x3x1,x2,x3 x4,x5x4,x5 Equivalence class F(x1)F(x1) F(x2)F(x2)

Decision Procedures An algorithmic point of view 8 Compute the Congruence Closure x 1 = x 2 Æ x 2 = x 3 Æ x 4 = x 5 Æ x 5  x 1 Æ F ( x 1 )  F ( x 2 ) x1,x2,x3x1,x2,x3 x4,x5x4,x5 Equivalence class Now - is there a disequality between members of the same class ? This is called the Congruence Closure F ( x 1 ), F ( x 2 )

Decision Procedures An algorithmic point of view 9 Deciding the conjunctive fragment of EUF Input: Conjunctive fragment of EUF For each clause:  Define an equivalence class for each variable and each function instance.  For each equality x = y unite the equivalence classes of x and y. For each function symbol F, unite the classes of F ( x ) and F ( y ). Repeat until convergence.  If all disequalities are between terms from different equivalence classes, return 'SAT'. Return 'UNSAT'. What about disjunctions ? Recall we have DPLL(T)

Decision Procedures An algorithmic point of view 10 Alternative decision procedure: A reduction to propositional logic Given an EUF formula  UF, find an equisatisfiable propositional formula . We will see graph-based algorithms.

Decision Procedures An algorithmic point of view 11 Basic notions  E : x = y Æ y = z Æ z  x The Equality predicates: { x = y, y = z, z  x } which we can break to two sets: E = ={ x = y, y = z }, E  = { z  x } The Equality Graph G E (  E ) = h V, E =, E  i (a.k.a “E-graph”) x y z

Decision Procedures An algorithmic point of view 12 Basic notions   E : x = y Æ y = z Æ z  x unsatisfiable  2 E : x = y Æ y = z Ç z  x satisfiable The graph G E (  E ) represents an abstraction of  E It ignores the Boolean structure of  E x y z

Decision Procedures An algorithmic point of view 13 Basic notions Dfn: a path made of E = edges is an Equality Path. we write x =* z. Dfn: a path made of E = edges + exactly one edge from E  is a Disequality Path. We write x  * y. x y z

Decision Procedures An algorithmic point of view 14 Basic notions Dfn. A cycle with one disequality edge is a Contradictory Cycle. In a Contradictory Cycle, for every two nodes x, y it holds that x =* y and x  * y. x y z

Decision Procedures An algorithmic point of view 15 Basic notions Dfn: A subgraph is called satisfiable iff the conjunction of the predicates represented by its edges is satisfiable. Thm: A subgraph is unsatisfiable iff it contains a Contradictory cycle x y z

Decision Procedures An algorithmic point of view 16 Basic notions Thm: Every Contradictory Cycle is either simple or contains a simple contradictory cycle

Decision Procedures An algorithmic point of view 17 Simplifications, again Let S be the set of edges that are not part of any Contradictory Cycle Thm: replacing all solid edges in S with False, and all dashed edges in S with True, preserves satisfiability

Decision Procedures An algorithmic point of view 18 Simplification: example x1x1 x2x2 x3x3 x4x4 ( x 1 = x 2 Ç x 1  x 4 ) Æ ( x 1  x 3 Ç x 2 = x 3 ) ( x 1 = x 2 Ç True) Æ ( x 1  x 3 Ç x 2 = x 3 ) ( : False Ç True) = True Satisfiable! True False

Decision Procedures An algorithmic point of view 19 Syntactic vs. Semantic splits So far we saw how to handle disjunctions through syntactic case-splitting. There are much better ways to do it than simply transforming it to DNF:  Semantic Tableaux,  SAT-based splitting,  others… We will investigate some of these methods later in the course.

Decision Procedures An algorithmic point of view 20 Now we start looking at methods that split the search space instead. This is called semantic splitting. SAT is a very good engine for performing semantic splitting, due to its ability to guide the search, prune the search-space etc. Syntactic vs. Semantic splits