
TL;DR
This paper introduces core first unit propagation, a new technique that prioritizes core clauses to generate shorter learnt clauses, improving SAT solver performance.
Contribution
It proposes a novel core first unit propagation method that enhances clause learning efficiency in SAT solvers.
Findings
Improves performance of MapleLCMDistChronoBT solver
Prioritizing core clauses reduces learnt clause size
Empirical results show performance gains
Abstract
Unit propagation (which is called also Boolean Constraint Propagation) has been an important component of every modern CDCL SAT solver since the CDCL solver was developed. In general, unit propagation is implemented by scanning sequentially every clause over a linear watch-list. This paper presents a new unit propagation technique called core first unit propagation. The main idea is to prefer core clauses over non-core ones during unit propagation, trying to generate a shorter learnt clause. Here, the core clause is defined as one with literal block distance less than or equal to 7. Empirical results show that core first unit propagation improves the performance of the winner of the SAT Competition 2018, MapleLCMDistChronoBT.
| Base | |||||
|---|---|---|---|---|---|
| Solved | 138 | 134 | 142 | 141 | |
| SAT | Time | 99104 | 78397 | 91136 | 95723 |
| Solved | 102 | 102 | 103 | 103 | |
| UNSAT | Time | 66845 | 70338 | 69131 | 72962 |
| Solved | 240 | 236 | 245 | 244 | |
| ALL | Time | 165949 | 148735 | 160267 | 168685 |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsFormal Methods in Verification · Constraint Satisfaction and Optimization · Logic, Reasoning, and Knowledge
11institutetext: School of Informatics, Donghua University
2999 North Renmin Road, Songjiang District, Shanghai 201620, P. R. China 11email: [email protected]
Core First Unit Propagation
Jingchao Chen
Abstract
Unit propagation (which is called also Boolean Constraint Propagation) has been an important component of every modern CDCL SAT solver since the CDCL solver was developed. In general, unit propagation is implemented by scanning sequentially every clause over a linear watch-list. This paper presents a new unit propagation technique called core first unit propagation. The main idea is to prefer core clauses over non-core ones during unit propagation, trying to generate a shorter learnt clause. Here, the core clause is defined as one with literal block distance less than or equal to 7. Empirical results show that core first unit propagation improves the performance of the winner of the SAT Competition 2018, MapleLCMDistChronoBT.
Keywords:
CDCL SAT solvers, unit propagation, Boolean Constraint Propagation
1 Introduction
Since the GRASP solver was envisioned in 1996 [5], Conflict-Driven Clause Learning (CDCL) SAT solving has been achieved great success in many fields. Unit propagation (which is called also Boolean Constraint Propagation) is not only an important component of every modern CDCL SAT solver, but also an important one of some proof checkers [1]. To our best knowledge, so far this component has not been studied yet. This paper focuses on this problem.
A CDCL SAT solver works on a CNF (Conjunctive Normal Form) formula, which is defined as a finite conjunction of clauses, and also can be denoted by a finite set of clauses. A clause is a disjunction of literals, also written as a set of literals, which is either a variable or the negation of a variable. A clause is said to be a unit clause if it consists only of literals assigned to value 0 (false) and one unassigned literal. BCP (Boolean Constraint Propagation) fixes the unassigned literal in a unit clause to the value 1 (true) to satisfy that clause. This variable assignment is referred to as an implication. BCP carries out repeatedly the identification of unit clauses and the creation of the associated implications until either no more implications are found or a conflict (empty clause) is produced.
It is generally accepted that BCP is implemented by scanning sequentially every clause over a linear watch-list. This implementation is called a standard BCP. By our empirical observation, we found that the standard BCP implementation is not efficient in some cases. Therefore, we decided to propose a new unit propagation technique called core first unit propagation. The basic idea of this technique is to prefer core clauses over non-core ones during unit propagation, trying to generate a shorter learnt clause. Here the core clause is defined as one with literal block distance less than or equal to 7. This definition is consistent with that of Ref. [7]. Empirical results show that core first unit propagation improves the performance of the winner of the SAT Competition 2018, MapleLCMDistChronoBT [3, 4].
2 Core First Unit Propagation
The idea of CFUP ( Core First Unit Propagation) is to classify clauses as core or non core, and prefer core clauses over non-core ones during unit propagation. A clause is core if it is a learnt clause and its LBD (Literal Block Distance) value is less than 7. LBD is defined as the number of decision variables in a clause [6]. Our core concept corresponds to the concept of non local in the CoMiniSatPS solver that classifies learnt clauses into three categories [7]. References [1, 2] have similar concepts. But they are different from the core concept used in this paper. In [1, 2], core clauses refer to marked or visited ones, and have nothing to do with LBD.
Our CFUP uses a single watchlist, not two separate watchlists. We implement to select core clauses first by moving core clauses ahead of non-core clauses during unit propagation. When watchlists are built initially, core clauses are not in front of non-core clauses. Like the standard BCP, the goal of CFUP is to search for all unit clauses. This can be done by repeating the following process until either no more implications are found or a conflict (empty clause) is produced: Remove the first unvisited literal from ; get new implications from clauses watched by ; and add the new implications to , where is a trail stack of decision literals and implications. The core priority strategies of CFUP embodies in the update of watchlists. Algorithm 1 shows CFUP.
The pseudo-code of CFUP shown in Algorithm 1 assumes that a full literal watch scheme (a full occurrence list of all clauses) is used, If using a two literal watch scheme [8], The statement “Append to the end of ” in Algorithm 1 can be modified as follows.
Removing the statement “” in CFUP yields a standard BCP. In the real implementation, we do not use a list to store core clauses during unit propagation. instead of it, we do it by swapping two elements in . In details, let and be core and non core clause zone, respectively. if is a core clause, we swap and . Otherwise, we do nothing. A general CDCL solver has two watchlists: binary and non binary. We adopt the core priority strategy only on a non-binary watchlist.
By our empirical observation, adopting always the core priority strategy is not good choice. A better policy is that when the number of conflicts is less than , CFUP is called, Otherwise, BCP is called. The high-level algorithm CDCL combining CFUP and BCP are shown in Algorithm 2.
CDCL given in Algorithm 2 uses a loop to reach a status where either all the variables are assigned (SAT) or an empty clause is derived (UNSAT). Inside the loop, based on whether the number of conflicts is greater than , it decides to invoke either CFUP or BCP. Here BCP is considered a unit propagation without any priority strategy. If there is a conflict, CFUP or BCP returns a falsified conflicting clause. Otherwise, a new decision is taken and pushed to the trail stack. Conflict analysis learns a new 1UIP clause . CDCL asserts the unassigned 1UIP literal and pushes it to the trail stack.
3 Empirical evaluation
All experiments were conducted under the following platform: Intel core i5-4590 CPU with speed of 3.3 GHz. The timeout for each solving was set to 5000 seconds. We have added CFUP to MapleLCMDistChronoBT [3, 4], which was the winner of the main track in the SAT Competition 2018 [9].
Table 1 shows briefly the runtime and solved instances of the default Maple-LCMDistChronoBT vs. the best configuration in CFUP mode, , as well as two vicinity configurations and . As seen in Table 1, outperforms the default MapleLCMDistChronoBT in terms of both the number of solved instances and the runtime. It solves 5 more instances and is faster by 5682 seconds. The number of core clauses increases with the increase of the number of conflicts. When the number of core clauses is large, CFUP is identical to BCP. Compared with BCP, the cost of CFUP is higher than that of BCP. So should not be set to very large. It is easy to see that CFUP has a certain extent advantage on satisfiable instances in some configurations.
Figures 1 and 2 shows a log-log scatter plot comparing the running times of the default MapleLCMDistChronoBT vs. the overall winner on satisfiable and unsatisfiable instances, respectively. Each point corresponds to a given instance. A point at line (resp., ) means that the instances on that point were not solved by default version (resp., ). As shown in Figure 1, the points that appear over the diagonal are more than ones below the diagonal. Figure 1 shows that in many cases, ) is faster than the default configuration. Among the instances given in Figure 1, the unsolved instances of the default configuration and the best configuration are 12 and 8, respectively. That is, the best configuration solves 4 more satisfiable instances than the default configuration. Figure 2 demonstrates that although in almost all the cases the speed of the best configuration is the same as that of the default configuration, the best configuration solves 1 more unsatisfiable instance than the default.
4 Conclusions
Implementing CFUP is a trivial task. It can be done by making a little modification to BCP of the solver. We have added CFUP into the main track winner of the SAT Competition 2018, MapleLCMDistChronoBT. Empirical results show that CFUP improves the overall performance of the solver in some configurations. In theory, when analyzing a conflicting clause, using short LBD clauses should be more beneficial than using long LBD clauses. That is, replacing completely the standard BCP with CFUP should be the best choice. However, in fact, combining CFUP and the standard BCP is a good choice. Its reason is well worth studying in future.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Lammich P.: Efficient Verified (UN)SAT Certificate Checking, CADE 2017, LNCS 10395, pp. 237–254 (2017)
- 2[2] Chen J.: Fast Verifying Proofs of Propositional Unsatisfiability via Window Shifting, (2018), https://arxiv.org/abs/1611.04838
- 3[3] Nadel, A., Ryvchin, V.: Chronological Backtracking, SAT 2018, LNCS 10929, pp. 111–121 (2018)
- 4[4] Ryvchin, V., Nadel, A.: Maple_LCM_Dist_Chrono BT: Featuring Chronological Backtracking, Proceedings of SAT competition 2018, p.29
- 5[5] Marques Silva, J.P., Sakallah, K.A.: GRASP - a new search algorithm for satisfiability, ICCAD, pp. 220 C 227 (1996)
- 6[6] Audemard, G., Simon, L.: predicting learnt clauses quality in modern SAT solvers, IJCAI 2009.
- 7[7] Oh, C.: Between SAT and UNSAT: The fundamental difference in CDCL SAT, SAT 2015.
- 8[8] Zhang, H. : SATO: An efficient propositional prover. 14th International Conference on Automated Deduction (CADE), LNCS 1249, 272–275(1997)
