1 / 63

An Interpolating Theorem Prover

An Interpolating Theorem Prover. K.L. McMillan Cadence Berkley Labs. 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

blincoln
Download Presentation

An Interpolating Theorem Prover

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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

  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

  4. Concepts • term - linear combination: c0+c1v1+…+cnvn • v1…vn : distinct individual variables • c0…cn : rational constants, c1…cn≠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

  5. Concepts Cont. • literal - atomic predicate or its negation • clause - (l1 v …v ln) : l1..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 {}├{} UA

  6. Concepts cont. • ┴ - 0≤-1 (False) • : is “interpolant“ (deduction of )

  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

  8. Proof Rules for LI

  9. Proof Example • Yael’s example: This is a refutation proof

  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: 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

  11. Inequality 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.

  12. Hypotheses

  13. Hypotheses

  14. Soundness • Comb: • Comb: • Condition 3 is trivial

  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:

  16. Solution • A - (0≤y-x),(0≤z-y) • B - (0≤x-z-1) • Step 1,2: • Step 3: • Step 4: • Step 5:

  17. Interpolation syntax for clauses • Definition 2: (A,B) |- <> [] • A, B : clause sets • : literal set • : formula • A |= φ v <\B> • B, φ |= <↓B> •  B and  A • If is empty,  is an interpolant for (A,B).

  18. Hypotheses

  19. Resolution Rules

  20. Resolution(A) Soundness • Condition 1,2:

  21. Resolution(B) Soundness • Condition 1,2:

  22. Contradiction Rule

  23. Soundness • Condition 1: • Definition 1: • DeMorgan:

  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.

  25. Example • We want to derive an interpolant for (A,B) where: • Step 1: • Step 2:

  26. Example (Cont.) • Step 3: • Step 4: • Result:

  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

  28. Proof rules for EUF • terms are: x1…xn fn(x1…xn)

  29. Proof rules for EUF • CONTRA and RES rules the same as in previous system.

  30. Motivation for interpolant definition • =>(x=t1)(t1=t2)…(tn=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 (tk=…=tm) only from A can be summarized by a single (tk=tm) such that ‘≤tk and tm≤ ’ by location. • tk, tm=are common between A,B

  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

  32. Equality Interpulation • Definition 3: (A,B) |- x=y [x’, y’, , ] • A,B : clause sets • x, y, x’, y’: terms • , : formulas • A, |= x=x’ y=y’  • B |= and • x’y andy’x (the degenerate case), or • x‘,y’ Band B,  |=x’=y’ • , B and , B, and if x B then x’ x else x’ A (similarity for y,y’)

  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

  34. Hypotheses

  35. Hypotheses

  36. Transitivity Rule

  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’’

  38. Transitivity Sound Prove • Condition 1:

  39. Transitivity Sound Prove (cont.) • Condition 2: Suppose B, , ’, y’=y’’

  40. Transitivity Sound Prove (cont.) • Condition 3: Trivial

  41. Transitivity degenerate • Now y’’=z’ is solution for x=z • B, |= y’’=z’

  42. Transitivity Rule (degenerate) - Sound • Condition 1: Suppose A, , ’ • Same for z=z’(y’/y)

  43. Transitivity Rule (degenerate) - Sound • Condition 2: Suppose B, , ’

  44. Transitivity Rule (degenerate) - Sound • Condition 3:

  45. Cong-Rule

  46. Cong-Rule Soundness • Condition 1:

  47. Cong-Rule Soundness • Condition 2:

  48. Cong-Rule Soundness • Condition 3:

  49. EqNeq Rules

  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:

More Related