Variable Ordering for Efficient SAT Search by Analyzing Constraint-Variable Dependencies

Vijay Durairaj and Priyank Kalla
Department of Electrical and Computer Engineering,
University of Utah, Salt Lake City, UT-84112
{durairaj, kalla}@ece.utah.edu

 

提出了一种新的度量——“变量对”之间的关联度(变量之间连通性的紧密性),我们提出了相关程度作为分析变量之间连通性紧密性的一个定性和定量的度量;

建立了权图上约束变量的依赖关系模型,并通过分析权图的拓扑结构来确定其顺序。


 

后续阅读笔记:2001年文献[MZ01]称之为:dynamic variable ordering

[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.


Abstract

 

This paper presents a new technique to derive an initial static variable ordering for efficient SAT search. Our approach not only exploits variable activity and connectivity information simultaneously, but it also analyzes how tightly the variables are related to each other.译文:本文提出了一种新的技术来推导初始静态变量的排序,以实现高效的SAT搜索。译文:我们的方法不仅同时利用变量活动和连接信息,而且还分析变量之间的紧密关系。

For this purpose,a new metric is proposed - the degree of correlation among pairs of variables. Variable activity and correlation information is modeled (implicitly) as a weighted graph.译文:为此,提出了一种新的度量——变量对之间的关联度。变元活跃度和相关性的信息被建模(隐式)为一个加权图。

A topological analysis of this graph generates an order for SAT search. 译文:对这个图的拓扑分析生成了一个用于SAT搜索的顺序。Also, the effect of decision-assignments on clause-variable dependencies is taken into account during this analysis.译文:同时,在分析过程中也考虑了决策分配对子句-变量依赖关系的影响。

An algorithm called ACCORD (ACtivity - CORrelation - ORDering) is proposed for this purpose. Using efficient implementations of the above, experiments are conducted over a wide range of benchmarks.

The results demonstrate that:译文:结果表明:

(i) the variable order generated by our approach significantlyimproves the performance of SAT solvers;译文:该方法产生的变元顺序显著提高了SAT求解器的性能;

(ii) time to derive this order is a fraction of the overall solving time.译文:推导这个顺序的时间是整个求解时间的一部分。

As a result, our approach delivers faster performance as compared to contemporary approaches.译文:因此,与当前方法相比,我们的方法提供了更快的性能。

   

 1 Introduction

 

An important aspect of CNF-SAT is to derive an ordering of variables to guide the search. The order in which variables (and correspondingly, constraints) are resolved significantly impacts the performance of SAT search procedures.译文:CNF-SAT的一个重要方面是推导变量的排序来指导搜索。解析变量(以及相应的约束)的顺序会显著影响SAT搜索过程的性能。

Variable activity and clause connectivity are often considered as qualitative and quantitative metrics to model clause-variable dependencies.译文:变元活跃度和子句连接性通常被认为是对子句变量依赖进行建模的定性和定量度量

Activity of a variable (or literal) is defined as the number of its occurrence among all the clauses of a given SAT problem [1].译文:变量(或文字)的活跃度定义为它在给定SAT问题[1]的所有子句中出现的次数

Most conventional SAT solvers [2] [3] [4] employ variable/literal-activity based branching  heuristics to resolve the constraints.译文:大多数传统的SAT求解器[2][3][4]使用基于变量/字面活动的分支启发式来解决约束。

   
 

Connectivity of constraints has also been used as a heuristic approach to derive variable orderings for SAT search. Loosely speaking, two clauses are said to be ”connected” if one or more variables are common to their support.译文:约束的连通性也被用作启发式的方法来推导SAT搜索的可变顺序。松散地说,如果一个或多个变量共同支持它们两个子句被称为“连接”

Clause connectivity can be modeled by representing CNF-SAT constraints as (hyper-) graphs and, subsequently, analyzing the graph’s topological structure.译文:子句连通性可以通过将CNF-SAT约束表示为(超)图,然后分析图的拓扑结构来建模。


Tree decomposition techniques have been proposed in literature [5] [6] for analyzing connectivity of constraints in constraint satisfaction programs (CSP).译文:文献[5][6]提出了树分解技术,用于分析CSP中约束的连通性。

Such techniques identify decompositions with minimum tree-width, thus enabling a partitioning of the overall problem into a chain of connected constraints.译文:这种技术以最小树宽识别分解,从而支持将整个问题划分为连接的约束链。

Recently, such approaches have also found application in those problems that can be modeled as DPLL-based CNF-SAT search [6] [7].译文:近年来,这些方法也被应用于那些可以建模为基于dpl的CNF-SAT搜索[6][7]的问题中。

 

 

Various approaches operate on such partitioned tree structures by deriving an order in which the partitioned 

set of constraints are resolved [6] [7] [8] [9] [10] [7] [11] [10].译文:各种方法通过导出被分区的树结构的顺序来对这些被分区的树结构进行操作。

Recently, Durairaj et. al. [12] proposed hypergraph bi-partitioning based constraint decomposition scheme (HGPART) that employs both variable activity and clause connectivity simultaneously to derive a variable order.

译文:最近,Durairaj等人[12]提出了基于超图双分区的约束分解方案(HGPART),该方案同时使用变元活跃度和子句连通性来推导可变顺序。

   
   

The above connectivity/tree-decomposition/partitioning-based methods that guide SAT diagnosis have one or more of the following limitations:译文:上述指导SAT诊断的基于连接/树分解/分区的方法有以下一个或多个限制:

(i) they suffer from large compute times to search the variable order [5] [9] [6];译文:为了搜索可变顺序[5][9][6],它们需要花费大量的计算时间;

(ii) the quality of the variable order does not consistently improve the performance of SAT solvers [9] [11];译文:变量顺序的质量并没有持续地提高SAT求解器[9][11]的性能;

(iii) there is no direct control over the decomposition [12].译文:没有对分解的直接控制。


Another limitation of these techniques is that while they do analyze variable activity, clause connectivity or both, however, they do not analyze how tightly the variables are connected to each other.译文:这些技术的另一个限制是,尽管它们确实分析变量活动、子句连接或同时分析两者,但它们不分析变量之间的连接有多紧密

As a result, tightly connected, hard problems may not realize the run-time improvements.译文:因此,紧密相连的困难问题可能无法实现运行时的改进。

   
 

To overcome the above limitations , this paper presents a new approach to derive an initial static ordering for SAT search by rigorously analyzing constraint variable dependencies.译文:为了克服上述局限性,本文提出了一种新的方法,通过严格分析约束变量的依赖关系来推导SAT搜索的初始静态排序。

Moreover, we analyze the effect of decision-assignments on the variable order and exploit this effect to further improve the order.译文:此外,我们分析了决策变元分配赋值对变元顺序的影响,并利用这种影响进一步改进了排序。

Experimental results demonstrate that our approach is faster and more robust than the contemporary variable ordering techniques, and it improves the performance of SAT solvers (in many cases by orders of magnitude).译文:实验结果表明,我们的方法比当前的可变排序技术更快、更健壮,并且它提高了SAT求解器的性能(在许多情况下是数量级的)。

   

2 ACCORD: Activity-Correlation Based Ordering

 

It is our desire to derive a variable order for SAT search by analyzing clause-variable relationships. The importance of branching on high activity variables is well understood [1].译文:我们希望通过分析clausl -variable关系来推导SAT搜索的变量顺序。[1]很好地理解了高活动变元分支的重要性。

Analyzing the connectivity of constraints is also important for constraint resolution. Contemporary techniques address both of the above issues.译文:分析约束的连通性对于约束的求解也很重要。当代技术解决了上述两个问题。

However, ‘how tightly are the variables related?’ - this feature too should not be overlooked.译文:然而,“这些变量之间的联系有多紧密?”——这一点也不应该被忽视。

For this purpose, we propose a metric(度量标准) that measures how tightly the variables are connected/related. We define this metric as follows:

译文:为此,我们提出一个指标(度量标准),衡量紧密连接/相关的变量。我们对这个度量的定义如下:

   
 

Definition 2.1. Two variables xi and xj are said to be correlated if they appear together (as literals) in one or more clauses. The number of clauses in which the pair of variables (xi, xj) appear together is termed as their degree of correlation.

两个变元成对出现在同一个子句中,说明它们相关。 这样的子句的数量称为这两个变量的相关度

   
 

In our approach, the constraint-variable relationship of a given CNF-SAT problem is modeled as a weighted graph.译文:在我们的方法中,约束-变量关系给定的CNF-SAT问题建模为一个加权图。

The variables (as opposed to literals) form the vertices, while edges denote the correlation/connectivity between them. 译文:变量(与文字相反)形成顶点,而边表示它们之间的相关性/连通性。


Associated with each variable is its activity, which is modeled as an integer value within the node. The edge weights represent the degree of correlation between the variables/vertices.译文:与每个变量相关联的是其活跃度,该活跃度在节点中建模为一个整数值。边权值表示变量/顶点之间的关联程度。

For example, if two variables xi, xj appear together in n clauses, then the weight of the edge eij connecting them is n.

An ordering of the nodes (variable order) can be performed by analyzing the graph’s topology.译文:节点的顺序(变元顺序)可以通过分析图的拓扑来执行。

We now describe our approach by means of an example corresponding to the CNF-SAT problem shown in Fig. 1(a).

Its corresponding weighted graph is depicted in Fig. 1(b).

   
   
   
   
   
   
   
 

Our approach is inspired from the Prim’s Minimum Spanning Tree (MST) algorithm [13]. We have named it the ACCORD (ACtivity COrrelation ORDering) algorithm.

The Pseudo code for the ACCORD algorithm is presented in Algorithm 1. The Variable-Clause database, mentioned in lines 1-2, is
implemented using the array of arrays data-structure available within contemporary SAT solvers [2] [14](注:chaff求解器).

The algorithm analyzes the clause-variable database, and for each variable, it computes its correlated variables. Using the activity and correlation measures, the variable ordering is computed.

The time complexity of ACCORD can be derived as O(V · (V ·C +V 2)), where V represents the number of variables and C represents the number of clauses.

 

   

 

3 Experimental Results and Analysis

 

The ACCORD algorithm has been programmed within the zCHAFF [2] solver using its native data-structures. The algorithm analyzes the constraint-variable relationships of the given CNF-SAT problem and derive a variable order for SAT search.

译文:ACCORD算法已经被编程在zCHAFF[2]求解器使用其本机数据结构。该算法分析了给定的CNF-SAT问题的约束-变量关系,给出了SAT搜索的变序。

 

Using this as the initial order, the SAT tool (zCHAFF) performs a search for the solutions. On encountering conflicts, we allow the solver to add conflict-induced clauses and proceed with its book-keeping and (non-chronological) back-tracking procedures. 译文:在遇到冲突时,我们允许求解者添加冲突分析分析得到的学习子句和非时间顺序回溯程序。

 

In other words, ACCORD provide only an initial static ordering. zCHAFF’s VSIDS heuristic updates this order dynamically, when conflict clauses are added. 译文:ACCORD只提供一个初始的静态顺序。当添加冲突子句时,zCHAFF的VSIDS启发式会动态地更新这个顺序。

 

Hence, our approach is not a replacement for VSIDS; it is to be used in conjunction with it. Using this setup, we have conducted experiments over a large set of benchmarks that include:译文:因此,我们的方法不是VSIDS的替代品;它将与它一起使用。使用这种设置,我们进行了大量的基准测试,包括:

i) Microprocessor verification benchmarks [15];

