Trail Saving on Backtrack

Hickey R., Bacchus F. (2020) Trail Saving on Backtrack. In: Pulina L., Seidl M. (eds) Theory and Applications of Satisfiability Testing – SAT 2020. SAT 2020. Lecture Notes in Computer Science, vol 12178. Springer, Cham. https://doi.org/10.1007/978-3-030-51825-7_4


 

Abstract

 

A CDCL SAT solver can backtrack a large distance when it learns a new clause, e.g, when the new learnt clause is a unit clause the solver has to backtrack to level zero.

When the length of the backtrack is large, the solver can end up reproducing many of the same decisions and propagations when it redescends the search tree.译文:当回溯的长度很大时,求解器在重新下降搜索树时,最终可能会重新生成许多相同的决策和传播。

Different techniques have been proposed to reduce this potential redundancy, e.g., partial/chronological backtracking and trail saving on restarts.译文:人们提出了不同的技术来减少这种潜在的冗余,例如,部分/时间回溯和在重新启动时节省跟踪。

In this paper we present a new trail saving technique that is not restricted to restarts, unlike prior trail saving methods.译文:本文提出了一种新的路径保存技术,与以往的路径保存方法不同,它不局限于重启。

 

Our technique makes a copy of the part of the trail that is backtracked over. This saved copy can then be used to improve the efficiency of the solver’s subsequent redescent.译文:我们的技术复制了被回溯的那部分痕迹。然后可以使用这个保存的副本来提高求解器后续再下降的效率

Furthermore, the saved trail also provides the solver with the ability to look ahead along the previous trail which can be exploited to improve its efficiency.译文:此外,保存的路径还为求解器提供了沿着前面的路径向前看的能力,可以利用它来提高其效率。

Our new trail saving technique offers different tradeoffs in comparison with chronological backtracking and often yields superior performance.译文:与按时间顺序回溯相比,我们的新轨迹保存技术提供了不同的权衡,通常会产生更好的性能。

We also show that our technique is able to improve the performance of state-of-the-art solvers.译文:我们还表明,我们的技术能够提高最先进的求解器的性能。

   

 

1 Introduction

 

The vast majority of modern SAT solvers that are used to solve real-world problems are based on the conflict-driven clause learning (CDCL) algorithm.

In a CDCL SAT solver, backtracking occurs after every conflict, where all literals from one or more decision levels become unassigned before the solver resumes making decisions and performing unit propagations.译文:在CDCL SAT求解器中,回溯会在每次冲突之后发生,即在求解器继续做出决策和执行单元传播之前,来自一个或多个决策级别的所有文字都取消已有的值分配。

Traditionally, CDCL solvers would backtrack to the conflict level(错误,应当为:backtrack level), which is the second highest decision level remaining in the conflict clause after conflict analysis has resolved away all but one literal from the current decision level [9].译文:传统上,CDCL解决程序将回溯到冲突级别,这是冲突子句中剩下的第二高决策级别,在冲突分析已经从当前决策级别[9]中解决了所有文字(只剩下一个文字)之后。

Recently, however, it has been shown that partial backtracking [6] or chronological backtracking, C-bt, (i.e., backtracking only to the previous level after conflict analysis) [811] can be effective on many instances.

Partial backtracking has been used in the solvers that won the last two SAT competitions.

Although chronological backtracking breaks some of the conventional invariants of CDCL solvers, it has been formalized and proven correct [8] (also see related formalizations [1012]).译文:尽管时间回溯破坏了CDCL求解器的一些传统不变量,但它已经被正式化并被证明是正确的[8](也参见相关的正式化[10,12])。

   
 

The motivation for using C-bt is the observation that when a solver backtracks across many levels, many of the literals that are unassigned during the backtrack might be re-assigned again in roughly the same order when the solver redescends.译文:使用时序回溯的动机是,当求解器跨许多层回溯时,在回溯期间未分配的许多文字可能会在求解器重新下降时以大致相同的顺序重新分配。

This observation was first made in the context of restarts by van der Tak et al. [14]. Their technique backtracks to the minimum change level, i.e., the first level at which the solver’s trail can change on redescent. However, their technique cannot be used when backtracking from a conflict: the solver’s trail is going to be changed at the backtrack level so the minimum change level is the same as the backtrack level.译文:这一观察首先是由van der Tak等人[14]在重新启动的背景下得出的。他们的技术回溯到最小的变化水平,即求解器的轨迹在再次下降时可以改变的第一个水平。然而,他们的技术不能用于从冲突中回溯:求解者的轨迹将在回溯级别被更改,所以最小的更改级别与回溯级别相同。

   
 

