Stronger learning and higher backjumping

Slides:



Advertisements
Similar presentations
The behavior of SAT solvers in model checking applications K. L. McMillan Cadence Berkeley Labs.
Advertisements

Exploiting SAT solvers in unbounded model checking
Boolean Satisfiability
Chaff: Engineering an Efficient SAT Solver Matthew W.Moskewicz, Concor F. Madigan, Ying Zhao, Lintao Zhang, Sharad Malik Princeton University Modified.
Presented by Monissa Mohan 1.  A highly optimized BCP algorithm  Two watched literals  Fast Backtracking  Efficient Decision Heuristic  Focused on.
Chaff: Engineering an Efficient SAT Solver Matthew W.Moskewicz, Concor F. Madigan, Ying Zhao, Lintao Zhang, Sharad Malik Princeton University Presenting:
Introduction to MiniSat v1.14 Presented by Yunho Kim Provable Software Lab, KAIST.
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View SAT.
1/30 SAT Solver Changki PSWLAB SAT Solver Daniel Kroening, Ofer Strichman.
Abstract Answer Set Solver. Todolist Print the rules of Fig 1.
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 21 Instructor: Paul Beame.
Presented by Ed Clarke Slides borrowed from P. Chauhan and C. Bartzis
Algorithms in Exponential Time. Outline Backtracking Local Search Randomization: Reducing to a Polynomial-Time Case Randomization: Permuting the Evaluation.
Constraint Satisfaction Problems
GRASP-an efficient SAT solver Pankaj Chauhan. 6/19/ : GRASP and Chaff2 What is SAT? Given a propositional formula in CNF, find an assignment.
Efficient SAT Solving for Non- clausal Formulas using DPLL, Graphs, and Watched-cuts Himanshu Jain Edmund M. Clarke.
State-of-the-art in SAT solvers
GRASP SAT solver Presented by Constantinos Bartzis Slides borrowed from Pankaj Chauhan J. Marques-Silva and K. Sakallah.
1 A theory-based decision heuristic for DPLL(T) Dan Goldwasser Ofer Strichman Shai Fine Haifa university TechnionIBM-HRL.
A Compressed Breadth-First Search for Satisfiability DoRon B. Motter and Igor L. Markov University of Michigan, Ann Arbor.
1 Abstraction Refinement for Bounded Model Checking Anubhav Gupta, CMU Ofer Strichman, Technion Highly Jet Lagged.
Chapter 5 Outline Formal definition of CSP CSP Examples
SAT Solving Presented by Avi Yadgar. The SAT Problem Given a Boolean formula, look for assignment A for such that.  A is a solution for. A partial assignment.
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
1 Agenda Modeling problems in Propositional Logic SAT basics Decision heuristics Non-chronological Backtracking Learning with Conflict Clauses SAT and.
Exact methods for ALB ALB problem can be considered as a shortest path problem The complete graph need not be developed since one can stop as soon as in.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Greedy algorithms David Kauchak cs161 Summer 2009.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Chapter 5 Constraint Satisfaction Problems
Maximum Density Still Life Symmetries and Lazy Clause Generation Geoffrey Chu, Maria Garcia de la Banda, Chris Mears, Peter J. Stuckey.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
Greedy algorithms David Kauchak cs302 Spring 2012.
SAT Solving As implemented in - DPLL solvers: GRASP, Chaff and
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
The NP class. NP-completeness
More NP-Complete and NP-hard Problems
CS137: Electronic Design Automation
Hybrid BDD and All-SAT Method for Model Checking
Inference and search for the propositional satisfiability problem
Parallelism in SAT Solvers
Hard Problems Introduction to NP
A theory-based decision heuristic for DPLL(T)
Multiprocessor Cache Coherency
Introduction to Software Verification
Clause Learning and Intelligent Backtracking in MiniSAT
Heuristics for Efficient SAT Solving
Introduction to the Boolean Satisfiability Problem
ECE 667 Synthesis and Verification of Digital Circuits
Unit Propagation and Variable Ordering in MiniSAT
Decision Procedures An Algorithmic Point of View
Clause Learning and Intelligent Backtracking in MiniSAT
Unit Propagation and Variable Ordering in MiniSAT
Resolution Proofs for Combinational Equivalence
Artificial Intelligence
Artificial Intelligence
Heuristic Minimization of Two Level Circuits
Minimax strategies, alpha beta pruning
Clause Learning and Intelligent Backtracking in MiniSAT
Minimax strategies, alpha beta pruning
Solving Non-clausal Formulas with DPLL search
GRASP-an efficient SAT solver
Faster Extraction of High-Level Minimal Unsatisfiable Cores
Verifying Clausal Proofs, DRUPing and Interpolants SAT/SMT Seminar
CS137: Electronic Design Automation
Presentation transcript:

Stronger learning and higher backjumping Clause minimization Stronger learning and higher backjumping Recursive conflict clause reduction (deep /shallow) Glucose-style Volunteers and inverse-arcs ContraMinisat

