1 A Combination Method for Generating Interpolants by G. Yorsh and M. Masuvathi Presentation by: Emilia Katz.

Slides:



Advertisements
Similar presentations
Logical Abstract Interpretation Sumit Gulwani Microsoft Research, Redmond.
Advertisements

Automated Theorem Proving
Completeness and Expressiveness
The Model Evolution Calculus with Built-in Theories Peter Baumgartner MPI Informatik, Saarbrücken
Cook’s Theorem The Foundation of NP-Completeness.
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 
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Logic.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Properties of SLUR Formulae Ondřej Čepek, Petr Kučera, Václav Vlček Charles University in Prague SOFSEM 2012 January 23, 2012.
Nikolaj Bjørner Microsoft Research Lecture 4. DayTopicsLab 1Overview of SMT and applications. SAT solving, Z3 Encoding combinatorial problems with Z3.
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:
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
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.
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.
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)
Logic in Computer Science Transparency No Chapter 3 Propositional Logic 3.6. Propositional Resolution 3.7. Natural Deduction.
Existential Graphs and Davis-Putnam April 3, 2002 Bram van Heuveln Department of Cognitive Science.
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.
ECI 2007: Specification and Verification of Object- Oriented Programs Lecture 4.
Monadic Predicate Logic is Decidable Boolos et al, Computability and Logic (textbook, 4 th Ed.)
Ofer Strichman, Technion Deciding Combined Theories.
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.
Satisfiability Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.
On Bridging Simulation and Formal Verification Eugene Goldberg Cadence Research Labs (USA) VMCAI-2008, San Francisco, USA.
1 Decision Procedures for Linear Arithmetic Presented By Omer Katz 01/04/14 Based on slides by Ofer Strichman.
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.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
Introduction to Satisfiability Modulo Theories
Leonardo de Moura Microsoft Research. Is formula F satisfiable modulo theory T ? SMT solvers have specialized algorithms for T.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
Formal Specification of Intrusion Signatures and Detection Rules By Jean-Philippe Pouzol and Mireille Ducassé 15 th IEEE Computer Security Foundations.
Lazy Annotation for Program Testing and Verification Speaker: Chen-Hsuan Adonis Lin Advisor: Jie-Hong Roland Jiang November 26,
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
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.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
AN INTERPOLATING THEOREM PROVER K.L. McMillan Cadence Berkley Labs.
CS357 Lecture 13: Symbolic model checking without BDDs Alex Aiken David Dill 1.
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.
Selected Decision Procedures and Techniques for SMT More on combination – theories sharing sets – convex theory Un-interpreted function symbols (quantifier-free.
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.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Computer Systems Laboratory Stanford University Clark W. Barrett David L. Dill Aaron Stump A Framework for Cooperating Decision Procedures.
Satisfiability Modulo Theories and DPLL(T) Andrew Reynolds March 18, 2015.
From Classical Proof Theory to P vs. NP
Introduction to Software Verification
NP-Completeness Yin Tat Lee
Resolution Proofs for Combinational Equivalence
NP-Completeness Yin Tat Lee
Verifying Clausal Proofs, DRUPing and Interpolants SAT/SMT Seminar
Presentation transcript:

1 A Combination Method for Generating Interpolants by G. Yorsh and M. Masuvathi Presentation by: Emilia Katz

2 The Goal Given: –theory T – combination of T 1 and T 2 –A and B – two logical T-formulas –A ⋀ B is unsatisfiable in T –efficient interpolant-generation procedures exist for T 1 and T 2 Find: –interpolant for if both sub-procedures are polynomial, the resulting procedure will also be polynomial restrictions on T 1 and T 2 will be seen later…

3 The Idea How to find an interpolant efficiently? –Derive it from unsatisfiability proof But how? And how to get the proof? We don’t want to make further assumptions about T 1 and T 2, so –We don’t know how their interpolant-generation procedures work –We don’t know how their decision procedures work The idea: use them as black boxes –Combine d.p.-s for T 1 and T 2 into a d. p. for T. –Use the proof and the interpolant-generation procedures for T 1 and T 2 to derive an interpolant in T. Nelson-Oppen framework…

4 Example T 1 = UIF (uninterpreted functions theory) T 2 = LI (linear equalities theory) A ≝ (f(x 1 )+x 2 =x 3 )  (f(y 1 )+y 2 =y 3 )  (y 1  x 1 ) B ≝ (x 2 =g(b))  (y 2 =g(b))  (x 1  y 1 )  (x 3 < y 3 ) UIF and LI satisfy the requirements [assume it meanwhile, we’ll return to it later] A  B is unsatisfiable [we’ll see this in a couple of minutes]

5 Nelson – Oppen framework … for combining decision procedures Given: –theory T – combination of T 1 and T 2 –A and B – two conjunctions of literals in T Goal: is A ⋀ B satisfiable in T ? Assumptions: –Σ = Σ 1  Σ 2 (denote: Σ = Σ T, Σ i = Σ Ti ) –Σ 1  Σ 2 = {=} –T 1, T 2 are stably-infinite –T 1, T 2 have decision procedures for satisfiability of conjunctions of Σ i literals = every quantifier- free Σ i -formula is satisfiable in T i iff it is satisfied by a T i - interpretation with infinite domain

6 N.-O. framework application example T 1 = UIF (uninterpreted functions theory) T 2 = LI (linear equalities theory) A ≝ (f(x 1 )+x 2 =x 3 )  (f(y 1 )+y 2 =y 3 )  (y 1  x 1 ) B ≝ (x 2 =g(b))  (y 2 =g(b))  (x 1  y 1 )  (x 3 < y 3 ) 1.Purification: A LI = (a 1 +x 2 =x 3 )  (a 2 +y 2 =y 3 )  (y 1  x 1 ) A UIF = ((a 1 = f(x 1 ))  (a 2 = f(y 1 )) B LI = (x 1  y 1 )  (x 3 < y 3 ) B UIF = (x 2 =g(b))  (y 2 =g(b)) replace: f(x 1 ) by a 1, f(y 1 ) by a 2 add equalities for a 1, a 2 no replacements needed

7 Application Example – contd. 2. Equality propagation: UIF LI (1) a 1 = f(x 1 )(5) a 1 +x 2 =x 3 (2) a 2 = f(y 1 )(6) a 2 +y 2 =y 3 (3) x 2 =g(b)(7) y 1  x 1 (4) y 2 =g(b)(8) x 1  y (9) x 3 < y (10) x 1 = y 1 (11) a 1 = a 2 (12) x 2 = y 2 Unsatisfiable! Theory: LI Eq = (a 1 =a 2  x 2 =y 2 ) under the line: Eq LI under the line: Eq UIF

8 Nelson – Oppen framework A  B Purification A1 B1A1 B1 A2 B2A2 B2 in T in T 1 in T 2 Equality propagation Dec. proc. for T 1 Dec. proc. for T 2 F 1 := A 1  B 1 F 2 := A 2  B 2 Equality derivation in T 1 (Eq 1 ) Equality derivation in T 2 (Eq 2 ) F 2 := F 2  Eq 1 F 1 := F 1  Eq 2 Sat. Satisfiable! no more new equalities Unsatisfiable! (found by T i, with Eq) Unsat. adding new variables to replace objects of the “wrong” type, and equalities “defining” them

9 Theory-specific Interpolant Given: T – first order theory of signature Σ L – class of quantifier-free Σ-formulas Σ T  Σ – interpreted symbols in T A, B ∈ L such that A ⋀ B ⊦ T ⊥ Then theory-specific interpolant for is I ∈ L such that: 1.A ⊦ T I 2. I ⋀ B ⊦ T ⊥ 3. V ( I )  ( V(A)  V(B))  Σ T new requirement: quantifier-free interpolants (for completeness of SAT-checks with interpolants [in subsequent analysis stages]) less strict requirement: I can contain not only AB- common symbols not necessary for the method to work properly set of symbols that appear in the formula

10 Requirement (3) Change Motivation Example: A ≝ c 2 = car(c 1 ) ⋀ c 3 = cdr(c 1 ) ⋀  atom(c 1 ) B ≝  c 1 = cons( c 2,c 3 ) In theory of Lisp structures c i – s are lists car(c) = “head” element of the list c cdr(c) = “tail” of the list c cons(c,d) = concatenation of d after c Σ T = {car, cdr, cons, atom} A ⋀ B ⊦ T ⊥ Axiom of T: ∀ x(  atom(x) ⇒ cons(car(x),cdr(x))=x) Apply to x=A: A ⇒ ( c 1 = cons(c 2,c 3 )) contradictio n with B! Interpolant (by new def.) c 1 = cons(c 2,c 3 ) “cons” is not AB–common; “cons”, “atom”, “cdr”, “car” not alowed in I => no interpolant for !

11 Interpolants Generation Method Assumptions: T – combination of T 1, T 2 Σ = Σ 1  Σ 2 efficient interpolant-generation procedures exist for T 1 and T 2 Restrictions from Nelson-Oppen framework: –Σ 1  Σ 2 = {=} –T 1, T 2 are stably-infinite –T 1, T 2 have decision procedures for satisfiability of conjunctions of Σ i literals T 1, T 2 are equality-interpolating T 1, T 2 are convex Guarantee: Output: theory-specific interpolant for in T first-order theories Input: - conjunctions of Σ i literals; output – interpolant as L i formula to be explained (  (x i = y i )) ⇒ ∃k. (x k =y k )

12 Simple Case Constraints to be relaxed later: A, B – conjunctions of literals Constraints possible to relax T 1, T 2 are convex theories Arise from the use of the Nelson- Oppen framework Relaxed in another work of the authors…

13 Naïve approach A  B Nelson-Oppen in T “Unsatisfiable!” + Eq (propagated equalities) + P (proof of A i  B i ⊦ Ti ⊥) framework for “Satisfiable!” Given: A  B ⊦ T ⊥ A i  Eq| Ai P B i  Eq| Bi Interpolant generation procedure for T i Interpolant I for ?

14 The problem - example A ≝ (f(x 1 )+x 2 =x 3 )  (f(y 1 )+y 2 =y 3 )  (y 1  x 1 ) B ≝ (x 2 =g(b))  (y 2 =g(b))  (x 1  y 1 )  (x 3 < y 3 ) Contradiction found by LI between A’ = A LI  (a 1 =a 2 ); B’ = B LI  (x 1 =y 1 )  (x 2 =y 2 ) Interpolant found for in LI: I = (x 2 -y 2 =x 3 -y 3 ) Is I interpolant for in T? – I  B  T ⊥ –But A  I: (f(x 1 )+x 2 =x 3 )  (f(y 1 )+y 2 =y 3 )  (y 1  x 1 )  (x 2 -y 2 =x 3 -y 3 ) –A → A’ doesn’t have to hold => A  I additional information from B might appear in A’

15 Proposed solution: Partial Interpolants Definition: Projection Given Θ – conjunction of AB-pure literals Define Θ| A – conjunction of A-local literals, Θ| B – conjunction of B-local and AB-common literals Note: Θ = Θ| A  Θ| B Example: A = (a 1 =f(x 1 )  a 2 = f(y 1 )), B = (a 1 =f(x 1 )  a 3 = f(y 1 )) Θ = A  B = (a 2 = f(y 1 )  a 1 =f(x 1 )  a 3 = f(y 1 )) Θ|AΘ|A Θ|BΘ|B Attach one to each equality propagated in the unsatisfiability proof in Nelson- Oppen framework

16 Partial Interpolant – defn. Definition: Theory-specific partial interpolant A’,B’ - conjunctions of pure literals in Σ i, e – AB-pure atomic formula generated by decision procedure for the theory T i : A’  B’  Ti e Then: Theory-specific partial interpolant for e w.r.t., φ i A’,B’ (e), is the interpolant generated for by T i ’s procedure thus, A’  B’  e  Ti ⊥ in our case, V(A’)  V(A), V(B’)  V(B) => interpolant for e contains only AB-common symbols

17 LI-Partial Interpolant Example First equality propagated: e=(x 1 =y 1 ); A’ = A LI, B’ = B LI (7)  A LI, (8)  B LI e| A’ = true, e| B’ = (x 1 =y 1 ) Interpolant for : φ LI A’,B’ (x 1 =y 1 )= y 1  x 1 UIF LI (1) a 1 = f(x 1 )(5) a 1 +x 2 =x 3 (2) a 2 = f(y 1 )(6) a 2 +y 2 =y 3 (3) x 2 =g(b)(7) y 1  x 1 (4) y 2 =g(b)(8) x 1  y (9) x 3 < y (10) x 1 = y 1 x 1, y 1 are AB-common

18 Partial Interpolant – contd. Definition: Partial interpolant e – AB-pure equality derived from A  B in Nelson-Oppen framework by a theory T i : A i  B i  Eq  Ti e A i, B i – conjunctions of pure literals Eq – a set of AB-pure equalities Partial interpolant for e w.r.t., φ A,B (e), is defined inductively: Base: –e  A i ⇒ φ A,B (e) = ⊥, –e  B i ⇒ φ A,B (e) = ⊤ Inductive step: Let A’ ≝ A i  Eq| A, B’ ≝ B i  Eq| B φ A,B (e) = (φ i A’,B’ (e)  ⋁ a  A’ φ A,B (a))  ⋀ b  B’ φ A,B (b) reason for restriction to equality-interpolating theories derived from A  B by Nelson-Oppen procedure… a, b - equalities

19 Partial interpolant - example Find partial interpolant for, φ A,B ( ⊥ ), from the running example: Follow the proof step-by-step Step1: deriving (x 1 =y 1 ) – T i = LI –Eq = ⊤, thus: –A’ = A LI = (a 1 +x 2 =x 3 )  (a 2 +y 2 =y 3 )  (y 1  x 1 ) –B’ = B LI = (x 1  y 1 )  (x 3 < y 3 ) – φ A,B (x 1 =y 1 ) = φ LI A’,B’ (x 1 =y 1 ) = y 1  x 1

20 Partial interpolant example – contd. Step2: deriving (a 1 =a 2 ) – T i = UIF –Eq = (x 1 =y 1 ) –Eq| A = ⊤, Eq| B = (x 1 =y 1 ), thus: –A’ = A UIF = ((a 1 = f(x 1 ))  (a 2 = f(y 1 )) –B’ = B UIF  (x 1 =y 1 ) = (x 2 =g(b))  (y 2 =g(b))  (x 1 =y 1 ) –φ A,B (a 1 =a 2 ) = ( φ UIF A’,B’ (a 1 =a 2 )  ⊥)  ⋀ b  B’ φ A,B (b) –φ UIF A’,B’ (a 1 =a 2 )=  (x 1 =y 1 ) –φ A,B (a 1 =a 2 ) =  (x 1 =y 1 )  (y 1  x 1 ) = (y 1 < x 1 ) A’=A UIF => we have results only from the base case = φ A,B (x 1 =y 1 ) = (y1  x1) interpolant-generation proc. of UIF the rest is True from the base case propagated eq. used to derive a 1 =a 2

21 Partial interpolant example – contd. Step3: deriving (x 2 =y 2 ) – T i = UIF –Eq = ⊤, thus: –A’ = A UIF = ((a 1 = f(x 1 ))  (a 2 = f(y 1 )) –B’ = B UIF = (x 2 =g(b))  (y 2 =g(b)) –φ A,B (x 2 =y 2 ) = φ UIF A’,B’ (x 2 =y 2 ) = = interpolant, derived by UIF’s procedure for = =interpolant for no propagated eq. needed to derive x 2 =y 2 = ⊤ =  (x2=y2) => Internal contradiction => φ A,B (x2=y2) = ⊤

22 Partial interpolant example – contd. Step4: deriving ⊥ – T i = LI –Eq = (x 2 =y 2 )  ( a 1 =a 2 ) –Eq| A = (x 2 =y 2 )  ( a 1 =a 2 ), Eq| B = ⊤, thus: –A’ = A LI  (x 2 =y 2 )  ( a 1 =a 2 ) = ((a 1 = f(x 1 ))  (a 2 = f(y 1 ))  (x 2 =y 2 )  ( a 1 =a 2 ) –B’ = B LI = (x 2 =g(b))  (y 2 =g(b)) –φ A,B ( ⊥ ) = ( φ LI A’,B’ ( ⊥ )  ( φ A,B (x 2 =y 2 )  φ A,B (a 1 =a 2 )) )  ⊤ => φ A,B ( ⊥ ) = ( (x 2 -y 2 =x 3 -y 3 ) )  (y 1 < x 1 ) = (y 1 <x 1 ) interpolant-generation proc. of UIF ⋀ b  B’ φ A,B (b) = ⊤ from the base case propagated eq.-s used to derive ⊥ = ⊤ = (x2-y2=x3-y3)

23 Correctness Lemma 1: The partial interpolant, φ A,B (e), is an interpolant for in the combined theory T. φ A,B ( ⊥ ) is an interpolant for

24 Equality-interpolating theories Restriction on T 1, T 2 : they should be equality- interpolating Definition: Theory T is equality-interpolating if whenever –A, B  T –A  B  T (a=b) –a  V(A)-V(B), b  V(B)-V(A) => Exists a term t s.t. –A  B  T (a=t)  (b=t) – V(t)  V(A)  V(B) t is called equality-interpolating term for (a=b) with respect to thus propagation of AB-pure equalities only in the Nelson- Oppen framework is enough indeed

25 Equality-interpolating theories (contd.) LI, UIF, Lisp are equality-interpolating theories Not all the theories are equality-interpolating. Example: –theory with two relation symbols, P and Q –axiom:  abc P(a,c)  Q(c,b) ⇒ (a=b) –let A ≝ P(a,c), B ≝ Q(c,b) –A  B  (a=b) –But: no equality-interpolating term for (a=b) !

26 Relaxing constraints Constraints to be relaxed: –A, B – conjunctions of literals The idea: use –Extended Pudlák’s algorithm => propositional interpolants for a pair of clause sets –Lazy Proof-Explication framework (using SAT-slover) => checking satisfiability of arbitrary quantifier-free FOL formulas i.e., CNF formulas

27 Pudlák’s algorithm Input: –A, B – pair of clause sets –A ⋀ B ⊦ T ⊥ – T – proof of unsatisfiability for A ⋀ B For each clause c in T, define p(c): 1.(a) c  A ⇒ p(c) := ⊥ (b) c  B ⇒ p(c) := ⊤ otherwise,  x,c 1,c 2.(c = resolve x (c 1,c 2 )) (a) x  A and x  B ⇒ p(c) := p(c 1 )  p(c 2 ) (b) x  B and x  A ⇒ p(c) := p(c 1 )  p(c 2 ) (c) x - AB-common ⇒ p(c) := (x  p(c 1 ))  (  x  p(c 2 )) p(⊥) is the interpolant for partial interpolant for c c is a result of resolution; x - pivot x – A-local x – B-local variant of the seen before

28 Pudlák’s algorithm correctness Invariant: For each clause c  T, p(c) is an interpolant for g A (c) =A  (  c)| A, g B (c)=B  (  c)| B Thus: (c = ⊥) ⇒ g A ( ⊥ ) = A, g B ( ⊥ ) = B ⇒ [invariant] p(⊥) is the interpolant for

29 Lazy Proof-Explication framework Our input – quantifier-free FOL formulas Nelson-Oppen framework works on conjunctions of literals How to bridge the gap? Use SAT-solver!

30 Lazy Proof-Explication framework φ=A  B Nelson-Oppen atomic formulas replaced by boolean variables “Unsatisfiable!” + C (conflict clauses set) framework for “Satisfiable!” result: φ’ propositional abstraction satisfiability check Unsat. satisfying ass. s for φ’ φ’:= φ’  s; C:= C  {s} Unsat. Sat. s = conjunction of literals; satisfies φ propositionally s = new conflict clause SAT- solver L.P.E.

31 Obtaining the interpolant We would like to : –give Pudlák’s algorithm the proof obtained from L.P.E. framework –obtain interpolant Problem: the base case! (a) c  A ⇒ p(c) := ⊥ (b) c  B ⇒ p(c) := ⊤ Now possible: c  A and c  B –Conflict clauses appear in the proof, and a conflict clause may involve local literals from both A and B

32 L.P.E. framework - observations For each conflict clause c  C,  c is a conjunction of literals  c is unsatisfiable (proven by N.-O.)  c contains only literals from A and B => every literal in  c is AB-pure Thus we can apply previously described method (“simple case”) to find an interpolant between (  c)| A and (  c)| B

33 Partial Interpolant for Clauses Definition: Partial interpolant for clauses A  B  T ⊥ C – corresponding set of conflict clauses A  B  C – propositionally unsatisfiable c  C Partial interpolant for c, φ A,B (c), is defined inductively: Base: –c  A ⇒ φ A,B (c) = ⊥, –c  B ⇒ φ A,B (c) = ⊤ Inductive step: φ A,B (c) = interpolant for in T can be calculated by the “simple case” method

34 Extended Pudlák’s algorithm Input: – where A, B, C – clause sets –A ⋀ B ⊦ T ⊥ – T – proof of unsatisfiability for A ⋀ B For each clause c in T, define p(c): 1.c is not a resolution result ⇒ p(c):= φ A,B (c) 2.otherwise,  x,c 1,c 2.(c = resolve x (c 1,c 2 )) (a) x  A and x  B ⇒ p(c) := p(c 1 )  p(c 2 ) (b) x  B and x  A ⇒ p(c) := p(c 1 )  p(c 2 ) (c) x - AB-common ⇒ p(c) := (x  p(c 1 ))  (  x  p(c 2 )) p(⊥) is the interpolant for C – set of conflict clauses No change needed here…

35 Extended algorithm correctness Enough to show the invariant is maintained, i.e.,  c  T, p(c) is an interpolant for g A (c) =A  (  c)| A, g B (c)=B  (  c)| B Observation: in the base case, –c  A ⇒ φ A,B (c) = ⊥ ⇒ p(c) := ⊥ (as in the original algorithm) ⇒ old proof works –c  B ⇒ φ A,B (c) = ⊤ ⇒ p(c) := ⊤ (as in the original algorithm) ⇒ old proof works –new case: c  A and c  B ⇒ need new proof

36 Extended algorithm correctness(2) Base case: –left to prove for the case c  A and c  B –then φ A,B (c) is interpolant for (by definition) ⇒ ((  c)| A  φ A,B (c)) ⇒ ((A  (  c)| A )  φ A,B (c)) ⇒ (φ A,B (c)  (  c)| B  ⊥) ⇒ ((B  (  c)| B )  φ A,B (c)  ⊥ ) –thus p(c)=φ A,B (c) is indeed an interpolant for in T Induction step: –the proof relied only on the fact that the invariant holds in the base case => the old proof stays correct

37 Conclusions Presented: efficient and modular method for interpolant-generation Generic, and not theory-specific method Easy to incrementally extend interpolation- generation to additional theories Uses Nelson-Oppen framework in a modular way, and in case of its improvement can easily connect to the new version

38 Thank you!