Chronological backtracking or partial backtracking instead allows a reduction in the length of the backtrack by placing literals on the trail out of decision level order.译文:相反,按时间顺序回溯或部分回溯允许减少回溯的长度,方法是将文字置于非决策级顺序的跟踪上

By reducing the length of the backtrack the solver can keep more of its assignment trail intact. 译文:通过减少回溯的长度,求解器可以保持其更多的赋值轨迹不变。

This can save it from the work involved in reconstructing a lot of its trail. Using C-bt is not a panacea however. 译文:这可以使它免于重建大量踪迹的工作。然而,使用C-bt并不是万灵药。

Its application must be limited for peak effectiveness. This indicates that it is sometimes beneficial for the solver to backtrack fully and redo its trail, even if this takes more work. 译文:它的应用必须受到限制,以达到最高的效果。这表明,有时对于求解器来说,完全回溯并重做跟踪是有益的,即使这需要做更多的工作。

We will expand on why this might be the case below.

   
 

In this paper we present a new trail saving method whereby we save the backtracked part of the solver’s trail and attempt to use that information to make the solver’s redescent more efficient.译文:本文提出了一种新的路径保存方法,即保存求解器的回溯部分,并试图利用这些信息来提高求解器的再下降效率

Unlike C-bt, our trail saving method preserves the traditional invariants of the SAT solver and its basic version is very simple to implement.译文:与C-bt不同,我们的路径保存方法保留了SAT解算器的传统不变量,并且它的基本版本非常容易实现。

It allows the search to retain complete control over the order of decisions, but helps make propagation faster. 译文:它允许搜索保持对决策顺序的完全控制,但有助于加快传播速度。

We develop some enhancements to make the idea more effective, and demonstrate experimentally that it performs as well as and often better than chronological backtracking.译文:我们进行了一些改进,以使这个想法更有效,并通过实验证明,它的性能与按时间顺序回溯一样好,而且通常比按时间回溯更好。

We also show that with our enhancements we are able to improve the performance of state-of-the-art solvers.译文:我们还表明,通过我们的增强,我们能够提高最先进的解决方案的性能。

   

2 Background

  SAT solvers determine the satisfiability of a propositional formula FF expressed in Conjunctive Normal Form (CNF). FF contains a set of variables V. A literal is a variable vVv∈V or its negation ¬v¬v, and for a literal l we let var(l)var(l) denote its underlying variable. A CNF consists of a conjunction of clauses, each of which is a disjunction of literals. We often view a clause as being a set of literals and employ set notation, e.g., Cℓ∈C and CCC′⊂C. We will assume that the reader is familiar with the basic operations of CDCL SAT solvers. A good source for this background is [13].译文:我们假设读者熟悉CDCL SAT求解器的基本操作。这个背景的一个很好的来源是[13]。
   
  Trails. CDCL SAT solvers maintain a trail which is the sequence of literals that have currently been assigned true by the solver. During its operation a SAT solver will add newly assigned literals to the end of the trail, and on backtrack remove literals from the end of the trail. For convenience, we will regard literals as having been assigned true if and only if they are on the trail. So removing/adding a literal to the trail is equivalent to unassigning/assigning the literal TRUETRUE.
   
 

A SAT solver’s trail satisfies a number of conditions. However, in this work we will need some additional flexibility in our definitions, as we will sometimes be working with trails that would never be constructed by a SAT solver. Hence, we define a trail to be a sequence of literals each of which is either a decision literal or an implied literal, and each of which has a reason.译文:因此,我们将轨迹定义为一个文字序列,其中每个文字要么是决定文字,要么是隐含文字,而且每个文字都有一个理由

These two types of literals are distinguished by their reasons. Decision literals d have a null reason, reason(d)=reason(d)=∅. Implied literals l have as a reason a clause of the formula FF, reason(l)=CFreason(l)=C∈F. (The clause reason(l)reason(l) can be a learnt clause that has been added to FF).

   
  If literal ℓ is on the trail TT let ιT()ιT(ℓ) denote its index on the trail, i.e, T[ιT()]=T[ιT(ℓ)]=ℓ. If x and y are both on the trail and ιT(x)<ιT(y)ιT(x)<ιT(y) we say that x appears before y on the trail. For convenience, when the trail being discussed is clear from context we simply write ιι instead of ιTιT.
   
   
   
   
   
 

