HOME

TheInfoList



OR:

In
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includi ...
, conflict-driven clause learning (CDCL) is an algorithm for solving the
Boolean satisfiability problem In logic and computer science, the Boolean satisfiability problem (sometimes called propositional satisfiability problem and abbreviated SATISFIABILITY, SAT or B-SAT) is the problem of determining if there exists an interpretation that satisfie ...
(SAT). Given a Boolean formula, the SAT problem asks for an assignment of variables so that the entire formula evaluates to true. The internal workings of CDCL SAT solvers were inspired by DPLL solvers. The main difference between CDCL and DPLL is that CDCL's back jumping is non-chronological. Conflict-driven clause learning was proposed by Marques-Silva and Sakallah (1996, 1999) and Bayardo and Schrag (1997).


Background


Boolean satisfiability problem

The satisfiability problem consists in finding a satisfying assignment for a given formula in
conjunctive normal form In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of one or more clauses, where a clause is a disjunction of literals; otherwise put, it is a product of sums or an AND of ORs. As a cano ...
(CNF). An example of such a formula is: :( ( not ''A'') or (not ''C'') )  
and or AND may refer to: Logic, grammar, and computing * Conjunction (grammar), connecting two words, phrases, or clauses * Logical conjunction in mathematical logic, notated as "∧", "⋅", "&", or simple juxtaposition * Bitwise AND, a boolea ...
  (''B'' or ''C''), or, using a common notation:In the pictures below, "+" is used to denote "or", multiplication to denote "and", and a postfix "'" to denote "not". :(\lnot A \lor \lnot C) \land (B \lor C) where ''A'',''B'',''C'' are Boolean variables, \lnot A, \lnot C, B, and C are literals, and \lnot A \lor \lnot C and B \lor C are clauses. A satisfying assignment for this formula is e.g.: :A = \mathrm, B = \mathrm , C = \mathrm since it makes the first clause true (since \lnot A is true) as well as the second one (since C is true). This examples uses three variables (''A'', ''B'', ''C''), and there are two possible assignments (True and False) for each of them. So one has 2^3 = 8 possibilities. In this small example, one can use brute-force search to try all possible assignments and check if they satisfy the formula. But in realistic applications with millions of variables and clauses brute force search is impractical. The responsibility of a SAT solver is to find a satisfying assignment efficiently and quickly by applying different heuristics for complex CNF formulas.


Unit clause rule (unit propagation)

If an unsatisfied clause has all but one of its literals or variables evaluated at False, then the free literal must be True in order for the clause to be True. For example, if the below unsatisfied clause is evaluated with A = \mathrm and B = \mathrm we must have C = \mathrm in order for the clause (A \lor B \lor C ) to be true. The iterated application of the unit clause rule is referred to as unit propagation or Boolean constraint propagation (BCP).


Resolution

Consider two clauses (A \lor B \lor C ) and (\neg C \lor D \lor \neg E). The clause (A \lor B \lor D \lor \neg E), obtained by merging the two clauses and removing both \neg C and C, is called the resolvent of the two clauses.


Algorithm

Conflict-driven clause learning works as follows. # Select a variable and assign True or False. This is called decision state. Remember the assignment. # Apply Boolean constraint propagation (unit propagation). # Build the
implication graph In mathematical logic and graph theory, an implication graph is a skew-symmetric, directed graph composed of vertex set and directed edge set . Each vertex in represents the truth status of a Boolean literal, and each directed edge from verte ...
. # If there is any conflict ## Find the cut in the implication graph that led to the conflict ## Derive a new clause which is the negation of the assignments that led to the conflict ## Non-chronologically backtrack ("back jump") to the appropriate decision level, where the first-assigned variable involved in the conflict was assigned # Otherwise continue from step 1 until all variable values are assigned.


Example

