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

Slides:



Advertisements
Similar presentations
A Randomized Satisfiability Procedure for Arithmetic and Uninterpreted Function Symbols Sumit Gulwani George Necula EECS Department University of California,
Advertisements

Logical Abstract Interpretation Sumit Gulwani Microsoft Research, Redmond.
1 Decision Procedures An algorithmic point of view Equality Logic and Uninterpreted Functions.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
2005conjunctive-ii1 Query languages II: equivalence & containment (Motivation: rewriting queries using views)  conjunctive queries – CQ’s  Extensions.
SMT Solvers (an extension of SAT) Kenneth Roe. Slide thanks to C. Barrett & S. A. Seshia, ICCAD 2009 Tutorial 2 Boolean Satisfiability (SAT) ⋁ ⋀ ¬ ⋁ ⋀
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.
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
Weizmann Institute Deciding equality formulas by small domain instantiations O. Shtrichman The Weizmann Institute Joint work with A.Pnueli, Y.Rodeh, M.Siegel.
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.
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)
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.
SAT-Based Decision Procedures for Subsets of First-Order Logic
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.
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/25 Pointer Logic Changki PSWLAB Pointer Logic Daniel Kroening and Ofer Strichman Decision Procedure.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
Decision Procedures An Algorithmic Point of View
Binary Decision Diagrams (BDDs)
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
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.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Controller Synthesis for Pipelined Circuits Using Uninterpreted Functions Georg Hofferek and Roderick Bloem. MEMOCODE 2011.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
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.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
Controller Synthesis for Pipelined Circuits Using Uninterpreted Functions Georg Hofferek and Roderick Bloem. MEMOCODE 2011.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
1/20 Arrays Changki PSWLAB Arrays Daniel Kroening and Ofer Strichman Decision Procedure.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
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.
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.
Decision Procedures in First Order Logic
The Theory of NP-Completeness
Decision Procedures in Equality Logic
Propositional Calculus: Boolean Functions and Expressions
Richard Anderson Lecture 26 NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Propositional Calculus: Boolean Functions and Expressions
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
Satisfiability Modulo Theories
Propositional Calculus: Boolean Algebra and Simplification
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
NP-Complete Problems.
CSE 589 Applied Algorithms Spring 1999
Instructor: Aaron Roth
Instructor: Aaron Roth
Presentation transcript:

Daniel Kroening and Ofer Strichman 1 Decision Procedures for Equality Logic 1

Decision Procedures An algorithmic point of view 2 Equality logic Def. An equality logic formula is defined by the following grammar: formula ::= formula ^ formula | : formula | atom atom ::= term = term term ::= identifier | constant where the identifiers are variables over a single infinite domain like the reals or integers. Constants are elements from the same domain as identifiers.

Decision Procedures An algorithmic point of view 3 Complexity Equality logic and propositional logic are both NP- complete. Thus they model the same decision problems. Why to study both? - convenience of modeling - efficiency Extensions: different domains, Boolean variables

Decision Procedures An algorithmic point of view 4 Basic assumptions and notations Input formulas are in NNF Input formulas are checked for satisfiability Equality formula:  E

Decision Procedures An algorithmic point of view 5 Removing constants:A simplification Thm. Given an equality logic formula  E, there is an algorithm that generates an equisatisfiable formula  E' without constants, in polynomial time. Algorithm: Input: An equality logic formula  E with constants c 1,...,c n Output: An equality logic formula  E' such that  E and  E' are equisatisfiable and  E' has no constants.

Decision Procedures An algorithmic point of view 6 Removing constants:A simplification 1.  E' :=  E 2. In  E', replace each constant c i, 1 · i · n, with a new variable C ci. 3. For each pair of constants c i, c j such that 1 · i<j · n, add the constraint C ci  C cj to  E'. In the following we assume that the input equality formulas do not have constants.

Decision Procedures An algorithmic point of view 7 Uninterpreted functions Def. An equality logic formula with uninterpreted functions and uninterpreted predicates is defined by the following grammar: formula ::= formula ^ formula | : formula | (formula) | atom atom ::= term = term | predicate-symbol(list of terms) term ::= identifier | function-symbol(list of terms)‏ Example: F(x)=F(G(x)) Congruence: x=G(x) ) F(x) = F(G(x))

Decision Procedures An algorithmic point of view 8 Usage of uninterpreted functions Replacing functions by uninterpreted functions in a given formula is a common technique to make reasoning easier. Makes the formula weaker: |=  UF ) |=  Ignore the semantics of the function, but: Functional congruence: Instances of the same function return the same value for equal arguments.

Decision Procedures An algorithmic point of view 9 From uninterpreted functions to equality logic Two possible reductions: - Ackermann's reduction - Bryant's reduction Ackermann's reduction: Given an input formula  UF, add explicit constraints for functional congruence and transform the formula to an equality logic formula   of the form     FC E ) flat E where FC E is a conjunction of functional-consistency constraints, and flat E is a flattening of  UF.

