1 / 37

Decision Procedures in First Order Logic

Decision Procedures in First Order Logic. Propositional Encodings. TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A. A system of conjoined linear inequalities. Fourier-Motzkin Elimination. m constraints. n variables.

phuong
Download Presentation

Decision Procedures in First Order Logic

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. Decision Procedures in First Order Logic Propositional Encodings Daniel Kroening and Ofer Strichman TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAA

  2. A system of conjoined linear inequalities Fourier-Motzkin Elimination mconstraints nvariables Decision Procedures An algorithmic point of view

  3. When eliminating xn, partition the constraints according to the coefficient ai,n: • ai,n> 0: upper bound • ai,n< 0: lower bound Decision Procedures An algorithmic point of view

  4. Assume we eliminatex1. • Example: (1) x1 – x2 ≤ 0 (2) x1 – x3 ≤ 0 (3) -x1 + x2 + 2x3 ≤ 0 (4) -x3 ≤ -1 Category? Lower bound Lower bound Upper bound Decision Procedures An algorithmic point of view

  5. For each pair of a lower bound al,n<0 andupper bound au,n>0, we have • For each such pair, add a constraint • In other words, apply the proof rule: Decision Procedures An algorithmic point of view

  6. Example: (1) x1 – x2 ≤ 0 (2) x1 – x3 ≤ 0 (3) -x1 + x2 + 2x3 ≤ 0 (4) -x3 ≤ -1 (5) 2x3 ≤ 0 (from 1 and 3) (6) x2 + x3 ≤ 0 (from 2 and 3) Eliminatex1. Decision Procedures An algorithmic point of view

  7. Example: (1) x1 – x2 ≤ 0 (2) x1 – x3 ≤ 0 (3) -x1 + x2 + 2x3 ≤ 0 (4) -x3≤ -1 (5) 2x3 ≤ 0 (from 1 and 3) (6) x2 + x3 ≤ 0 (from 2 and 3) (7) 0 ≤ -1 (from 4 and 5) Eliminatex3. Contradiction (the system is unsatisfiable)! Decision Procedures An algorithmic point of view

  8. Complexity of Fourier-Motzkin • In verification we typically solve a large number of small linear inequality systems. • The bottleneck: case splitting • Q: Is there an alternative to case-splitting ? Decision Procedures An algorithmic point of view

  9. Boolean Fourier-Motzkin (BFM) (1/2) • Normalize formula: • Transform to NNF • Eliminate negations by reversing inequality signs (x1–x2  0)  x1–x3< 0  (-x1 + 2x3 + x2  0  1  x3 ) x1–x2< 0  x1–x3< 0  (-x1 + 2x3 + x2 < 0  -x3< -1) Decision Procedures An algorithmic point of view

  10. e1 e3 e5 x1 – x2< 0 -x1 + 2x3 + x2< 0 2x3 <0 e1 e3  e5 Boolean Fourier-Motzkin (BFM) (2/2) : x1 - x2< 0  x1 - x3< 0  (-x1 + 2x3 + x2 < 0  -x3< -1) e1  e2  ( e3  e4 ) 2.Derive Bsk 3. DeriveBtrans: Perform FM on the conjunction of all predicates: 4. Solve ’ =BskÆ(Btrans) Decision Procedures An algorithmic point of view

  11. e1e3e5 e5 2x3 < 0 e6x2 + x3 < 0 e2e3e6 False 0 < -1 e4e5False BFM: example  Computing Bsk Computing Btrans e1x1 – x2< 0 e2x1 – x3< 0 e3 -x1 + 2x3 + x2< 0 e4 -x3< -1 e1  e2  (e3  e4) Btrans ’ = BskÆBtrans is satisfiable Decision Procedures An algorithmic point of view

  12. A proof rule • A proof step (r,p,a) • r: Rule • p: Proposition • a: Antecedents Decision Procedures An algorithmic point of view

  13. Some proof rules Decision Procedures An algorithmic point of view

  14. Let’s prove Decision Procedures An algorithmic point of view

  15. Proof-graph of P A A,B:sets of propositions PprovesBusingA: A B Decision Procedures An algorithmic point of view

  16. Boolean encoding • Definition(Proof-step Constraint): if A1…Ak are the antecedents of step then • Example: c(step):= e(x=5) Æe(:x¸ 0) !e(:5 ¸ 0) Decision Procedures An algorithmic point of view

  17. A proofP =(s1,…, sn) is a set of Proof Steps, in which the Antecedence relation is acyclic. • The Proof Constraintc(P) induced by P is the conjunction of the constraints induced by its steps: Decision Procedures An algorithmic point of view

  18. Propositional skeleton: Decision Procedures An algorithmic point of view

  19. A proof P is said to prove validity of  if :skÆc(P) is unsatisfiable. • Normally proofs refer to the Boolean skeleton (the roots are sub-formulas). • We will consider proofs starting from literals, and, hence, no Boolean structure. Decision Procedures An algorithmic point of view

  20. Example • Prove validity of x 5 Çx ¸ 0 by using atoms only Decision Procedures An algorithmic point of view

  21. Example (cont’d) :sk Æc(P’) is unsatisfiable hence  is valid Decision Procedures An algorithmic point of view

  22. Complete proofs • Definition (Complete proofs): A proof P is called complete with respect to  if Decision Procedures An algorithmic point of view

  23. TL(): Theory Literals corresponding to  • Proposition (sufficient condition for completeness #1): Let  be an unsatisfiable formula, and let A denote the set of full assignments that satisfy sk. A proof P is complete with respect to  if 82 A, Decision Procedures An algorithmic point of view

  24. TL(): Theory Literals corresponding to  For a partial assignments.t.², is minimal if8v. nv 2 • Proposition (sufficient condition for completeness #2): Let  be an unsatisfiable formula, and let A denote the set of minimal assignments that satisfy sk. A proof P is complete with respect to  if 82 A, Decision Procedures An algorithmic point of view

  25. Proposition (sufficient condition for completeness #3): Let  be an unsatisfiable formula, and let A denote the set of minimal assignments that satisfy sk. A proof P is complete with respect to if 82 A, for some unsatisfiable coreTLuc() µ TL() TL(): Theory Literals corresponding to  Decision Procedures An algorithmic point of view

  26. Goal: find complete proofs • We will see a ‘complete’ proof mechanism, based on projection. • First, let us define projection in terms of proof steps. Decision Procedures An algorithmic point of view

  27. Decision Procedures An algorithmic point of view

  28. Example - projection • Indeed, • x1 var(x4 > x4) • ’ = (x2 > x3) Æ (x4 > x4) is equisatisfiable to  Decision Procedures An algorithmic point of view

  29. Decision Procedures An algorithmic point of view

  30. Example – strong projection • Indeed are unsatisfiable and do not contain x1. U2 U1 Decision Procedures An algorithmic point of view

  31. Decision Procedures An algorithmic point of view

  32. Decision Procedures An algorithmic point of view

  33. Decision Procedures An algorithmic point of view

  34. Decision Procedures An algorithmic point of view

  35. Examples • Disjunctive Linear arithmetic:Boolean Fourier-Motzkin • Equality Logic: • For each pair of predicatesof the form xi=xj and xj=xk in , apply: • To each pair of contradicting predicates of the form xi = xj and xi xj, apply Decision Procedures An algorithmic point of view

  36. Optimizations • Conjunction Matrices • Early detection • Cross-theory learning Decision Procedures An algorithmic point of view

  37. Cross-theory learning • T1: • T2: • From T1 we learn z1=z2,which we propagate to T2 • In T2 we get a contradiction on: z1> 2, z2=1, z1=z2 • This results in a conflict clause: • Which represents cross-theory learning Decision Procedures An algorithmic point of view

More Related