Learnt Conflict Clauses, and minimization 𝑟𝑒𝑎𝑠𝑜𝑛 𝑥 3 = 𝜔 4 , 𝑟𝑒𝑎𝑠𝑜𝑛 𝑥 6 = 𝜔 5 , … Local / General implication graph x10=0@3 x5=1@6 4 1 x2=1@6 Learnt Conflict clause: (x10 Ç :x4 Ç x11) 6  conflict Decision 3 x1=1@6 x4=1@6 3 2 5 Redundant – does not change the satisfiability 2 5 x3=1@6 x6=1@6 𝑥 10 → 𝑥 11 or, 𝑥 11 → 𝑥 10 Clause minimization: Drop 𝑥 11 x9=0@1 x11=0@3

Learnt Conflict Clauses, and minimization More generally: if we have a c.c. 𝑐=( 𝑥 0 ∨⋯∨ 𝑥 𝑛 ), and ... all reverse paths on the implication graph hit 𝑐 literals... x10=0@3 x5=1@6 4 6  conflict x4=1@6 5 Redundant – does not change the satisfiability 5 x6=1@6 𝑥 𝑖 ∈𝑐 𝑥 𝑖 ∧ 𝑥 𝑗 ∧ 𝑥 𝑘 → 𝑥 𝑙 or, 𝑥 𝑙 → 𝑥 𝑖 ∨ 𝑥 𝑗 ∨ 𝑥 𝑘 Clause minimization: Drop 𝑥 𝑙 𝑥 𝑙 =0@3 𝑥 𝑗 ∈𝑐 𝑥 𝑘 ∈𝑐

More generally... Learnt clause: 𝑐= 𝑥 0 ∨⋯∨ 𝑥 𝑛 For 0≤𝑗≤𝑛, we can remove 𝑥 𝑗 if 𝜑∧ 𝑥 𝑗 → 𝑐∖𝑥 𝑗 Or, more generally, for any 𝑐 ′ ⊆ 𝑐∖ 𝑥 𝑗 , 𝜑∧ 𝑥 𝑗 →𝑐′ equivalently, if 𝜑∧ 𝑐 ′ → 𝑥 𝑗 E.g., in the previous slide: 𝑥 𝑖 ∧ 𝑥 𝑗 ∧ 𝑥 𝑘 → 𝑥 𝑙 Order of checking matters. Can we optimize ?

Clause minimization: minisat Deep mode (recursive conflict-clause reduction): Traverse recursively 𝑟𝑒𝑎𝑠𝑜𝑛( 𝑥 𝑗 ) Stop if a literal is not in the decision levels of 𝑐 . Stop if hitting a decision variable. If all paths hit a variable from 𝑐, remove 𝑥 𝑗 . e.g., we hit 𝑥 2 , 𝑥 5 , 𝑥 7 , hence 𝑥 2 ∧ 𝑥 5 ∧ 𝑥 7 → 𝑥 𝑗 , or equivalently 𝑥 𝑗 → 𝑥 2 ∨ 𝑥 5 ∨ 𝑥 7 Instead of maintaining the list of decision levels of c’s literals and checking it each time, they maintain an abstraction of that list; hence they might end up visiting such a level, which will anyway result in hitting a decision variable and aborting. * Minimizing Learned clauses/Sörensson, Biere, SAT’09

Clause minimization: minisat Deep mode (recursive conflict-clause reduction), optimization: Suppose 𝐿= 𝑥∈𝑐 𝑑.𝑙.(𝑥) Don’t: maintain 𝐿 as a list and search it. Do: maintain an abstraction of 𝐿 in a 32- bit int; Suppose we hit 𝑙∉𝐿 but 𝑙∈𝑎𝑏𝑠(𝐿) => hit a decision variable and abort. Hence, cannot hinder correctness * Minimizing Learned clauses/Sörensson, Biere, SAT’09

Clause minimization: minisat Shallow mode: same as deep mode, but only search in current d.l. Literals seen in the current analysis * Minimizing Learned clauses/Sörensson, Biere, SAT’09

Clause minimization: Glucose Use binary clauses: If (𝑐 0 ∨ 𝑥 𝑖 ) is a binary clause, remove 𝑥 𝑖 from 𝑐. asserting literal Instead of maintaining the list of decision levels of c’s literals and checking it each time, they maintain an abstraction of that list; hence they might end up visiting such a level, which will anyway result in hitting a decision variable and aborting. * Chanseok Ho’s Glucose patch to minisat.

Volunteers and inverse arcs Let c = ( 𝑥 0 ∨…∨ 𝑥 𝑛 ) = 𝑟𝑒𝑎𝑠𝑜𝑛(𝑥 0 ) i.e., 𝑥 1 ∧⋯∧ 𝑥 𝑛 → 𝑥 0 𝑐 has the following two properties: 𝑥 1 … 𝑥 𝑛 are currently false 𝑥 0 is the latest in the trail In a volunteer of 𝑥 0 , item#2 no longer holds: For some 1≤𝑖≤𝑛, 𝑙𝑒𝑣𝑒𝑙 𝑥 𝑖 >𝑙𝑒𝑣𝑒𝑙( 𝑥 0 ) i.e., some false literal discovered after true literal.

