Title: An Interpolating Theorem Prover
1An Interpolating Theorem Prover
- K.L. McMillan
- Cadence Berkley Labs
2Agenda
- 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
3Agenda
- 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
4Concepts
- term - linear combination c0c1v1cnvn
- v1vn distinct individual variables
- c0cn rational constants, c1cn?0
- x,y terms
- x is 1a, y is b-2a gt 2xy is term 2b
- atomic predicate
- 0 x (x is term)
- propositional variable
5Concepts Cont.
- literal - atomic predicate or its negation
- clause - (l1 v v ln) l1..n literals
- ? - set of literals
- lt?gt - clause from literal of ?
- ltgt - 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
6Concepts cont.
- - - 0-1 (False)
-
-
-
- is interpolant
(deduction of )
7Agenda
- 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
8Proof Rules for LI
9Proof Example
This is a refutation proof
10Motivation for interpolant definition
- A - 0 w-x, 0 x-y
- B - 0 y-z
- F AB 0 w-y
- Contribution from A FA 0 w-y
- A FA
- FA,B F
- Coefficient of w is the same in A and FA
- When F 0 -1 then FA B
11Inequality Interpolation
- Definition 1 (A,B) - 0 x x, ?, ?
- A, B clause sets
- x, x terms
- ??, ? formulas such that
- A, ? 0 x ?
- B ? and B, ? 0 x - x
- ?, ? B x, ?, ? A (x-x) B
- For the current system, the formulas ? and ? are
always T.
12Hypotheses
13Hypotheses
14Soundness
-
-
-
- Comb
-
-
-
- Comb
- Condition 3 is trivial
15Example
- We want to derive an interpolant for (A,B) where
- A - (0y-x),(0z-y)
- B - (0x-z-1)
- In example
16Solution
- A - (0y-x),(0z-y)
- B - (0x-z-1)
- Step 1,2
- Step 3
- Step 4
- Step 5
17Interpolation syntax for clauses
- Definition 2 (A,B) - lt ? gt ?
- A, B clause sets
- ? literal set
- ? formula
- A f v lt ?\Bgt
- B, f lt ??Bgt
- ? B and ? A
- If ? is empty, ? is an interpolant for (A,B).
18Hypotheses
19Resolution Rules
20Resolution(A) Soundness
21Resolution(B) Soundness
22 Contradiction Rule
23Soundness
-
- Condition 1
- Definition 1
- DeMorgan
24Soundness
- Condition 2
- Definition 1 (condition 2)
- Previous DeMorgan
- Condition 3
- Third condition of definition 1 guaranties that.
Because coefficient of every must be 0.
25Example
- We want to derive an interpolant for (A,B) where
- Step 1
- Step 2
-
26Example (Cont.)
27Agenda
- 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
28Proof rules for EUF
29Proof rules for EUF
- CONTRA and RES rules the same as in previous
system.
30Motivation for interpolant definition
- ??gt(xt1)(t1t2)(tny)
- 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 (tktm) only from A can be summarized
by a single (tktm) such that ?tk and tm ?
by location. - tk, tmare common between A,B
31Motivation for interpolant definition
- ? - will present conjunction of such subchains
- A ?
- B, ? ??
- ? consists only from common variables from (A,B)
- ? is interpolant for xy
- If ? not contains global terms ? degenerate case
? ?x and ?y ? ? T
32Equality Interpulation
- Definition 3 (A,B) - xy x, y, ?, ?
- A,B clause sets
- x, y, x, y terms
- ?, ? formulas
- A, ? xx yy ?
- B ? and
- x y and y x (the degenerate case), or
- x,y B and B, ? xy
- ?,? B and ?,? B, and if x B then x x
else x A (similarity for y,y)
33More 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 xy
- x(y/z) if then y else x
- syntactic equality, equality pass
contains global variable
34Hypotheses
35Hypotheses
36Transitivity Rule
37Transitivity 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
38Transitivity Sound Prove
39Transitivity Sound Prove (cont.)
- Condition 2 Suppose B, ?, ?, yy
40Transitivity Sound Prove (cont.)
41Transitivity degenerate
- Now yz is solution for xz
- B,? yz
42Transitivity Rule (degenerate) - Sound
- Condition 1 Suppose A, ?, ?
- Same for zz(y/y)
43Transitivity Rule (degenerate) - Sound
- Condition 2 Suppose B, ?, ?
44Transitivity Rule (degenerate) - Sound
45Cong-Rule
46Cong-Rule Soundness
47Cong-Rule Soundness
48Cong-Rule Soundness
49EqNeq Rules
50Example
- We want to derive an interpolant for f(x)f(y)
- A xy
- B yz
- Step 1,2 Two hypotheses
- Step 3
- Step 4
51Agenda
- 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
52Combining LI and EUF - Rules
- Pass from equality to inequality
- From inequality to equality
53Interpolating Rules
- From equality to inequality
54LeqEq - Soundness
- Condition 1
- Condition 2
- Condition 3
55Interpolating Rules
- From inequality to euality
56EqLeq - Soundness
- Condition 1 Trivial
- Condition 2
- Condition 3
57Soundness and Completeness
- Definition 4 ? is interpolant for (A,B)
- A ?
- B, ? False
- ? A and ? B
- Theorem 1 (Soundness) If a clause interpolation
of the form (A,B)- ltgt f is derivable, then f
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.
58Agenda
- 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
59Generating Proofs
- Use combination of DPLL based SAT solver
(propositional reasoning) Nelson-Oppen style
ground decision procedure (theory reasoning)
using lazy approach.
60Interpolants for structured formulas
- Problem A, B have arbitrary nesting of Boolean
operators and not CNF structure. - We will transfer general (A,B) into (Ac,Bc) where
Ac, Bc are in clause form. - Tseitin encoding is used for convert to CNF
structure. - Theorem 3 An interpolant for (Ac,Bc) is also an
interpolant for (A,B).
61Applications
- Using Interpolation for Predicate Refinement.
- Model Checking with Interpolation
62Contribution
- Development of combined proof system for LI and
EUF. - Interpolant extraction from combination of two
theories LIEUF based on proof system rools.
63