Decision Procedures An algorithmic point of view 10 Algoritm: Ackermann's reduction Input:  UF with m instances of an uninterpreted function F Output:   such that   is valid iff  UF is valid 1. Assign indices to the UF-instances. 2. flat E = T (  UF ) where T replaces each F i by a fresh f i 3. FC E := ^ i=1..m-1 ^ j=i+1..m ( T (arg(F i )) = T (arg(F j ))) ) f i =f j 4. Return   := FC E ) flat E

Decision Procedures An algorithmic point of view 11 Ackermann's reduction:Example (x1  x2) _ (F(x1) = F(x2)) _ (F(x1)  F(x3))‏ flat E = (x1  x2) _ (f1 = f2) _ (f1  f3))‏ FC E = (x1=x2 ) f1=f2) ^ (x1=x3 ) f1=f3) ^ (x2=x3 ) f2=f3)   := FC E ) flat E

Decision Procedures An algorithmic point of view 12 Ackermann's reduction: validity vs. satisfiability   := FC E ) flat E  is valid iff  UF is valid Validity check of  UF : check   for validity or :   for unsatisfiability What if we want to check satisfiability of  UF ? Ackermann's reduction in the above form maintains validity, not satisfiability! Solution: check satisfiability of   := FC E ^ flat E

Decision Procedures An algorithmic point of view 13 Bryant's reduction Case expression: F i * = case x 1 =x i : f 1 x 2 =x i : f 2... true : f i where x i is the argument arg(F i ) of F i for all i Semantics: _ j=1,...,i (F i * = f j ^ (x j =x i ) ^ ^ k=1,...,j-1 (x k  x i ))‏

Decision Procedures An algorithmic point of view 14 Bryant's reduction:Algorithm Input: An EUF formula  UF with m instances of an uninterpreted function F Output: An EF formula   such that   is valid iff  UF is valid 1. Assign indices to the uninterpreted-function instances from subexpressions outwards. 2. Return  E := T * (  UF ) where T * replaces each F i (arg(F i )) by case T * (arg(F 1 )) = T * (arg(F i )) : f 1... T * (arg(F i-1 )) = T * (arg(F i )) : f i-1 true : f i

Decision Procedures An algorithmic point of view 15 Bryant's reduction: Example int power3_con (int in) { int i, out; out = in; for (i = 0; i < 2; i++) out = out * in; return out; } int power3_con_new (int in) { return ((in * in) * in); }

Decision Procedures An algorithmic point of view 16 Bryant's reduction: Example int power3_con (int in) { int i, out; out = in; for (i = 0; i < 2; i++) out = out * in; return out; } int power3_con_new (int in) { return (in * in) * in; }   := out0 = in ^ out1 = out0 * in ^ out2 = out1 * in  2 := out0_new = (in * in) * in   ^    ) out2 = out0_new

Decision Procedures An algorithmic point of view 17  := (out0 = in ^ out1 = out0 * in ^ out2 = out1 * in ^  out0_new = (in * in) * in) ) out2 = out0_new  UF := (out0 = in ^ out1 = G(out0,in) ^ out2 = G(out1,in) ^ out0_new = G(G(in,in),in)) ) out2 = out0_new

Decision Procedures An algorithmic point of view 18  UF := (out0 = in ^ out1 = G(out0,in) ^ out2 = G(out1,in) ^  out0_new = G(G(in,in),in)) ) out2 = out0_new  E := (out0 = in ^ out1 = G 1 * ^ out2 = G 2 * ^  out0_new = G 4 * ) out2 = out0_new with G 1 * = g 1 G 2 * = case out0=out1 ^ in=in : g 1 true : g 2 G 3 * = case out0=in ^ in=in : g 1 case out1=in ^ in=in : g 2 true : g 3

Decision Procedures An algorithmic point of view 19  UF := (out0 = in ^ out1 = G(out0,in) ^ out2 = G(out1,in) ^  out0_new = G(G(in,in),in)) ) out2 = out0_new  E := (out0 = in ^ out1 = G 1 * ^ out2 = G 2 * ^  out0_new = G 4 * ) out2 = out0_new and with G 4 * = case out0=G 3 * ^ in=in : g 1 case out1= G 3 * ^ in=in : g 2 case in= G 3 * ^ in=in : g 3 true : g 4

Decision Procedures An algorithmic point of view 20 EUF: where are we now? We introduced equality logic and uninterpreted functions We showed how to eliminate constants We used Ackermann's and Bryant's algorithms to reduce the validity question in equality logic with uninterpreted functions to validity questions in equality logic Next: Decision procedures for equality logic and uninterpreted functions