早期对SAT求解器代码解读最重要的文献是:
[MZ01] M.W. Moskewicz, C.F. Madigan, Y. Zhao, L. Zhang, S. Malik. “Chaff:
Engineering an Efficient SAT Solver” in Proc. of the 38th Design
Automation Conference, 2001.
对各个功能模块进行的介绍,并重点介绍了它们在CDCL框架中的位置与协作关系。
其中首先讲到了simplify。化简操作在solve函数调用之前,simplifyDB()运行不能有unit assumptions。不过可以改进,增加第三个输出:“在假设下不可满足”:
The simplifyDB() method can be used before calling solve() to simplify the |
|
In my implementation, simplifyDB() will first propagate all unit information, then remove all satisfied constraints. 译文:在我的实现中,simplifyDB()将首先传播所有单元信息,然后删除所有满足的约束。 | |
As for addClause(), the simplifier can sometimes detect a |
|
If the solver returns satisfiable, new constraints can be added repeatedly to |
|
However, more interesting sequences of SAT-problems can be solved by the use of unit assumptions.译文:然而,更有趣的sat问题序列可以通过使用单位假设来解决 |
|
When passing a non-empty list of assumptions to solve(), the solver temporarily assumes the literals to be true. 译文:当传递一个非空的假设列表给solve()时,求解器会暂时假设字面量为真。 By the use of unit assumptions,calling simplifyDB() before solve() is no longer optional.译文:通过使用单元假设,在solve()之前调用simplifyDB()不再是可选的。 |
|
It is the mechanism for detecting conflicts independent of the assumptions – referred to as a top-level conflict from now on – which puts the solver in an 译文:它是检测独立于假设的冲突的机制——从现在开始称为顶级冲突——它将解决程序置于一个未定义的状态。如果使用单元假设,请参见[ES03]。 |
|
An alternative interface would be for solve() to return one of three values: The current interface, however, represents the smallest modification of a nonincremental |
|
随后讲到了增量求解器中化简函数的作用
Problem constraints can also be removed if they are satisfied at the toplevel. 译文:如果在顶层满足问题约束,也可以删除它们。API方法simplifyDB()负责这一点。该程序对于增量sat问题尤其重要。 |
|
Top-level solver. |
|
The pseudo-code for the search procedure presented above |
|
A typical strategy applied by modern conflict-driven SATsolvers |
|
In MINISAT we also vary the number of learnt clauses kept at |
|
Furthermore, the solve() method of the API supports incremental
assumptions, not handled by the above pseudo-code. 译文:此外,API的solve()方法支持增量假设,而不是由上面的伪代码处理 |
|
未完待续