摘要:
This paper describes a new BCP algorithm that improves the performance of Cha class solvers by reducing the total number of clauses the BCP procedure must evalu- ate. This is done by: detecting conflicts earlier; evaluating clauses better; and by increasing the controllability of the conflicts which the BCP procedure finds. Solvers like Limmat (10) include a simple Early Conflict Detection BCP (ECDB), however we introduce a new ag- gressive ECDB procedure and the MIRA solver that eciently incorporates it while easily facilitating comparisons between ECDB modes. With the full ECDB procedure enabled, MIRA was able to reduce the number of evaluated clauses by 59% on average compared to the disabled ECDB version. This new procedure and other speedup techniques discussed here allow MIRA to solve problems 3.7 times faster on average than zCha. Lastly, this paper shows how significant speedup can be attained relatively easily by incorporating a certain level of ECDB into other solvers.
展开
会议名称:
SAT 2004 - The Seventh International Conference on Theory and Applications of Satisfiability Testing, 10-13 May 2004, Vancouver, BC, Canada, Online Proceedings
会议时间:
2004
主办单位:
DBLP
Early Conflict Detection Based BCP for SAT Solving
EDA -- 电子设计自动化(英语:Electronic design automation,缩写:EDA)是指利用计算机辅助设计(CAD)软件,来完成超大规模集成电路(VLSI)芯片的功能设计、综合、验证、物理设计(包括布局、布线、版图、设计规则检查等)等流程的设计方式。
1 Introduction
In this paper we introduce a more complex, but more efficient Early Conflict Detection BCP (ECDB) procedure that is able to achieve speedup by significantly reducing the total amount of work that the BCP procedure must perform. 我们介绍了一个更复杂但更有效的早期冲突检测BCP (ECDB)过程,它能够通过显著减少BCP过程必须执行的总工作量来实现加速。 |
|
The remainder of this paper starts by providing an overview of the problem and terminology followed by a brief description of current SAT solvers. Section 3 and 4 describe the MIRA solver and ECDB with Section 5 explaining how ECDB is realized in the MIRA solver. While ECDB is the main focus of this paper, section 6 through 8 will discuss other important parts of the MIRA solver that aid ECDB such as MIRA’s Decision Heuristics (for decision making and ECDB) and Conflict Analysis Procedure that can easily cope with a re-ordered implication queue. Lastly, this paper assumes the reader has a thorough knowledge of the inner workings of a modern SAT solver. It therefore provides only a preliminary overview of how current Chaff based SAT solvers work. However, for an excellent and complete overview of a modern SAT solver, refer to [8]. | |
2 Overview and Terminology
A Chaff type solver starts by assigning a value to a literal based on a decision heuristic. This literal is called the current decision literal. The solver then invokes the BCP procedure which detects all implications and conflicts associated with this decision. Any implications that are found are added to the implication queue. This queue contains the consequences of assigning the current decision literal to its current value. Implications in this queue can also trigger other implications. The BCP procedure must process all these implications before the solver is free to make another decision. If in the process of evaluating this queue it runs into a conflict, in which two clauses force a single literal to opposite values, a conflict signal is generated. A conflict analysis procedure is then invoked to find the reason and the origin of the conflict. Based on this information, the assignment stack (chronologically ordered list of all defined literals) is corrected to resolve the conflict. The BCP procedure is then rerun to check the implications of this correction. The decision-making, BCP, and conflict analysis procedures continue until either a solution is found or the problem is proven unsatisfiable. |
|
When evaluating clauses during the BCP stage, the implication queue can become quite large (100’s of entries in the queue are normal). The larger it becomes, the more information about the current problem it contains; and the better the probability of a conflict existing within the queue.译文:蕴含文字队列变得越大,它包含的关于当前问题的信息就越多;并且队列中存在冲突的概率越高。 The idea behind the ECDB procedure is to utilize this information to generate unit clauses and subsequently conflict clauses sooner. An example of how this is done will be shown in section 4.
Secondly, the implication queue can be used to better evaluate clauses. 译文:其次,可以使用隐含队列更好地评价子句。 This better evaluation of clauses leads to better choices for watched literals, reducing the chance that a clause needs to be reevaluated in the future. This better utilization of the implication queue is the major improvement when compared to other solvers. |
|
3 The MIRA Solver and ECDB
MIRA was created because Full ECDB could not be efficiently implemented in Chaff. MIRA is still based on Chaff inheriting such features as conflict analysis and fast BCP using watched literals. MIRA, however, gains considerable speedup over Chaff through the use of a new ECDB procedure that has three modes of operation: Full ECDB; Partial ECDB; and No ECDB. Note that all three versions of MIRA share the same Decision, Conflict Analysis, and Clause Management procedures. |
|
3.1 No ECDB The No ECDB mode contains no improvements to detect conflicts early. This makes it more like a Chaff type solver for comparison. |
|
3.2 Partial ECDB | |
The first improvement of the Partial ECDB mode when compared to Chaff is how unit clauses are handled. 译文:与Chaff相比,部分ECDB模式的第一个改进是单元子句的处理方式。 Given an implication queue, Chaff would examine all entries in chronological order ignoring conflicting implications (e.g. two separate clauses that force a single literal but to opposite values). Before Chaff detects this conflict, it must process the entire implication queue up until the point where the first of the conflicting implications is located (assuming no other conflicts exist).译文:在Chaff检测到这个冲突之前,它必须处理整个隐含队列,直到第一个冲突隐含所在的位置(假设不存在其他冲突)。 The implication queue can be quite large, forcing Chaff’s BCP procedure to process many clauses that are not required.译文:与箔条相比,部分ECDB模式的第一个改进是单元子句的处理方式。 MIRA in contrast, checks the implication queue for conflicts before adding implications.译文:在添加蕴含之前检查蕴含队列是否有冲突。 If a conflict exists, the conflict resolution procedure is immediately invoked. This is similar to what is done in Limmat [10]. |
|
This partial version also goes beyond Limmat allowing for fast clause evaluation when the other watched literal is correctly defined, even if that literal is in the implication queue and has not yet been processed by the BCP procedure. 译文:这个部分版本还超越了Limmat,允许在其他观察的文字正确定义时快速计算子句,即使该文字在隐含队列中,还没有被BCP过程处理。
This is done as the implication queue and assignment stack are already available together because of the full ECDB part of MIRA. 译文:这是因为MIRA的完整ECDB部分使得隐含队列和赋值堆栈已经可用。
This also allows for a better utilization of the data structure MIRA uses to store clauses.译文:这还允许更好地利用MIRA用于存储子句的数据结构。 Note that when MIRA is in Partial ECDB mode the clause data structure is the same as the one presented in Figure 1 below, however the CV variable is not used. 译文:注意,当MIRA处于Partial ECDB模式时,子句数据结构与下面图1中所示相同,但是没有使用CV变量。
The data structure is therefore similar to the one presented in [9] where the authors compared different WL schemes. 译文:因此,数据结构与[9]中作者比较了不同的WL方案的数据结构相似。 |
|
3.3 Full ECDB | |
The Full ECDB mode of MIRA goes even further. Here, the ECDB procedure is still similar to Chaff when it traverses the watched literal list of the current decision variable. However, unlike Chaff which checks literals in the order that they were added to the implication queue, MIRA first checks the implications that are most likely to cause a conflict. 译文:然而,不像Chaff按照字面量被添加到含义队列的顺序检查,MIRA首先检查最有可能引起冲突的含义。
The heuristic for this is described in section 6.
Secondly, once a literal has been added to the implication queue, it becomes immediately defined throughout the entire BCP procedure. 译文:一旦一个字面值被添加到隐含队列中,它就会立即在整个BCP过程中被定义。
Consequently, the BCP procedure uses both the assignment stack and implication queue when evaluating a particular clause for a free or properly assigned literal (a literal assignment that satisfies the clause). 译文:BCP过程使用赋值堆栈和隐含队列对特定子句求值以获得空闲或正确赋值的文字(满足子句的文字赋值)。
This ensures that it does not choose a new watched literal that is improperly assigned in the implication queue and thus reduces the probability that the clause will be re-evaluated. 译文:这确保了它不会选择一个在隐含队列中分配不当的新的被监视的文字,从而降低了子句被重新计算的可能性。
Moreover, evaluating clauses in this manner allows the BCP procedure to generate unit and conflict clauses sooner.译文:此外,以这种方式评估条款允许BCP程序更快地生成单元和冲突条款。
An example of how powerful Early Conflict Detection is will be discussed below in section 4. Also, since Chaff’s conflict analysis procedure as is cannot handle re-ordered assignment stacks, MIRA’s procedure will be discussed in section 7. |
|
4 Full ECDB Example
Using the sample CNF from section 2 for this example, Chaff would start by assigning x1 = 1. It would then check all the clauses (assuming Chaff is currently watching the first two literals of every clause). While checking the clauses it would find the unit clause (¬x1 + x2) and assign x2 = 1 in the implication queue. Once done checking all the clauses in the watched literal list for x1 = 1, it would then move onto the next literal in the implication queue, forcing x2 = 1. It must then look at clauses that contain ¬x2 as a watched literal (in this case the last two clauses). Again, while going through the clauses it could find two more unit clauses and it would add x3 to the implication queue. Partial ECDB would find the conflict here as two clauses force x3 to opposite values.
Chaff though, would continue with x2 = 1 until all clauses are checked. Then it would check clauses for x3, and only then will it find the conflict. |
|
In Full ECDB mode, the conflict is generated on the first pass. If x1 = 1 is the first decision the ECDB procedure will immediately add x2 = 1 to the assignment stack as soon as it evaluates the first clause. The ECDB procedure will then evaluate the second clause. It will see that since x1 = 1 and x2 = 1, x3 = 1 is the only possible solution (unit clause). Again it will add x3 = 1 to the assignment stack. Then, when it evaluates the third clause a conflict will be immediately generated. |
|
By utilizing more of the information available at each step of the ECDB procedure, the unit clause stack grows faster than Chaff’s, producing unit clauses faster, and then either arriving at an answer or a conflict sooner. 译文:通过在ECDB过程的每个步骤中利用更多的可用信息,单元子句堆栈比Chaff的增长更快,产生单元子句更快,然后要么更快地得到答案,要么更快地产生冲突。
This significantly reduces the number of clauses the BCP procedure evaluates. 译文:这大大减少了BCP过程计算的子句数量。
Also, by allowing the BCP procedure to make better choices when exchanging the watched literals, it can further reduce future BCP operations. 译文:此外,通过允许BCP过程在交换被监视的字面量时做出更好的选择,它可以进一步减少未来的BCP操作。
An example of this is when Chaff evaluates a clause, it might replace the current watched literal with a literal that is wrongly assigned in the implication queue.译文:举个例子,当Chaff计算一个子句时,它可能会用一个在隐含队列中错误分配的字面值替换当前监视的字面值。 In this way MIRA avoids the future re-evaluation of the clause that Chaff would be required to do.译文:通过这种方式,MIRA避免了Chaff将来需要做的对条款的重新评估。 |
|
5 Realization of the ECDB Procedure
The BCP procedure of any SAT Solver normally represents over 80% of the processing time [2], so it is crucial that it is efficiently implemented. To optimize the BCP procedure in MIRA, the implication queue was combined with the assignment stack. A separate Literal Value Array (LVA) was created for the BCP procedure when evaluating clauses. The LVA contains the value for all literals that are defined (decisions and implications). This allows the ECDB to easily check clauses as it only uses the one array. If it finds a unit clause, it must update both the assignment stack and the LVA. The same is true when backtracking. Lastly, there is a pointer that points to the end of the assignment stack and another that points to the current position of the ECDB procedure within this stack. The second pointer is required because the ECDB procedure must still check all implications that are associated with the current decision to ensure correctness. In this way all clauses that are in each decision’s or implication’s watched literal clause list are eventually checked if no conflict is found. Note that this stack will routinely be re-ordered to ensure the best implications are checked first and the heuristic for this is described in section 6. 译文:请注意,这个堆栈将例行地重新排序,以确保首先检查最佳含义,关于这一点的启发式描述在第6节。 |
|
The ECDB procedure also arranges clauses into a special data structure that allows it to work efficiently.译文:ECDB过程还将子句安排到一个特殊的数据结构中,使其能够有效地工作。 In Chaff’s watched literal scheme the pointers for the watched literals float, meaning their position in the clause is not fixed. 译文:在Chaff的观察字面值模式中,观察字面值的指针是浮动的,这意味着它们在子句中的位置不是固定的。 This is nice when replacing watched literals because no literal swapping is required, however because of this, Chaff does not know the exact position of the both watched literals within a clause.译文:这在替换被监视的字面值时很好,因为不需要进行字面值交换,然而正因为如此,Chaff并不知道两个被监视的字面值在子句中的确切位置。
In MIRA, each clause follows the data structure in Figure 1. In the diagram WL0 and WL1 are the two watched literals of that clause. The watched literals of a clause are always located in the first two positions. This structure is similar to the one presented in [10] but contains the CV variable which is an important modification and will be discussed later. This structure is used in all three ECDB versions of MIRA and allows the ECDB procedure to easily check the value of the other watched literal. 译文:这个结构在MIRA的所有三个ECDB版本中都使用,并允许ECDB过程轻松地检查其他被监视文字的值。 The other or second watched literal can have three possible values: properly defined; undefined; or improperly defined. 译文:另一个或第二个监视的文字可以有三个可能的值:正确定义;未定义的;或不正确的定义 |
|
If the second watched literal is properly defined, which on the benchmarks shown in section 9 is on average about 60% of the time, the ECDB procedure can move onto the next clause without evaluating the rest of the current clause. 译文:如果第二个被观察的文字被正确定义(在第9节所示的基准测试中,它的平均时间约为60%),ECDB过程可以转移到下一个子句,而不需要计算当前子句的其余部分。
This results in a significant increase in BCP clause throughput (the number of clauses checked by the BCP procedure in a set period of time). For this very reason and to further improve the chance that it does not need to evaluate the entire clause, the Partial ECDB version incorporates the implication queue when examining the other watched literal. 译文:出于这个原因,并为了进一步提高不需要计算整个子句的可能性,Partial ECDB版本在检查其他被监视的文字时合并了含义队列。
Also, since both watched literals are in sequential memory addresses, it is likely that they are both loaded into the same cache line. This reduces accesses to main memory, increasing the effectiveness of the cache. 译文:而且,由于两个被监视的字面值都在顺序内存地址中,所以很可能它们都被加载到同一高速缓存线中。这减少了对主存的访问,增加了缓存的有效性。 |
|
In the second most common case, where the other watched literal is undefined, the procedure is the same as Chaff’s, and MIRA looks for a new literal to replace the current one. 译文:在第二种最常见的情况下,另一个被监视的文字是未定义的,这个过程与Chaff的过程相同,MIRA寻找一个新的文字来替换当前的文字。
If this fails, a unit clause is reported and a variable is added to the implication queue. 译文:如果失败,则报告一个单元子句,并向隐含队列添加一个变量。 |
|
When using the Full ECDB procedure there is also a third and more complicated case when the second watched literal is incorrectly defined.译文:在使用Full ECDB过程时,还有第三种更复杂的情况,即第二个观察的文字定义不正确。 In Chaff, this case would constitute a conflict, but in MIRA implications can be defined but not yet processed. 译文:在Chaff中,这种情况将构成冲突,但在MIRA中可以定义影响,但尚未处理。
This means that Full ECDB procedure does not immediately know if the current clause is a conflicting clause and it must therefor search the clause for a free or properly defined literal. 译文:这意味着Full ECDB过程不能立即知道当前子句是否是冲突子句,因此它必须在子句中搜索自由的或正确定义的文字。
If during the search a free or properly defined literal is not found, a conflict will be signalled and the conflict resolution procedure will be run. 译文:如果在搜索过程中没有找到自由的或正确定义的文字,则会发出冲突信号,并运行冲突解决过程。
However, if a free or properly defined literal is found, MIRA will replace the current WL with it. The algorithm will then continue searching the clause for a second undefined or properly defined literal. 译文:但是,如果找到一个自由的或正确定义的文字,MIRA将用它替换当前的WL。然后,算法将继续在子句中搜索第二个未定义或正确定义的字面值。
If it does not find one then the current clause is a unit clause and MIRA will define the literal that needs to be defined. However, if MIRA finds another free literal, it will be swapped with the cache variable (called the CV, and is the third variable in a clause) and not with the other watched literal. 译文:如果没有找到,那么当前子句就是一个单元子句,MIRA将定义需要定义的文字。然而,如果MIRA找到了另一个自由字元,它将与缓存变量(称为CV,是子句中的第三个变量)交换,而不是与其他被监视的字元交换。
This is because it is difficult for MIRA to find (and then remove) the reference to the current clause from the other watched literal’s clause list (the list of all clauses that have this literal as a watched literal). 译文:这是因为MIRA很难从另一个受监视字面量的子句列表(所有将该字面量作为受监视字面量的子句列表)中找到(然后删除)对当前子句的引用。
The CV is there to reduce the future work the BCP must do when it tries to replace the other watched literal, as there is a good chance the third literal is free or properly defined. 译文:CV的存在是为了减少BCP在试图替换其他被监视的文字时必须做的工作,因为第三个文字很有可能是自由的或正确定义的。 This avoids researching the entire clause. 译文:这样可以避免研究整个子句。 The use of the CV further reduces the effect of the second search because of its physical location which is normally on the same cache line as the watched literals. 译文:使用CV进一步降低了第二次搜索的效果,因为它的物理位置通常与所观察的文字在同一高速缓存线上。 This further increases the cache friendliness as each clause has a relatively small effective cache foot print. 译文:这进一步增加了缓存友好性,因为每个子句的有效缓存占用空间相对较小。 |
|
To summarize, the efficiency is increased for the first case because the positions of both WLs are known, allowing MIRA to skip the search for this variable in the clause. 译文:总之,对于第一种情况,效率提高了,因为两个wl的位置都是已知的,这允许MIRA跳过在子句中搜索这个变量。
In the second case the efficiency is comparable to Chaff. 译文:在第二种情况下,其效率可与Chaff相媲美。 The third case is a bit more complicated, but we only loose performance when this third case results in a conflict as MIRA, unlike Chaff, must search the entire clause. Normally this is the case for less then 0.1% of all evaluated clauses therefor having only a negligible effect on perfomance. 译文:第三种情况稍微复杂一些,但只有当第三种情况导致冲突时,我们才会降低性能,因为与Chaff不同,MIRA必须搜索整个子句。通常情况下,只有不到0.1%的评估条款是这样的,因此对性能的影响微乎其微。 |
|
Lastly, there are some clauses that cannot fit into this data structure, namely clauses with only one literal. 译文:最后,还有一些子句不能装入这个数据结构,即只有一个字面量的子句。
If MIRA finds such a clause (through initialization or conflict analysis), the literal is forced to decision level 0 with all other single literal clauses. 译文:如果MIRA发现了这样一个子句(通过初始化或冲突分析),该文本将被迫与所有其他单个文本子句一起判定级别为0。
MIRA then restarts the search from decision level 0. 译文:MIRA然后从决策级别0重新开始搜索。 Note that this is similar to random restarts used in many solvers but here it reduces the complexity of the ECDB procedure as it can always assume that every clause has two watched literals. 译文:注意,这与许多求解器中使用的随机重新启动类似,但在这里它降低了ECDB过程的复杂性,因为它总是假设每个子句都有两个被监视的文字。 |
|
6 Decision Heuristic
The next area where MIRA differs from that of Chaff is in the decision-making. Chaff uses the most common literal scheme which is referred to as the Variable State Independent Decaying Sum (VSIDS) heuristic. This heuristic uses a counter for every variable that is incremented every time a variable is added to a clause. These counters are also frequently reduced (divided by 2) after some set period or time. This strategy is the one used in zChaff. MIRA improves on this strategy slightly by incrementing the counts for each variable the conflict analysis looked at, even if the variable does not appear in the newly generated conflict clause. 译文:MIRA通过增加冲突分析查看的每个变量的计数稍微改进了这个策略,即使这个变量没有出现在新生成的冲突子句中。
This idea was taken from BerkMin [1] because, while certain literals do not appear in conflict clauses, they can still be a focal point of many conflicts.译文:这个想法来自BerkMin[1],因为虽然某些文字不会出现在冲突子句中,但它们仍然可能是许多冲突的焦点。
MIRA lastly adds an addition point for the UIP and conflicting variable. 译文:MIRA最后为UIP和冲突变量添加了一个附加点。 This part of the decision strategy is the same for all three versions of MIRA in order to insure a more equal comparison between ECDB modes. 译文:这部分决策策略对于所有三个版本的MIRA是相同的,以确保ECDB模式之间更加平等的比较。 |
|
As stated earlier, when MIRA is in Full ECDB mode, the ECDB procedure also uses a second decision heuristic when deciding in which order to check the implications contained in the implication queue.
In MIRA the ECDB procedure chooses an implication with the highest chance of creating a conflict.
This is accomplished by using the same counters as the normal decision heuristic, however the ECDB procedure does not choose the literal with the highest count, rather it chooses the literal whose complement has the highest count. 译文:这是通过使用与常规决策启发式方法相同的计数器来实现的,但是ECDB过程不会选择计数最高的文字,而是选择其补语中计数最高的文字。
This strategy not only finds conflicts faster but also accelerates the growth of implication queue, further aiding the ECDB procedure in evaluating clauses. 译文:这种策略不仅可以更快地发现冲突,还可以加速隐含队列的增长,进一步帮助ECDB过程计算子句。
This decision heuristic also has the added benefit of focusing the BCP procedure, allowing it to find conflicts that are more related to the current search space (and not a random conflict that is one of many unfound conflicts that normally exist in the implication queue). 译文:这个决策启发式算法还有一个额外的好处,就是聚焦于BCP过程,允许它找到与当前搜索空间更相关的冲突(而不是通常存在于隐含队列中的许多未发现冲突之一的随机冲突)。
Also, the addition of a decision strategy in the ECDB procedure can increase the performance of all three versions of MIRA (full, partial, and no ECDB), although our experience has shown that Full ECDB can take better advantage of it. 译文:此外,在ECDB过程中添加决策策略可以提高MIRA所有三个版本(完整、部分和无ECDB)的性能,尽管我们的经验表明,完整ECDB可以更好地利用它。 |
|
7 Conflict Analysis
The conflict analysis algorithm that is used in MIRA is implemented differently than that of Chaff’s in order to handle MIRA’s implication queue, but the results are the same. Both algorithms generate conflict clauses based on the first UIP. The first UIP conflict analysis scheme traces conflicts back to the first decision or implication that dominates the path towards both values of the conflicting literal.译文:第一个UIP冲突分析方案将冲突追溯至第一个决定或含义,该决定或含义主导了通向冲突字面量两个值的路径。 For a more in-depth look at first UIP conflicts and other conflict analysis schemes, refer to [3]. |
|
In Chaff, to generate a first UIP conflict clause, its conflict analysis runs by going chronologically backwards through the list of implications associated with the most recent decision. 译文:在Chaff中,为了生成第一个UIP冲突子句,它的冲突分析是通过与最近决策相关的含义列表按时间顺序向后进行的。 Chaff starts by marking all literals that are contained inside this list and in the conflicting clause. 译文:Chaff首先标记这个列表和冲突子句中包含的所有文字。 If a literal in the conflicting clause is not in this list (i.e. it was set at an earlier decision level), Chaff adds it to the new conflict clause. 译文:如果冲突子句中的文字不在此列表中(即它是在较早的决策级别设置的),Chaff将其添加到新的冲突子句中。 Chaff then continues to go chronologically backward through this list. If a literal was marked by a previous iteration of the loop its forcing clause is analyzed in the same way as the first clause. 译文:然后Chaff继续按时间顺序倒叙这个列表。如果一个文字是由循环的前一次迭代标记的,那么将以与第一个子句相同的方式分析其强制子句。 Otherwise, if the literal is not marked it is skipped. Chaff continues in this manner until all literals in the list have been looked at. The last marked literal in the list becomes the UIP and is used for backtracking. 译文:否则,如果文字没有被标记,它将被跳过。Chaff以这种方式继续,直到列表中的所有文字都被查看过。列表中最后一个标记的文字成为UIP,用于回溯。 |
|
Chaff’s conflict analysis is simple and efficient. However, since MIRA’s list of implications on the current decision level are not always in the proper order, due to BCP re-ordering it for example, many modifications to Chaff’s conflict analysis procedure would be required, reducing the simplicity and efficiency of the algorithm. 译文:然而,由于MIRA对当前决策层的影响列表并不总是按照正确的顺序排列,例如由于BCP对其进行了重新排序,因此需要对Chaff的冲突分析程序进行许多修改,从而降低了算法的简单性和效率。
Instead the conflict analysis procedure in MIRA runs using a stack. 译文:相反,MIRA中的冲突分析过程使用堆栈运行。
MIRA starts by examining each literal in the conflicting clause. 译文:MIRA首先检查冲突子句中的每个字面量。 If the literal was set at the current decision level it is added to stack and marked so it cannot be added again. 译文:如果将文字设置为当前决策级别,则将其添加到堆栈中并进行标记,使其不能再次添加。、 If it was set before the current decision level then it is added to the conflict clause and also marked so it cannot be added twice. 译文:如果它是在当前决策级别之前设置的,那么它将被添加到冲突子句中,并且也被标记,因此不能添加两次。 Once finished with the conflicting clause, it takes the most recently implied implication variable out of the stack and repeats the procedure above with the variables respective forcing clause until only one variable is left in the stack. 译文:一旦完成了冲突子句,它将从堆栈中取出最近隐含的隐含变量,并对变量各自的强制子句重复上面的过程,直到堆栈中只剩下一个变量。
The last variable is then added to the conflicting clause and becomes the UIP literal for backtracking. 译文:最后一个变量被添加到冲突子句中,并成为用于回溯的UIP文字。 This stack implementation of the conflict analysis procedure allows MIRA to more easily generate conflict clauses in the absence of a chronologically ordered of implication queue. 译文:这个冲突分析过程的堆栈实现允许MIRA在没有按时间顺序排列的隐含队列的情况下更容易生成冲突子句。 |
|
8 Clause Management
Modern solvers must manage the large number of conflict clauses they generate. 译文:现代解决方案必须管理它们产生的大量冲突条款。 If no clauses are ever deleted, the BCP procedure will become overwhelmed by the sheer number of clauses it must evaluate. 译文:如果没有任何条款被删除,BCP程序将被它必须评估的大量条款所淹没。
To control the growth of the clause database MIRA employs a slightly more complicated clause-cleaning (clause-deleting) algorithm than Chaff. 译文:为了控制子句数据库的增长,MIRA采用了比Chaff稍微复杂一点的子句清理(子句删除)算法。
When MIRA decides to delete clauses, it has two criteria it chooses between. 译文:当MIRA决定删除子句时,它有两个选择标准。
If a clause is unsatisfied, MIRA will only delete it if it has lots of undefined literals. 译文:如果一个子句不满足,MIRA只会在它有很多未定义的字元时删除它。 This prevents MIRA from deleting long undefined clauses that only have a few undefined literals, as these clauses can still be very useful. 译文:这可以防止MIRA删除只有少量未定义字元的长未定义子句,因为这些子句仍然非常有用。
Secondly, MIRA deletes any defined clause that is over a certain length. 译文:MIRA删除任何超过一定长度的已定义子句。
Furthermore, MIRA protects the most recently added clauses from deletion. 译文:此外,MIRA保护最近添加的条款不被删除。 Lastly, this Clause Management scheme remains constant throughout all three versions of MIRA to insure a more equal comparison between ECDB modes. 译文:最后,这个条款管理方案在MIRA的所有三个版本中保持不变,以确保ECDB模式之间更加平等的比较。 |
|
9 Results
MIRA was written in C++ using GNU C++ compiler version 2.95.4. The version of zChaff used was 2003.7.22. All comparisons were run on an AMD Athlon XP 1700+ with 1.5GB of RAM. All benchmark were taken from [11]. | |
First, tables 1 and 2 compare MIRA’s different modes of operation. 译文:首先,表1和表2比较了MIRA的不同操作模式。
These two tables were constructed from only the problems that all three versions solved. 译文:这两个表仅仅是由这三个版本所解决的问题构成的。 Table 1 shows how many clauses on average the BCP procedure evaluated before a conflict was found. 译文:表1显示了在发现冲突之前,BCP过程平均评估了多少个子句。
This table clearly shows the reduction in BCP operations as the Full ECDB procedure can find conflicts by only searching half the number of clauses as the No ECDB version. 译文:该表清楚地显示了BCP操作的减少,因为与No ECDB版本相比,Full ECDB过程只需搜索一半的子句数量就可以找到冲突。 Note that on industrial and hand made problems the performance of ECDB is far better than on random problems. 译文:请注意,在工业和手工问题上,ECDB的性能远远好于随机问题。
Random problems don’t seem to have as much clause interdependence which limits implication queue growth thereby reducing ECDB’s effectiveness. 译文:随机问题似乎没有太多的子句相互依赖,这限制了隐含队列的增长,从而降低了ECDB的有效性。
Lastly, even partial ECDB performed well. 译文:最后,即使是部分ECDB也表现良好。 |
|
Table 2 shows the total number of BCP operations performed and the total run time for each of the solvers. 译文:表2显示了执行的BCP操作的总数和每个求解器的总运行时间。
Again the Full ECDB version reduced the total BCP work to 40% of a regular BCP procedure, reducing run time to 44% of the No ECDB version. 译文:同样,Full ECDB版本将总BCP工作减少到常规BCP过程的40%,将运行时间减少到No ECDB版本的44%。
This reduction in BCP operations is not only due to finding conflicts sooner, but also due to choosing better watched literals and focusing the search. 译文:BCP操作的减少不仅是因为更快地发现冲突,还因为选择更好的观察字面量和集中搜索。
The Partial ECDB version again performed well here scaling almost linearly with the number of BCP operations. 译文:在这里,Partial ECDB版本同样表现良好,几乎与BCP操作的数量成线性关系。
The excellent run time scaling was due to the addition of the implication queue when evaluating if the second watched literal was properly defined. 译文:出色的运行时伸缩性是由于在计算第二个监视的文字是否正确定义时添加了隐含队列。 |
|
The next results are shown to prove that even though MIRA’s actual code is not as optimized as zChaffs, it still provides significant speedup due to the better BCP algorithm.
Table 3 shows a comparison on a variety of Industrial, Hand Made, and Random in which each solver was given 1800 seconds to solve the problem.
The time column for each solver has three times associated with it. The first is the time required for problems zChaff was able to prove. 译文:每个求解器的时间列有三次与之关联。首先是zChaff能够证明的问题所需要的时间。
Since MIRA solved every problem that zChaff did, this was done to indicate the speedup of MIRA over zChaff. 译文:
The second is the time required for both solvers to solve instances that were solved by at least one solver.
第二个是两个求解器解决至少一个求解器解决的实例所需要的时间。
The last time shown is the total time given to the solver. 译文:最后显示的时间是给出给求解器的总时间。
As can be seen, significant speedup was obtained and MIRA was consistently faster on all test problem sets excluding UNSAT random ones.
The average speedup was 3.7 times but on certain problem sets it was close to 20 times. 译文:平均加速是3.7倍,但在某些习题集上接近20倍。
MIRA was also able to solve all instances that Chaff solved, plus 4 instances that zChaff could not, making it more robust than zChaff. 译文:MIRA也能够解决Chaff解决的所有实例,加上zChaff不能解决的4个实例,使它比zChaff更健壮。 |
|
10 Conclusion
A new BCP procedure was presented that introduces novel ways to utilize more of the information available to the solver, in particular the implication queue, in order to gain speedup. 译文:提出了一种新的BCP程序,该程序引入了新的方法来利用求解器可用的更多信息,特别是隐含队列,以获得加速。
This new aggressive Early Conflict Detection BCP procedure (ECDB) that allows MIRA to better evaluate clauses while detecting unit and conflict clauses sooner, is the main contribution of this paper. 译文:这种新的积极的早期冲突检测BCP程序(ECDB)允许MIRA更好地评估条款,同时更快地检测单元和冲突条款,是本文的主要贡献。
The efficient implementation and incorporation of the ECDB procedure into MIRA and further improvements were discussed. 译文:讨论了ECDB程序在MIRA中的有效实施和整合,以及进一步的改进。
MIRA’s three modes of operation were compared, and performance increases were highlighted. Speedup was demonstrated for both levels of ECDB when compared to the case without. 译文:比较了MIRA的三种操作模式,突出了性能的提高。与没有ECDB的情况相比,两种水平的ECDB都显示了加速
MIRA was then compared against zChaff to show that these improvements are practical as MIRA is able to compete with a modern SAT solver. 译文:然后将MIRA与zChaff进行比较,以表明这些改进是实际的,因为MIRA能够与现代SAT求解器竞争
Lastly, our results and experiences suggest that certain levels of ECDB can not only accelerate the performance of future SAT solvers, but can be easily integrated into most existing modern SAT solvers, allowing them to realize ECDB speedup. 译文:最后,我们的结果和经验表明,某些级别的ECDB不仅可以加速未来的SAT求解器的性能,而且可以很容易地集成到大多数现有的现代SAT求解器中,使其实现ECDB加速 |
|
References
1. Goldberg, E., Novikov, Y.: BerkMin: a Fast and Robust Sat-Solver. DATE. Paris. (2002) 142–149.
2. Moskewicz, M. W., Madigan, C. F., Zhao, Y., Zhang, L., Malik, S.: Engineering an Effecient SAT Solver. DAC, (2001)
3. Zhang, L., Madigan, C. F., Moskewicz, M. H., Malik, S.: Efficient Conflict Driven Learning in a Boolean Satisfiability Solver. ICCAD. (2001)
4. Zhang, L., Malik, S.: Cache Performance of SAT Solvers: A Case Study for Efficient Implementation of Algorithms. SAT. (2003)
5. Marques-Silva, J. P., Sakallah, K. A.:GRASP: A Search Algorithm for Propositional Satisfiability. IEEE Transactions on Computers. Vol. 48 (1999) 506–521
6. Lynce, I., Marques-Silva, J.:Efficient Data Structures for Fast SAT Solvers. (2001)
7. Davis, S., Putnam, M.:A Computing Procedure for Quantification Theory. Journal of the ACM. Vol.7 (1960) 201–215
8. S¨orensson, N., E´en, N.:An Extensible SAT-solver. SAT. (2003)
9. Van Gelder, A.:Generalizations of Watched Literals for Backtracking Search. (2001)
10. Biere, A.:Limmat Solver. http://www.inf.ethz.ch/personal/biere/projects/limmat/
11. SAT2003 and SAT2004 benchmarks from SATLIB: http://www.satlib.org |
|