早期对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
set of problem constraints (often called the constraint database).

 译文:simplifyDB()方法可以在调用solve()之前使用,以简化问题约束集(通常称为约束数据库)。
  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
conflict, in which case False is returned and the solver state is, again, undefined
and must not be used further. 译文:对于addClause(),简化器有时可以检测到冲突,在这种情况下返回False,并且解决程序状态也是未定义的,不能再使用。

 

If the solver returns satisfiable, new constraints can be added repeatedly to
the existing database and solve() run again. 译文:如果求解器返回satisfiable,则可以向现有数据库重复添加新的约束,并再次运行solve()。

   
 

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
undefined state. For an example of the use if unit assumptions, see [ES03].

译文:它是检测独立于假设的冲突的机制——从现在开始称为顶级冲突——它将解决程序置于一个未定义的状态。如果使用单元假设,请参见[ES03]。

 

An alternative interface would be for solve() to return one of three values:
satisfiable, unsatisfiable, or unsatisfiable under assumptions. This is indeed a less
error-prone interface as there is no longer a pre-condition on the use of solve().

 译文:另一种接口是让solve()返回三个值中的一个:可满足的、不可满足的或在假设下不可满足的。这确实是一个不太容易出错的接口,因为在使用solve()时不再有前置条件。

The current interface, however, represents the smallest modification of a nonincremental
SAT-solver.

   

随后讲到了增量求解器中化简函数的作用

 

Problem constraints can also be removed if they are satisfied at the toplevel.
The API method simplifyDB() is responsible for this. The procedure is
particularly important for incremental SAT-problems.

译文:如果在顶层满足问题约束,也可以删除它们。API方法simplifyDB()负责这一点。该程序对于增量sat问题尤其重要。

   
 

Top-level solver. 

 

The pseudo-code for the search procedure presented above
suffices for a simple conflict-driven SAT-solver, but a solver strategy can improve
the performance.

 

A typical strategy applied by modern conflict-driven SATsolvers
is the use of restarts to prevent from getting stuck in a futile part of
the search tree.

 

In MINISAT we also vary the number of learnt clauses kept at
a given time.

  Furthermore, the solve() method of the API supports incremental

assumptions, not handled by the above pseudo-code. 译文:此外,API的solve()方法支持增量假设,而不是由上面的伪代码处理

   

 

 

 

未完待续

posted on 2021-11-18 09:32  海阔凭鱼跃越  阅读(160)  评论(0编辑  收藏  举报