and ii) some of the hard instances specifically created for the SAT competition (all three categories - industrial, handmade and random).

We conducted our experiments on a Linux workstation with a 2.6GHz Pentium-IV processor and 512MB RAM.

   
   

As compared to zCHAFF and HGPart, the variable order generated by ACCORD results in a orders of magnitude speedup in SAT solving. Particularly for more difficult problems, our approach significantly outperforms the other two.

   
 

 Table 1. Run-time Comparison of ACCORD with zCHAFF and HGPART

 

 

Table 2 depicts some results for the microprocessor pipeline verification benchmarks. These experiments were conducted using both 2003 and 2004 versions of the zCHAFF SAT solver. 译文:描述微处理器管道验证基准测试的一些结果

For both experiments, the same variable order derived by ACCORD is used. Note that, using the ACCORD’s order, zCHAFF-2003 tool is able to improve the performance significantly. 

   
 

 Table 2. Run-time Comparison of ACCORD with zCHAFF’03 and zCHAFF’04

 

   

zCHAFF-2004 follows upon its earlier versions by implementing the efficient conflict analysis procedures proposed by [3].

As a result for these benchmarks, the order generated by ACCORD gets significantly modified due to the conflict clause resolution [3] and hence, the impact of ACCORD is minimal.(这句放在此处的意义是什么,想说明什么?)

   

 4 Conclusions and Future Work

 