In CDCL solvers using standard conflict directed backtracking all properties hold of the prefix of the solver’s trail consisting of all decisions levels but the deepest. The full trail might, however, contain a conflict at its deepest level so is not necessarily conflict-free. The full trail might also not be propagation-complete, as unit propagation at the deepest level is typically terminated early if a conflict is found. It can further be noted that the first four properties imply that if a clause C is falsified at decision level k, then C must contain at least two literals at level k (otherwise C would have become unit at a prior level and then satisfied by making its last unfalsified literal true).

译文:在使用标准冲突的CDCL求解器中,直接回溯求解器路径中前缀的所有属性,该路径包含除了最深层次之外的所有决策级别。

译文:然而,整个过程可能在最深层包含冲突,因此不一定是没有冲突的。

译文:完整的跟踪也可能没有完成传播,因为如果发现冲突,最深层次的单元传播通常会提前终止。

 

译文:还可以进一步指出,前四个属性暗示,如果子句C在决策级别k被证伪,那么C必须在级别k包含至少两个文字。

   
  Standard Backtracking. In CDCL SAT solving the solver extends its trail by adding new decision literals followed by finding and adding all unit implied literals arising from that new decision. This continues until it reaches a decision level LdeepLdeep where a conflict C is found.
   
  In standard backtracking, the difference between the backtrack level, LbackLback and the current deepest level LdeepLdeep can be very large. During its new descent from LbackLback the solver can reproduce a large number of the same decisions and unit propagations, essentially wasting work. This potential inefficiency has been noted in prior work [681114].
   
   
   
   
   
   
   
   
   
   
   
   
   

 

3 Chronological Backtracking Effects on Search

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

4 Trail Saving

 

译文:我们的方法是在回溯时保存路径T,并在求解器重新下降时使用已保存的路径Tsave,以提高传播的效率,而不影响求解器想要做出的决策.

The saved trail TsaveTsave also provides a secondary “lookahead mechanism” that the SAT solver can exploit as it redescends.译文:保存的trail Tsave还提供了一种次要的“前瞻性机制”,SAT求解器可以在其重降时利用这一机制.

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

 

 

6 Conclusion

 

We have shown that our trail saving technique can speed up two state-of-the-art SAT solvers, cadical and MapleSAT, as or more effectively than chronological backtracking can.译文:我们已经证明,我们的路径节省技术可以加速两种最先进的卫星求解器,cadical和MapleSAT.   译文:比时间回溯更有效。

 

We also introduced three enhancements one can implement when using a saved trail and demonstrated experimentally that these enhancements can sometimes improve a solver’s performance by a significant amount. 译文:我们还介绍了在使用保存的路径时可以实现的三种增强,并通过实验演示了这些增强有时可以显著提高求解器的性能。We have shown that trail saving and all enhancements we proposed are sound.译文:我们已经证明了我们所提议的轨迹保存和所有增强都是合理的。

   
 

There are many avenues that can be pursued in future work, such as using the saved trail to help make inprocessing techniques faster or using the saved trail to learn multiple clauses from a single conflict.译文:在未来的工作中,有很多方法可以使用,比如使用保存的路径帮助提高inprocessing技术的速度,或者使用保存的路径从单一冲突中学习多个子句

 

It is also possible to combine trail saving with chronological backtracking, but it would require further work to determine whether or not this would be useful and how to best approach it.译文:也可以将路径节省和时间回溯结合起来,但这需要进一步的工作来确定这是否有用,以及如何最好地实现它.

   

 

Footnotes

 

Our approach uses standard trails in which the decision levels are contiguous.

Chronological backtracking [6811] generates trails with non-contiguous decision levels.

译文:时序回溯[6,8,11]生成具有非连续决策级别的轨迹

   
  C-bt can also be extremely useful in contexts where each descent can be very expensive, e.g., when doing theory propagation in SMT solving, or component analysis in #SAT solving. In these cases, C-bt, by avoiding backtracking and subsequent redescent, has considerable potential for improving solver performance.
   
  Our implementation is available at https://github.com/rgh000/cadical-trail.
   

 

 

