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

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
C&O 355 Mathematical Programming Fall 2010 Lecture 22 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A.
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
Technion 1 Generating minimum transitivity constraints in P-time for deciding Equality Logic Ofer Strichman and Mirron Rozanov Technion, Haifa, Israel.
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
 Dr. Vered Gafni 1 LTL Decidability Enables consistency check, but also base for verification.
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:
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Weizmann Institute Deciding equality formulas by small domain instantiations O. Shtrichman The Weizmann Institute Joint work with A.Pnueli, Y.Rodeh, M.Siegel.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 21 Instructor: Paul Beame.
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
Weizmann Institute Range Minimization O. Shtrichman The Weizmann Institute Joint work with A.Pnueli, Y.Rodeh, M.Siegel.
Technion 1 Generating minimum transitivity constraints in P-time for deciding Equality Logic Ofer Strichman and Mirron Rozanov Technion, Haifa, Israel.
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.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
Job Scheduling Lecture 19: March 19. Job Scheduling: Unrelated Multiple Machines There are n jobs, each job has: a processing time p(i,j) (the time to.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
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
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding ILPs with Branch & Bound ILP References: ‘Integer Programming’
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
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
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.
Daniel Kroening and Ofer Strichman 1 Decision Proceduresfoe Equality Logic 4 Range Allocation.
Lecture 22 More NPC problems
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Mathematical Preliminaries
Design and Analysis of Algorithms - Chapter 101 Our old list of problems b Sorting b Searching b Shortest paths in a graph b Minimum spanning tree b Primality.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
28.
NPC.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
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.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
34.NP Completeness. Computer Theory Lab. Chapter 34P.2.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
Daniel Kroening and Ofer Strichman 1 Decision Procedures for Equality Logic 1.
Decision Procedures in First Order Logic
The Theory of NP-Completeness
Decision Procedures in Equality Logic
Richard Anderson Lecture 26 NP-Completeness
COMPLEXITY THEORY IN PRACTICE
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Yin Tat Lee
ICS 353: Design and Analysis of Algorithms
NP-Complete Problems.
MA/CSSE 474 More Math Review Theory of Computation
NP-Completeness Yin Tat Lee
CSE 6408 Advanced Algorithms.
The Theory of NP-Completeness
Trevor Brown DC 2338, Office hour M3-4pm
Instructor: Aaron Roth
Our old list of problems
Presentation transcript:

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

Decision Procedures An algorithmic point of view2 Part III – Decision Procedures for Equality Logic and Uninterpreted Functions Algorithm I – From Equality to Propositional Logic  Adding transitivity constraints  Making the graph chordal  An improved procedure: consider polarity Algorithm II – Range-Allocation  What is the small-model property?  Finding a small adequate range (domain) to each variable  Reducing to Propositional Logic    

Decision Procedures An algorithmic point of view3 Range allocation The small model property Range Allocation

Decision Procedures An algorithmic point of view4 To a formula with uninterpreted functions Uninterpreted functions From a general formula:

Decision Procedures An algorithmic point of view5 From a formula with uninterpreted functions: To a formula in the theory of equality Ackerman’s reduction

Decision Procedures An algorithmic point of view6 The Small Model Property Equality Logic enjoys the Small Model Property This means that if a formula in this logic is satisfiable, then there is a finite, bounded in size, model that satisfies it. It gets better: in Equality Logic we can compute this bound, which suggests a decision procedure. What is this bound?

Decision Procedures An algorithmic point of view7 The Small Model Property Claim: the range 1.. n is adequate, where n is the number of variables in  Proof:  Every satisfying assignment defines a partition of the variables  Every assignment that results in the same partitioning also satisfies the formula  The range 1.. n allows all partitionings

Decision Procedures An algorithmic point of view8 Complexity We need log n variables to encode the range 1… n For n variables we need n log n bits. This is already better than the worst-case O( n 2 ) bits required by the Boolean encoding method …

Decision Procedures An algorithmic point of view9 Instead of giving the range [1..11], analyze connectivity: x1x1 x2x2 y1y1 y2y2 g1g1 g2g2 zu1u1 f1f1 f2f2 u2u2 x 1, y 1, x 2, y 2 :{0-1} u 1, f 1, f 2, u 2 : {0-3}g 1, g 2, z: {0-2} The state-space: from to ~10 5 Finite Instantiations revisited

Decision Procedures An algorithmic point of view10 Or even better: x1x1 x2x2 y1y1 y2y2 g1g1 g2g2 zu1u1 f1f1 f2f2 u2u2 x 1, y 1, g 1, u 1 : {0} {0}{0}{0-1} An Upper-bound: State-space  n! x 2, y 2, g 2, f 1 : {0-1} u 2 : {0-3} f 2, z: {0-2} The state-space: from ~10 5 to 576

Decision Procedures An algorithmic point of view11 Choosing a minimal range for the integer variables 0. a,b,c,d,e : { 1 } ( 1 )(normal) 1.a,b,c,d,e : {1..5} (3125)(1..n) 2. a,b,c: {1..3}(connectivity d,e: {1..2} (108) analysis) 3. a: {1}, b:{1-2}, c: {1-3}(factorial d: {1}, e: {1-2} (12) reduction)  E : : (( a = b ) Ç : ( b = c )) ! (( d  e ))

Decision Procedures An algorithmic point of view12 Before and after, in SMV

Decision Procedures An algorithmic point of view13 The Range-Minimization Problem Given an Equality formula  E, find in polynomial time a small domain D* sufficient to preserve its satisfiability In other words: find D* such that  E is satisfiable under an infinite domain D !  E is satisfiable under the finite domain D*

Decision Procedures An algorithmic point of view14 The strategy 1. Determine a range allocation R, mapping each variable x i  E into a small set of integers, s.t.  E is satisfiable iff it is satisfiable over some R -interpretation. 2. Encode each variable x i as an enumerated type over R ( x i ), and use a standard satisfiability checker as a decision procedure.

Decision Procedures An algorithmic point of view15 What range is adequate ? Recall that a subgraph of an E-Graph G E (  E ) is unsatisfiable iff it contains a contradictory cycle. Dfn: A Range Allocation R is adequate for G E (  E ) if every satisfiable subgraph can be satisfied under R. Now we need an algorithm to find adequate ranges

Decision Procedures An algorithmic point of view16 Examples: The price of a polynomial procedure: The predicates of  E hold less information than  E.

Decision Procedures An algorithmic point of view17 x1x1 x2x2 y1y1 y2y2 g1g1 g2g2 zu1u1 f1f1 f2f2 u2u2 Building the E-Graph E  : E = : Note: 1. Inconsistent subsets appear as contradictory cycles 2. Some of the vertices are mixed

Decision Procedures An algorithmic point of view18 The Range-Allocation Algorithm A. Remove all solid edges not belonging to contradictory cycles. B. Add a single unique value to singleton vertices, and remove them from the graph. x1x1 x2x2 y1y1 y2y2 g1g1 g2g2 zu1u1 f1f1 f2f2 u2u2 {0}{0}{1}{1}{3}{3}{2}{2} Step I - pre-processing:

Decision Procedures An algorithmic point of view19 Step II - Set construction: A. For each mixed vertex x i : 1. Add a unique value u i to R ( x i ) 2. Broadcast u i on G = 3. Remove x i from the graph B. Add a unique value to each remaining G = component g1g1 g2g2 z {4}{4} {4}{4} {4}{4} g1g1 z {4, } g1g1 g2g2 z {4}{4} 1.2.

Decision Procedures An algorithmic point of view20 u1u1 f1f1 f2f2 u2u2 {6}{6}{6}{6}{6}{6} {6}{6} f1f1 f2f2 u2u2 {6,7}{6,7} {6,7}{6,7} {6,7}{6,7} u2u2 {6,7, } u1u1 f1f1 f2f2 u2u2 {6}{6}{6,7}{6,7} f1f1 {6,7, }

Decision Procedures An algorithmic point of view21 x1x1 x2x2 y1y1 y2y2 g1g1 g2g2 zu1u1 f1f1 f2f2 u2u2 {3}{3}{2}{2} {4}{4} {4, } {6}{6}{6,7}{6,7} {6,7, } {1}{1} {0}{0} Is the allocated range adequate? We have to satisfy every consistent subset B :  For all x  B, assign the smallest value allocated in step A to a mixed vertex which is G = (B) connected to x.  If there isn’t any, choose the value given in step B.

Decision Procedures An algorithmic point of view22 Further optimizations The order in which mixed vertices are eliminated has a strong effect. Not all mixed vertices need to start from a unique value. An analysis that involves solving a coloring problem can help here… … (see lecture notes)

Decision Procedures An algorithmic point of view23 x1x1 x2x2 y1y1 y2y2 g1g1 g2g2 zu1u1 f1f1 f2f2 u2u2 {3}{3}{2}{2} {4}{4} {4,5}{4,5} {4,5}{4,5} {6,7}{6,7} {6}{6}{6}{6}{6,8}{6,8} {1}{1} {0}{0} A state-space story 11 11! n1..ibasic ordercolor 4872? 576 connectivity