This paper has advocated the need to analyze constraint-variable relationships to derive an ordering of variables to guide SAT diagnosis. 译文:本文主张需要分析约束-变量关系,以推导变量的排序,以指导SAT诊断。

To analyze the tightness of the connectivity between variables, we have proposed the degree of correlation
as a qualitative and quantitative metric. 译文:为了分析变量之间连通性的紧密性,我们提出了相关程度作为一个定性和定量的度量。

Our technique models the constraint variable dependencies on a weighted graph and analyzes the graph’s topological structure to derive the order. 译文:该方法建立了权图上约束变量的依赖关系模型,并通过分析权图的拓扑结构来确定其顺序。

Our approach is fast, robust, scalable and can handle a large set of variables and constraints. 译文:我们的方法快速、健壮、可扩展,并且可以处理大量的变量和约束。

The variable order derived by our procedure improves the performance of the solver by one or more orders of magnitude. 译文:由我们的程序导出的变量阶将求解器的性能提高一个或多个数量级。

As part of future work, we are exploring a dynamic variable order update strategy to be employed when conflict clauses are added to the database. 译文:作为未来工作的一部分,我们将探索在向数据库中添加冲突子句时使用的动态可变顺序更新策略。

   

 

 

References

1. J. P. M. Silva, “The Impact of Branching Heuristics in Propositional Satisfiability
Algorithms”, in Portuguese Conf. on Artificial Intelligence, 1999.
2. M. Moskewicz, C. Madigan, L. Zhao, and S. Malik, “CHAFF: Engineering and
Efficient SAT Solver”, in In Proc. Design Automation Conference, pp. 530–535,
June 2001.
3. E. Goldberg and Y. Novikov, “BerkMin: A Fast and Robust Sat-Solver”, in DATE,
pp 142-149, 2002.
4. J. Marques-Silva and K. A. Sakallah, “GRASP - A New Search Algorithm for
Satisfiability”, in ICCAD’96, pp. 220–227, Nov. 1996.
5. R. Dechter and J. Pearl, “Network-based Heuristics for Constraint-Satisfaction
Problems”, Artificial Intelligence, vol. 34, pp. 1–38, 1987.
6. E. Amir and S. McIlraith, “Solving Satisfiability using Decomposition and the
Most Constrained Subproblem”, in LICS workshop on Theory and Applications of
Satisfiability Testing (SAT 2001), 2001.

 

posted on 2020-07-18 09:15  海阔凭鱼跃越  阅读(162)  评论(0编辑  收藏  举报