References

 
  1. 1.
    Audemard, G., Simon, L.: Predicting learnt clauses quality in modern SAT solvers. In: Boutilier, C. (ed.) IJCAI 2009, Proceedings of the 21st International Joint Conference on Artificial Intelligence, Pasadena, California, USA, 11–17 July 2009, pp. 399–404 (2009). http://ijcai.org/Proceedings/09/Papers/074.pdf
  2. 2.
    Gent, I.P.: Optimal implementation of watched literals and more general techniques. J. Artif. Intell. Res. 48, 231–251 (2013).  https://doi.org/10.1613/jair.4016MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Heule, M., Järvisalo, M., Suda, M. (eds.): Proceedings of SAT Competition 2018: Solver and Benchmark Descriptions. University of Helsinki (2018). http://hdl.handle.net/10138/237063
  4. 4.
    Heule, M., Järvisalo, M., Suda, M. (eds.): Proceedings of SAT Race 2019: Solver and Benchmark Descriptions. University of Helsinki (2019). http://hdl.handle.net/10138/306988
  5. 5.
    Hickey, R., Bacchus, F.: Speeding up assumption-based SAT. In: Janota, M., Lynce, I. (eds.) SAT 2019. LNCS, vol. 11628, pp. 164–182. Springer, Cham (2019).  https://doi.org/10.1007/978-3-030-24258-9_11CrossRefzbMATHGoogle Scholar
  6. 6.
    Jiang, C., Zhang, T.: Partial backtracking in CDCL solvers. In: McMillan, K., Middeldorp, A., Voronkov, A. (eds.) LPAR 2013. LNCS, vol. 8312, pp. 490–502. Springer, Heidelberg (2013).  https://doi.org/10.1007/978-3-642-45221-5_33CrossRefGoogle Scholar
  7. 7.
    Luo, M., Li, C., Xiao, F., Manyà, F., Lü, Z.: An effective learnt clause minimization approach for CDCL SAT solvers. In: Sierra, C. (ed.) Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI 2017, Melbourne, Australia, 19–25 August 2017, pp. 703–711. ijcai.org (2017).  https://doi.org/10.24963/ijcai.2017/98
  8. 8.
    Möhle, S., Biere, A.: Backing backtracking. In: Janota, M., Lynce, I. (eds.) SAT 2019. LNCS, vol. 11628, pp. 250–266. Springer, Cham (2019).  https://doi.org/10.1007/978-3-030-24258-9_18CrossRefGoogle Scholar
  9. 9.
    Moskewicz, M.W., Madigan, C.F., Zhao, Y., Zhang, L., Malik, S.: Chaff: engineering an efficient SAT solver. In: Proceedings of the 38th Design Automation Conference, DAC 2001, Las Vegas, NV, USA, 18–22 June 2001, pp. 530–535. ACM (2001).  https://doi.org/10.1145/378239.379017
  10. 10.
    Nadel, A.: Understanding and improving a modern SAT solver. Ph.D. thesis, Tel Aviv University (2009)Google Scholar
  11. 11.
    Nadel, A., Ryvchin, V.: Chronological backtracking. In: Beyersdorff, O., Wintersteiger, C.M. (eds.) SAT 2018. LNCS, vol. 10929, pp. 111–121. Springer, Cham (2018).  https://doi.org/10.1007/978-3-319-94144-8_7CrossRefGoogle Scholar
  12. 12.
    Nieuwenhuis, R., Oliveras, A., Tinelli, C.: Solving SAT and SAT modulo theories: from an abstract Davis-Putnam-Logemann-Loveland procedure to DPLL(T). J. ACM 53(6), 937–977 (2006).  https://doi.org/10.1145/1217856.1217859MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Silva, J.P.M., Lynce, I., Malik, S.: Conflict-driven clause learning SAT solvers. In: Handbook of Satisfiability, pp. 131–153. IOS Press (2009).  https://doi.org/10.3233/978-1-58603-929-5-131
  14. 14.
    van der Tak, P., Ramos, A., Heule, M.: Reusing the assignment trail in CDCL solvers. JSAT 7(4), 133–138 (2011). https://satassociation.org/jsat/index.php/jsat/article/view/89MathSciNetzbMATHGoogle Scholar
  15. 15.
    Xiao, F., Luo, M., Li, C.M., Manya, F., Lü, Z.: MapleLRB LCM, Maple LCM, Maple LCM dist, MapleLRB LCMoccRestart and glucose-3.0+ width in SAT competition 2017. In: Balyo, T., Heule, M.J.H., Järvisalo, M.J. (eds.) Proceedings of SAT Competition 2017: Solver and Benchmark Descrptions, pp. 22–23. University of Helsinki (2017). http://hdl.handle.net/10138/224324
   
posted on 2020-12-14 13:20  海阔凭鱼跃越  阅读(140)  评论(0编辑  收藏  举报