1 / 22

Interpolant Generation without Constructing Resolution Graph

Interpolant Generation without Constructing Resolution Graph. Speaker : Guo-Jhu Huang Advisor : Chun-Yao Wang 200 9 .10.09. Outline. Introduction Preliminary Previous work Algorithm. Introduction – What is Interpolant. Craig Interpolation theorem

igor-mclean
Download Presentation

Interpolant Generation without Constructing Resolution Graph

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. Interpolant Generation without Constructing Resolution Graph Speaker : Guo-Jhu Huang Advisor : Chun-Yao Wang 200 9 .10.09

  2. Outline • Introduction • Preliminary • Previous work • Algorithm

  3. Introduction – What is Interpolant • Craig Interpolation theorem Given two boolean formulas A and B with A ∩ B unsatisfiable, there exist an interpolant I such that • A → I • I ∩ B is unsatisfiable • I refers to only common variables of A and B I B A

  4. Introduction - Application • Interpolation is an important technique on synthesis and verification • Application example – Resubstitution • f is target signal in circuit • A:f-ODC • B:f’-ODC f’ f’ ODC f f f

  5. Preliminary – Resolvent • Resolvent Given two clauses, C1=pAand C2=-pB, where A=l1l2….ln and B=k1k2….km • the resolvent(Cr) of C1 and C2 is the clause AB, and p is called pivot variable • the meaning is C1C2Cr • Example C1=ab, C2=-ac • Cr=bc

  6. Preliminary – Circuit to CNF •  = g1(g1g2+c)(g2a*b) = g1(g1(g2+c))’(g2(a*b))’ = g1(g1+g2’)(g1+c’)(g1’+g2+c)(g2+a’+b’)(g2’+a)(g2’+b) a g2 b g1 c

  7. Preliminary – Conflict Driven SAT Solving Assumption Setting Boolean Constraint Propagation • Boolean Constraint Propagation • BCP is repeat implication until there is no clause could be implied • (x+y) , if x is false, then y is implied true • Conflict Analysis • Find the “reason” occurs conflict • Add the reason as the learn clause • Non-chronlogical Backtracking • Backtrack to the decision until the learn clause is not conflict SAT Conflict? All Assign? Conflict Analysis Decision Non-chronlogical Backtracking Assumption Conflict ? UNSAT Conflict Driven SAT Solving

  8. SAT target: A  B 1 1 g4 g1 B A g5 g6 g2 g3 x y z Preliminary – Conflict Driven SAT Solving • A case • A=(g1)(g1+g2’)(g1+g3’)(g1’+g2+g3)(g2+x+z’)(g2’+x’)(g2’+z)(g3+x’+y+z)(g3’+x)(g3’+y’)(g3’+z’) • B=(g4)(g4+g5’)(g4+g6’)(g4’+g5+g6)(g5+x’+y’)(g5’+x)(g5’+y)(g6+x+z)(g6’+x’)(g6’+z’)

  9. Preliminary – Conflict Driven SAT Solving Assumption Setting partial clauses A B Boolean Constraint Propagation SAT (g1) (g3’+x) (g1’+g2+g3) (g2’+z) (g2’+x’) (g3’+y’) (g4) (g5’+x) (g4’+g5+g6) (g6’+z’) (g6’+x’) (g5’+y) Conflict? All Assign? x * g1 * g4 → conflict ≡ non-conflict → x’+g1’+g4’ Conflict Analysis Decision (x’+g1’+g4’) g3 y’ g1 Non-chronlogical Backtracking Assumption Conflict ? g2’ conflict x UNSAT g6’ g4 y g5 Conflict Driven SAT Solving

  10. Preliminary – Conflict driven SAT Solving Assumption Setting partial clauses A B Boolean Constraint Propagation SAT (g1) (g3’+x) (g1’+g2+g3) (g2’+z) (g2’+x’) (g3’+y’) (g4) (g5’+x) (g4’+g5+g6) (g6’+z’) (g6’+x’) (g5’+y) Conflict? All Assign? Conflict Analysis Decision (x’+g1’+g4’) g2 z g1 Non-chronlogical Backtracking Assumption Conflict ? g3’ conflict x’ UNSAT g5’ g4 z’ g6 Conflict Driven SAT Solving ( )

  11. Preliminary – Conflict Analysis 1. Imp Graph G 2. Conflict varx A B (g1) (g3’+x) (g1’+g2+g3) (g2’+z) (g2’+x’) (g3’+y’) (g4) (g5’+x) (g4’+g5+g6) (g6’+z’) (g6’+x’) (g5’+y) X = { x , -x } L ={} Present in X Present in L Is X singleton? (x’+g1’+g4’) g 3 y = pop last Implied literal in X c = clause imply y C = literal on c- y Learn clause l = -L + -X y’ g1 g2’ Return l R += c conflict x g6’ Z = { z  C | z implied at last level} X+= Z L += C/Z g4 y g5 Conflict Analysis

  12. Preliminary – Conflict Analysis 1. Imp Graph G 2. Conflict varx A B g3 g1 y’ (g1) (g3’+x) (g1’+g2+g3) (g2’+z) (g2’+x’) (g3’+y’) (g4) (g5’+x) (g4’+g5+g6) (g6’+z’) (g6’+x’) (g5’+y) X = { x , -x } L ={} g2’ x g6’ Is X singleton? g4 y g 5 y = pop last Implied literal in X c = clause imply y C = literal on c Learn clause l = -L + -X • (g3y) (g5y) (g4 g6g5) (g3g5) Return l R += c Record l and R (g4g6g3) (g1g2g3) Z = { z  C | z implied at last level} X+= Z L += C/Z (xg6) (g1g2g4g6) Resolution Graph (xg1g4g6) (xg2) (xg1g4) Conflict Analysis

  13. SAT target: A  B 1 1 g1 g4 B A g3 g2 g6 g5 x y z Preliminary – Resolution Graph • (g3y) (g5y) (g4 g6g5) (g3g5) (g4g6g3) (g1g2g3) (xg1g4) (g4) (g1) (xg1) (xg4) (xg6) (g1g2g4g6) (xg5) (x) (x) (xg3) (xg1g4g6) (g5) (g4g6g5) (xg2) (g3) (g1g2g3) (g6g5) (g2g3) (xg1g4) (g6z) (g6) (g2z) (g2) (z) (z) ( )

  14. Previous work SAT solver Resolution Graph Interpolant Memory overhead Belong to this method: Pudlak’s algorithm and McMillan’s algorithm

  15. Previous work – Pudlak’salgo. • Pudlak’s Algorithm • Leaf Node • Local to A to be const 0 • Local to B to be const 1 • Internal Node • If pivot variable is Local to A • IPT(c1)IPT(c2) • If pivot variable is Local to B • IPT(c1)IPT(c2) • If p is global with p in c1 and –p in c2 • (-p IPT(c1)) (p ITP(c2))

  16. x z -y Previous work – Pudlak’salgo. 1 0 • (g3y) (g5y) (g4 g6g5) (g3g5) (g4g6g3) (g1g2g3) (xg1g4) (g4) (g1) (xg1) (xg4) (g1g2g4g6) (xg2) (y0)(-y1) => -y (xg5) (x) (x) (xg3) (xg6) (xg1g4g6) (g5) (g4g6g5) (g3) (g1g2g3) (g6g5) (g2g3) (xg1g4) (g6z) (g6) (g2z) (g2) (z) (z) ( ) (z(-x(x-y)))(-z (x-y)) ITP(c1) = -x(x-y) ITP(c2) = x-y

  17. Algorithm Assumption Setting Boolean Constraint Propagation SAT SAT solver Conflict? All Assign? Interpolant Conflict Analysis + Sub-interpolant construction Decision Embedded interpolant construction in SAT solving Non-chronlogical Backtracking Assumption Conflict ? UNSAT

  18. Algorithm Main idea Ix x=1 B A x x=0 Ix’

  19. Algorithm • Boundary process, conflict at • Local A, I = constant 0 • Local B, I = constant 1 • Update sub-Interpolant by by ( y , c , I) • IL is Interpolant relate to clause c if c is learn • y is global and cA I = y  I • y is global and cB I = y  I • y is Local A and cLearn I = I IL • y is Local B and cLearn I = I IL • y is global and cLearn I = ( y  I) ( y IL) X = { x , -x } L ={} 1. Imp Graph G 2. Conflict varx I =boundary process Is X singleton? y = pop last Implied literal in X c = clause imply y C = literal on c Learn clause l = -L + -X I = update Sub-Interpolantby ( y , c , I) Return l Record l and I Z = { z  C | z implied at last level} X+= Z L += C/Z

  20. Algorithm Apply rule X = { x , -x } L ={} 1. Imp Graph G 2. Conflict varx • 2. y is global and cB I = y  I • 1. y is global and cA I = y  I No rule I =boundary process I = -y-y = -y I = -y0 = -y Sub-interpolant Is X singleton? 0 -y -y y = pop last Implied literal in X c = clause imply y C = literal on c Learn clause l = -L + -X g3 y’ g1 y= y , c= (g5 ’y) y= y’ , c= (g3 y’) y= g5 , c= (g4 g6’g5) g2’ I = update Sub-Interpolantby ( y , c , I) conflict Return l x Record l and I g6’ Z = { z  C | z implied at last level} X+= Z L += C/Z g4 y g5 Record < (-g1-g4 -x) , -y >

  21. Algorithm Record < (-g1-g4 -x) , -y > Apply rule X = { x , -x } L ={} 1. Imp Graph G 2. Conflict varx • 5. y is global and cLearn I = ( y  I) ( y IL) • 1. y is global and cA I = y  I • 2. y is global and cB I = y  I I =boundary process I = (-xz)(x-y) I = zz = z I = z0= z Sub-interpolant Is X singleton? z 0 z (-xz)(x-y) y = pop last Implied literal in X c = clause imply y C = literal on c Learn clause l = -L + -X g2 z g1 y= z , c= (g2z) y= x’ , c= (-g1-g4 -x) y= z’ , c= (g6’z’) g3’ I = update Sub-Interpolantby ( y , c , I) conflict x’ Return l Record l and I g5’ Z = { z  C | z implied at last level} X+= Z L += C/Z g4 z’ g6

  22. z x y Algorithm Interpolant : (-xz)(x-y)

More Related