A visual example of CDCL algorithm: File:Cdcl1.png, At first pick a branching variable, namely ''x1''. A yellow circle means an arbitrary decision. File:Cdcl2.png, Now apply unit propagation, which yields that ''x4'' must be 1 (i.e. True). A gray circle means a forced variable assignment during unit propagation. The resulting graph is called an
implication graph In mathematical logic and graph theory, an implication graph is a skew-symmetric, directed graph composed of vertex set and directed edge set . Each vertex in represents the truth status of a Boolean literal, and each directed edge from verte ...
. File:Cdcl3.png, Arbitrarily pick another branching variable, ''x3''. File:Cdcl4.png, Apply unit propagation and find the new implication graph. File:Cdcl5.png, Here the variables ''x8'' and ''x12'' are forced to be 0 and 1, respectively. File:Cdcl6.png, Pick another branching variable, ''x2''. File:Cdcl7.png, Find implication graph. File:Cdcl8.png, Pick another branching variable, ''x7''. File:Cdcl9.png, Find implication graph. File:Cdcl10.png, Found a conflict! File:Cdcl11.png, Find the cut that led to this conflict. From the cut, find a conflicting condition. File:Cdcl12.png, Take the negation of this condition and make it a clause. File:Cdcl13.png, Add the conflict clause to the problem. File:Cdcl14.png, Non-chronological back jump to appropriate decision level, which in this case is the second highest decision level of the literals in the learned clause. File:Cdcl15.png, Back jump and set variable values accordingly.


Completeness

DPLL is a sound and complete algorithm for SAT. CDCL SAT solvers implement DPLL, but can learn new clauses and backtrack non-chronologically. Clause learning with conflict analysis affects neither soundness nor completeness. Conflict analysis identifies new clauses using the resolution operation. Therefore, each learnt clause can be inferred from the original clauses and other learnt clauses by a sequence of resolution steps. If cN is the new learnt clause, then ϕ is satisfiable if and only if ϕ ∪ is also satisfiable. Moreover, the modified backtracking step also does not affect soundness or completeness, since backtracking information is obtained from each new learnt clause.


Applications

The main application of CDCL algorithm is in different SAT solvers including: * MiniSAT * Zchaff SAT * Z3 * Glucose * ManySAT etc. The CDCL algorithm has made SAT solvers so powerful that they are being used effectively in several real world application areas like AI planning, bioinformatics, software test pattern generation, software package dependencies, hardware and software model checking, and cryptography.


Related algorithms

Related algorithms to CDCL are the
Davis–Putnam algorithm The Davis–Putnam algorithm was developed by Martin Davis and Hilary Putnam for checking the validity of a first-order logic formula using a resolution-based decision procedure for propositional logic. Since the set of valid first-order formulas ...
and
DPLL algorithm In logic and computer science, the Davis–Putnam–Logemann–Loveland (DPLL) algorithm is a complete, backtracking-based search algorithm for deciding the satisfiability of propositional logic formulae in conjunctive normal form, i.e. for solvi ...
. The DP algorithm uses resolution refutation and it has potential memory access problem. Whereas the DPLL algorithm is OK for randomly generated instances, it is bad for instances generated in practical applications. CDCL is a more powerful approach to solve such problems in that applying CDCL provides less
state space search State space search is a process used in the field of computer science, including artificial intelligence (AI), in which successive configurations or ''states'' of an instance are considered, with the intention of finding a ''goal state'' with the ...
in comparison to DPLL. File:compareCdcl dpll1.png, DPLL: no learning and chronological backtracking. File:compareCdcl dpll2.png, CDCL: conflict-driven clause learning and non – chronological backtracking.


Works cited


References

* * * * {{cite book , author1=Lintao Zhang , author2=Conor F. Madigan , author3=Matthew H. Moskewicz , author4=Sharad Malik , contribution = Efficient conflict driven learning in a boolean satisfiability solver , title=Proc. IEEE/ACM Int. Conf. on Computer-aided design (ICCAD) , pages=279–285 , contribution-url=http://www.mimuw.edu.pl/~tsznuk/tmp/dpll.pdf , year=2001 * Presentation – "SAT-Solving: From Davis-Putnam to Zchaff and Beyond" by Lintao Zhang. (Several pictures are taken from his presentation) Satisfiability problems SAT solvers