Volunteers and inverse arcs Let c ′ = 𝑥 0 ∨ 𝑦 1 …∨ 𝑦 𝑛 i.e., 𝑦 1 ∧⋯∧ 𝑦 𝑛 → 𝑥 0 𝑐′ has the following two properties: 𝑦 1 … 𝑦 𝑛 are currently false 𝑥 0 is not the latest in the trail // (possibly earlier d.l., possibly was a decision) e.g., current level: 6 𝑥 1 ∧ 𝑥 2 ∧⋯∧ 𝑥 𝑛 → 𝑥 0 𝑐 ′ is called a volunteer* for 𝑥 0 : gives us an alternative reason clause. Volunteers are generalization of inverse-arcs** 6 5 3 level: * Generalized Conflict-Clause Strengthening for Satisfiability Solvers/Van-Gelder, SAT’11 ** generalized framework for conflict analysis / Audemard et al. SAT’08.

Inverse arcs Conflict clause A=( α∨ 𝑥 𝑚 ∨ 𝑦 𝑖 ) Conflict clause A=( α∨ 𝑥 𝑚 ∨ 𝑦 𝑖 ) 𝛼 – literals with level ≤𝑖 𝑥 – asserting literal 𝑖<𝑚 – back-jumping level 4. Find a volunteer for 𝑦 𝑖 𝑐′=( 𝛽 𝑗 ∨ 𝛾 𝑘 ∨ 𝑦 𝑖 ) 𝐴 ′ = 𝑟𝑒𝑠 𝐴,𝑐′,𝑦 = 𝛼∨ 𝛽 𝑗 ∨ 𝛾 𝑘 ∨ 𝑥 𝑚 Ideally: 𝛾 𝑘 =0 Then 𝐴′ is an asserting clause with back-jumping level 𝑗<𝑖. Otherwise… (next slide) 𝑗<𝑖 𝑘≥𝑖 1 Note that we do not start the process if in A there is more than one literal at level i. ** generalized framework for conflict analysis / Audemard et al. SAT’08.

Inverse arcs Otherwise 𝛾 𝑘 >0 : repeat with 𝐴′ being the conflicting clause. Not necessarily will be better. But we can apply recursively. Heuristics for choosing the inverse arc 𝑐′: Do not start the process if in 𝐴 there is more than one literal at level 𝑖. Otherwise, allow only if ∀𝑙∈ 𝛾 𝑘 . 𝑙𝑒𝑣𝑒𝑙 𝑙 =𝑚 and 𝑙 seen on the implication graph so far This guarantees that it will be eliminated during conflict analysis, … and that we jump to 𝑗 < 𝑖 ** generalized framework for conflict analysis / Audemard et al. SAT’08.

Inverse arcs can create cycles Generally adding inverse arcs can lead to cycles in the implication graph, e.g.: 𝑐 0 = 𝑥 0 𝑥 1 𝑥 4 𝑐 1 =( 𝑥 2 𝑥 0 𝑥 3 ) 𝑐 2 = 𝑥 1 𝑥 2 This, in turn, may lead to cycles in the resolution process. Such cycles are expensive to detect. 𝑥 0 𝑥 1 𝑥 3 𝑥 2 𝑥 4 ** generalized framework for conflict analysis / Audemard et al. SAT’08.

Precosat’s solution to volunteers without cycles Precosat considers volunteers of a specific type: When learning 𝑐 with asserting literal 𝑥 0 (𝑟𝑒𝑎𝑠𝑜𝑛 𝑥 0 =𝑐) Consider a clause c′=( 𝑥 0 𝑦 1 ⋯ 𝑦 𝑛 ) a volunteer if 𝑥 0 was last to be assigned in 𝑐’. ⇒ 𝑥 0 did not lead to propagating any 𝑦 𝑖 , ⇒ no cycles 𝑐′≠𝑟𝑒𝑎𝑠𝑜𝑛( 𝑥 0 ) because of the literal order in the trail. Precosat apparently has the same goal but looks only at a specific type of volunteers. * Precosat (unpublished; open source)

Example Suppose 𝑐= 𝑥 0 𝑧 , 𝑐′={ 𝑥 0 𝑦 } The trail: Had 𝑦 been processed first… 𝑟𝑒𝑎𝑠𝑜𝑛 𝑥 0 =𝑐′ 𝑥 … 𝑦 𝑥 0 𝑟𝑒𝑎𝑠𝑜𝑛 𝑥 0 =𝐶 qhead * Precosat (unpublished; open source)

ContraMiniSat BCP is not done directly on the trail as in Minisat Instead, maintain a priority-queue of implications Implication = clause + priority 𝑙𝑒𝑣𝑒𝑙, 𝑡𝑟𝑎𝑖𝑙_𝐼𝑛𝑑𝑒𝑥 // lower is better Rationale: prefer antecedents with low decision levels; among those, prefer stronger literals. Max. dec. level of the non-watched literals Index of the implying literal in the local trail * Contrasat – A contrarian SAT solver (system description) /Van-Gelder