120 likes | 243 Views
Heuristic Theorem Prover. Kenneth Roe 8/20/2006 www.fordocsys.com. Key contributions. Preprocessor before DPLL(T) Unate detection algorithm Rewriting Introduction of Symmetry Breaking to SMT Modulo Theorem Incremental difference logic encoding. SMT-COMP’06 configuration.
E N D
Heuristic Theorem Prover Kenneth Roe 8/20/2006 www.fordocsys.com
Key contributions • Preprocessor before DPLL(T) • Unate detection algorithm • Rewriting • Introduction of Symmetry Breaking to SMT Modulo Theorem • Incremental difference logic encoding
SMT-COMP’06 configuration • BIconnected Graph Meta System for Encoding to Sat or Smt (BIG MESS)
Rewriting • Algebraic simplification • Rules for arithmetic and boolean logic • Examples a+1+1+1+1 rewrites to a+4 a+2<b+3 rewrites to a<b+1 a and a rewrites to a • Some context rewriting a<b and b<a rewrites to False a<b and not(a=b) rewrites to a<b
Symmetry breaking • Currently only works for QF_UF division • Step 1: Detect symmetric variables: • Example: P(a,b) ^ P(b,a) • The variables a and b can be swapped and form a symmetric pair. • Step 2: Detect symmetric predicates: • In the example above P(a,b) and P(b,a) are symmetric • Step 3: Generate Symmetry breaking tuples • P(a,b) or not(P(b,a))
Unate detection algorithm • Detect atomic predicates that when asserted or denied make a complex boolean expression true or false • Example problem: • (a<b) and (if b=c then a+1=b else a<b+1) • For each subterm we compute four sets • Assert_makes_true • Deny_makes_true • Assert_makes_false • Deny_makes_false • Also compute pair wise implications between atomic predicates
Unate detection algorithm example (a<b) and (if b=c then a+1=b else a<b+1) b=c assert_makes_true={b=c} deny_makes_false={b=c} a<b assert_makes_true={a<b,a+1=b} deny_makes_false={a<b,a<b+1} a+1=b assert_makes_true={a+1=b} deny_makes_false={a+1=b,a<b,a<b+1} a<b+1 assert_makes_true={a<b,a<b+1,a+1=b} deny_makes_false={a<b+1}
Unate detection algorithm example (a<b) and (if b=c then a+1=b else a<b+1) if b=c then a+1=b else a<b+1 assert_makes_true={a+1=b} deny_makes_false={a<b+1} (a<b) and (if b=c then a+1=b else a<b+1) assert_makes_true={a+1=b} deny_makes_false={a<b,a<b+1}
Difference logic encoding • Example • not(a < b) or ((a<b) and (b < c) and (c < a)) • Introduce boolean variables • (a < b) => A • (b < c) => B • (c < a) => C • Encode and add predicates for illegal combinations • (not(A) or (A and B and C)) and (not(A) or not(B) or not(C))
Results • Difference logic encoding useful on most cases in QF_LIA, QF_LRA and QF_IDL—quite effective in gaining performance • Symmetry breaking effective in improving performance
Results • Rewriting useful on select problems (WISA for example) • Unate detection not useful on its own but is a critical building block for the difference logic encoding