Download presentation
Presentation is loading. Please wait.
Published byMarcia Weaver Modified over 9 years ago
1
AN INTERPOLATING THEOREM PROVER K.L. McMillan Cadence Berkley Labs
2
Agenda Concepts Inerpolants from Proofs Linear Inequalities (LI) Equality and Uninterpreted Functions (EUF) Combining LI and EUF An Interpolating Prover Generating Proofs Interpolants for Structured Formulas Applications 2
3
Agenda Concepts Inerpolants from Proofs Linear Inequalities (LI) Equality and Uninterpreted Functions (EUF) Combining LI and EUF An Interpolating Prover Generating Proofs Interpolants for Structured Formulas Applications 3
4
Concepts term - linear combination: c 0 +c 1 v 1 +…+c n v n v 1 …v n : distinct individual variables c 0 …c n : rational constants, c 1 …c n ≠0 x,y terms: x is 1+a, y is b-2a => 2x+y is term 2+b atomic predicate 0 ≤ x (x is term) propositional variable 4
5
Concepts Cont. literal - atomic predicate or its negation clause - (l 1 v …v l n ) : l 1..n : literals - set of literals - clause from literal of <> - empty clause = False sequent - ├ : , set of clauses conjunctions of entails disjunction of . lower case letters - formulas upper case letters - sets of formulas Example: , ├ ,A U { } ├ { } U A 5
6
Concepts cont. ┴ - 0≤-1 (False) : is “interpolant“ (deduction of ) 6
7
Agenda Concepts Inerpolants from Proofs Linear Inequalities (LI) Equality and Uninterpreted Functions (EUF) Combining LI and EUF An Interpolating Prover Generating Proofs Interpolants for Structured Formulas Applications 7
8
Proof Rules for LI 8
9
Proof Example Yael’s example: This is a refutation proof 9
10
Motivation for interpolant definition A - 0 ≤ w-x, 0 ≤ x-y B - 0 ≤ y-z F = A+B = 0 ≤ w-y Contribution from A: F A = 0 ≤ w-y A |= F A F A,B |= F Coefficient of w is the same in A and F A When F= 0 ≤ -1 then F A B 10
11
Inequality Interpolation Definition 1: (A,B) |- 0 ≤ x [x’, , ] – A, B : clause sets – x, x’ : terms – , : formulas such that 1. A, |= 0 ≤ x’ 2. B |= and B, |= 0 ≤ x - x’ 3. , B x’, ρ, A (x-x’) B For the current system, the formulas and are always T. 11
12
Hypotheses 12
13
Hypotheses 13
14
Soundness Comb: Condition 3 is trivial 14
15
Example We want to derive an interpolant for (A,B) where: A - (0≤y-x),(0≤z-y) B - (0≤x-z-1) In example: 15
16
Solution A - (0≤y-x),(0≤z-y) B - (0≤x-z-1) Step 1,2: Step 3: Step 4: Step 5: 16
17
Interpolation syntax for clauses Definition 2: (A,B) |- [ ] – A, B : clause sets – : literal set – : formula 1. A |= φ v 2. B, φ |= 3. B and A If is empty, is an interpolant for (A,B). 17
18
Hypotheses 18
19
Resolution Rules 19
20
Resolution(A) Soundness Condition 1,2: 20
21
Resolution(B) Soundness Condition 1,2: 21
22
Contradiction Rule 22
23
Soundness Condition 1: Definition 1: DeMorgan: 23
24
Soundness Condition 2: Definition 1 (condition 2): Previous + DeMorgan: Condition 3: Third condition of definition 1 guaranties that. Because coefficient of every must be 0. 24
25
Example We want to derive an interpolant for (A,B) where: Step 1: Step 2: 25
26
Example (Cont.) Step 3: Step 4: Result: 26
27
Agenda Concepts Inerpolants from Proofs Linear Inequalities (LI) Equality and Uninterpreted Functions (EUF) Combining LI and EUF An Interpolating Prover Generating Proofs Interpolants for Structured Formulas Applications 27
28
Proof rules for EUF terms are: x 1 …x n f n (x 1 …x n ) 28
29
Proof rules for EUF CONTRA and RES rules the same as in previous system. 29
30
Motivation for interpolant definition =>(x=t 1 )(t 1 =t 2 )…(t n =y) All equalities (A,B) At least one global term in ‘ - leftmost global term in (A,B) ’ - right most global term in (A,B) A |= x=‘ and y= ’ (everything from the left and right are from A) There are (t k =…=t m ) only from A can be summarized by a single (t k =t m ) such that ‘ ≤ t k and t m ≤ ’ by location. t k, t m =are common between A,B 30
31
Motivation for interpolant definition - will present conjunction of such subchains A |= B, |= ‘ = ’ consists only from common variables from (A,B) is interpolant for x=y If not contains global terms degenerate case ‘ =x and ’=y = T 31
32
Equality Interpulation Definition 3: (A,B) |- x=y [x’, y’, , ] – A,B : clause sets – x, y, x’, y’ : terms – , : formulas 1. A, |= x=x’ y=y’ 2. B |= and a. x’ y and y’ x (the degenerate case), or b. x‘,y’ B and B, |=x’=y’ 3. , B and , B, and if x B then x’ x else x’ A (similarity for y,y’) 32
33
More Concepts ‘(x,y) or : if x B then x else y (x,y)’ or : if y B then y else x : if then else T : if then T else x=y x(y/z) : if then y else x : syntactic equality, equality pass contains global variable 33
34
Hypotheses 34
35
Hypotheses 35
36
Transitivity Rule 36
37
Transitivity Rule - Motivation Solid lines = equalities from A Dotted lines = equalities from B, Not degenerate case x‘= z’ x = z If y is local then y’,y’’ A else y’ y’’ 37
38
Transitivity Sound Prove Condition 1: 38
39
Transitivity Sound Prove (cont.) Condition 2: Suppose B, , ’, y’=y’’ 39
40
Transitivity Sound Prove (cont.) Condition 3: Trivial 40
41
Transitivity degenerate Now y’’=z’ is solution for x=z B, |= y’’=z’ 41
42
Transitivity Rule (degenerate) - Sound Condition 1: Suppose A, , ’ Same for z=z’(y’/y) 42
43
Transitivity Rule (degenerate) - Sound Condition 2: Suppose B, , ’ 43
44
Transitivity Rule (degenerate) - Sound Condition 3: 44
45
Cong-Rule 45
46
Cong-Rule Soundness Condition 1: 46
47
Cong-Rule Soundness Condition 2: 47
48
Cong-Rule Soundness Condition 3: 48
49
EqNeq Rules 49
50
Example We want to derive an interpolant for f(x)=f(y) A : x=y B : y=z Step 1,2: Two hypotheses Step 3: Step 4: 50
51
Agenda Concepts Inerpolants from Proofs Linear Inequalities (LI) Equality and Uninterpreted Functions (EUF) Combining LI and EUF An Interpolating Prover Generating Proofs Interpolants for Structured Formulas Applications 51
52
Combining LI and EUF - Rules Pass from equality to inequality: From inequality to equality: 52
53
Interpolating Rules From equality to inequality: 53
54
LeqEq - Soundness Condition 1: Condition 2: Condition 3: 54
55
Interpolating Rules From inequality to euality: 55
56
EqLeq - Soundness Condition 1: Trivial Condition 2: Condition 3: 56
57
Soundness and Completeness Definition 4: is interpolant for (A,B) 1. A|= 2. B, |= False 3. A and B Theorem 1: (Soundness): If a clause interpolation of the form (A,B)|- <> [ φ ] is derivable, then φ is an interpolant for (A,B). Theorem 2: (Completeness): For any derivable sequent A,B |- ψ, there is a derivable interpolation of the form (A,B) |- ψ [X]. 57
58
Agenda Concepts Inerpolants from Proofs Linear Inequalities (LI) Equality and Uninterpreted Functions (EUF) Combining LI and EUF An Interpolating Prover Generating Proofs Interpolants for Structured Formulas Applications 58
59
Generating Proofs Use combination of DPLL based SAT solver (propositional reasoning) + Nelson-Oppen style ground decision procedure (theory reasoning) using “lazy” approach. 59
60
Interpolants for structured formulas Problem: A, B have arbitrary nesting of Boolean operators and not CNF structure. We will transfer general (A,B) into (A c,B c ) where A c, B c are in clause form. Tseitin encoding is used for convert to CNF structure. Theorem 3: An interpolant for (A c,B c ) is also an interpolant for (A,B). 60
61
Applications Using Interpolation for Predicate Refinement. Model Checking with Interpolation 61
62
Contribution Development of combined proof system for LI and EUF. Interpolant extraction from combination of two theories LI+EUF based on proof system rools. 62
63
Thank you 63
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.