Extracting Logic Circuit Structure from Conjunctive Normal Form Descriptions

Size: px
Start display at page:

Download "Extracting Logic Circuit Structure from Conjunctive Normal Form Descriptions"

Transcription

1 Extracting Logic Circuit Structure from Conjunctive Normal Form Descriptions Zhaohui Fu Sharad Malik Department of Electrical Engineering Princeton University Princeton, NJ 08544, USA Abstract Boolean Satisfiability is seeing increasing use as a decision procedure in Electronic Design Automation (EDA) and other domains. Most applications encode their domain specific constraints in Conjunctive Normal Form (CNF), which is accepted as input by most efficient contemporary SAT solvers [1 3]. However, such translation may have information loss. For example, when a circuit is encoded into CNF, structural information such as gate orientation, logic paths, signal observability, etc. is lost. However, recent research [4 6] shows that a substantial amount of the lost information can be restored in circuit form. This paper presents an efficient algorithm (CNF2CKT) for extracting circuit information from CNF instances. CNF2CKT is optimal in the sense that it extracts a maximum acyclic combinational circuit from any given CNF using the logic gates pre-specified in a library. The extracted circuit structure is valuable in various ways, particularly when the CNF is not encoded from the circuit, or the circuit description is not readily available. As an example, we show that the extracted circuit structure can be used to derive Circuit Observability Don t Cares [7] for speeding up CNF-SAT [8]. I. INTRODUCTION One of the major contributing factors to the recent successes in Boolean Satisfiability (SAT) research is the simple representation of the problem in the Conjunctive Normal Form (CNF). In the CNF description, a formula is expressed as a conjunction of clauses, each of which is a disjunction of literals. A literal is the occurrence of a variable in true or complemented form. For example, the formula (x+y )(x +y) is the CNF representation for the equality function for x and y (x y) with 2 clauses, each of which has 2 literals. The CNF representation of a SAT problem provides a data structure for efficient implementation of various techniques used in most contemporary SAT solvers [1 3]. Various verification or optimization problems can be easily encoded in CNF [9]. The simplicity of CNF comes with a tradeoff. Usually the domain specific representation contains more information than its encoded CNF counterpart. One such example is various verification tasks, such as equivalence and property checking, that arise from logic circuits. The encoded CNF does not have the explicit circuit structure, which could be very helpful in many situations like the applications of various Circuit-SAT [10] techniques and the use of Observability Don t Cares (ODC) [7] in CNF-SAT [8]. A. Motivation The entire effort of extracting circuit structure from CNF may seem redundant. Why not just retain the circuit from which this CNF was generated? Indeed, wherever possible that should be preferred course of action. However, this extraction is useful in the following scenarios: This research is supported by Award FA A from the Air Force Research Laboratory. Z. Fu is on leave from the Department of Computer Science, National University of Singapore, Singapore ) The CNF is not encoded from a circuit description. All SAT instances generated in Artificial Intelligence (AI), e.g. planning and scheduling, belong to this category. Some Electronic Design Automation (EDA) problems, like FPGA routing, are not encoded from a circuit, either. 2) The CNF is encoded from a circuit, which may not be available. Almost all the CNF benchmarks currently available online belong to this category. B. Previous Work It was generally thought that the information loss during encoding from circuit to CNF is unavoidable. Li first proposed an equivalence reasoning technique called EqSatz [4] that dynamically detects equivalent literals (gates) in the SAT instance. Ostrowski constructs an implicit graph of clauses [5] to recover AND and OR gates from the SAT instance in addition to the equivalence gates. Roy et al. use the CNF signature [6] to detect (N)AND, (N)OR, X(N)OR and MAJ3 gates from the CNF instance. However, all these previous attempts have several limitations. First, the gate detection mechanisms are all hard coded for each logic gate to be detected (which only include (N)AND, (N)OR, X(N)OR and MAJ3 gates). This leads to efficient implementation due to highly specialized pattern matching. However, it is also limiting as the hard coded pattern matcher cannot be easily generalized to recognize arbitrary gates that may have been present in a gate library used to generate such a CNF. Roy et al. propose a more general pattern matching approach based on sub-graph isomorphism, but the paper does not mention any implementation or experimentation. Second, the processes of detecting individual gates and reconstructing an acyclic circuit are inter-mixed, with no guarantee on the maximum size of the restored circuit structure. Third, their experiments show very interesting results, but some attributes, e.g. the size of the connected component in the restored circuit, are missing, thus one cannot deduce the exact efficacy of their approaches. Despite some limitations, these attempts, particularly by Roy et al. [6], demonstrate promising results in CNF-to-circuit decoding. C. Our Contribution There have long been two problem representation based directions in SAT research, circuit-sat [10] and CNF-SAT. Typically most circuit-sat techniques are not applicable in CNF-SAT. We present a tool CNF2CKT that bridges the gap between circuit-sat and CNF- SAT. The CNF2CKT algorithm efficiently extracts a maximum circuit structure from any given CNF instance. Some important features of CNF2CKT are: 1) It uses generic pattern matching techniques to detect all possible gate matchings (candidate matchings) for every logic gate in a user-specified gate library.

2 2) It then constructs a maximum acyclic combinational circuit by selecting a maximum subset of gate matchings, i.e. a cover, from all the candidate matchings. Maximum here is with respect to the number of logic gates in the extracted circuit, i.e. the size of the cover, since one matching corresponds to one logic gate in the extracted circuit. The cover is maximum in the sense that no other circuit structure containing more logic gates can be extracted from the CNF description. We also provide a specific application on how the extracted circuit structure could help in detecting and propagating Circuit Observability Don t Care information [7] in CNF-SAT [8]. This is useful for speeding up SAT even when the original CNF was derived from non-circuit applications. II. PATTERN MATCHING WITH CNF SIGNATURES The encoding of a logic circuit into CNF is of complexity O(n) [9], where n is the size of the circuit in the number of gates. The algorithm is a straightforward traversal of the circuit and for each logic gate, generating the corresponding set of clauses consistent with the logic function of that gate. This unique set of clauses is called a CNF signature [6] for that gate. There is a matching of a set of clauses from the CNF description to a gate, when each of these matches a clause in the CNF signature of that particular gate. For example, the CNF description...(x + z )(y + z )(x + y + z)... has a matching for an AND gate, whose CNF signature is (a + c )(b + c )(a + b + c) with x a,y b and z c. Note that the sign of the literals in the matched clauses must match as well. Instead of using a generic graph matcher (e.g. VFLib [11] as suggested by Roy et al.), we implement our own pattern matcher that takes advantage of the following facts. First, a valid candidate matching must have the same number of literals in all the matched clauses. This observation is useful in the early pruning of the search space. Second, we exploit various early termination strategies. For example, since we are only interested in finding a (not all) maximum matching, we treat the inputs of a logic gate as an unordered set. In other words, once a matching is found involving a set of inputs, we do not need to search any other matching involving the same set of inputs unless the output signal for that matching has changed. For a generic graph matcher each different order of inputs is a different graph matching. For example, a 10-input AND gate means 10! matchings in VFLib versus only 1 in CNF2CKT. Our pattern matcher explicitly utilizes these special property constraints and is sketched in Algorithm 1. Let V (CNF) be the set of all variables and C(CNF) be the set of all clauses in the given CNF. Then v V(CNF) is one Boolean variable and c C(CNF) is one clause. Since each CNF clause contains one or more literals, i.e. variable with positive/negative phase, we let l c to be a literal and c the total number of literals in clause c. var(l) = v gives the corresponding variable v of literal l. A key clause of a CNF signature is a clause that contains most variables (i.e. longest) associated with that gate. While we recognize that multiple output logic gates may be present in a library, we only consider single output gates in this paper. Multiple output gates are likely to be treated as separate gates with respect to each output signal during CNF encoding, as this results in a more compact CNF description. Note that the output variable must appear in every clause in the CNF signature. We use V(g) to denote the set of variables associated with gate g in the library. We use the key clause from the CNF signature of a given logic gate as a pivot to be compared against all the clauses in the CNF description. This is due to the observation that most logic gates in gate libraries have one key clause that contains all the input variables. Since every clause also contains the output variable, the key clause contains all variables associated with that logic gate. For example, the CNF signature of a 5-input AND gate contains the key clause (a + b +c +d +e + f ), where every variable except f (output variable) is an input variable. This observation is valid for other logic gates as well, such as (N)AND, (N)OR, INV, BUF and X(N)OR. Once we match the key clause from a CNF signature to a target clause in the CNF description, the remaining procedure is straightforward: First, both the number of positive and negative literals in the key clause and the matched target clause must be equal respectively. Second, we let the output variable be matched to any variable in the key clause with the same phase, i.e. positive or negative. Finally, with the output variable fixed in the key clause, the remaining variables must all be input variables. All possible permutations of the input variable matchings are generated one by one. For each permutation, we check if there are corresponding clauses in the CNF description that match those remaining unmatched clauses in the CNF signature. This check can be done very efficiently as each variable maintains a set of all clause indices it appears in according to its phase and the only operations involved are a series of set intersections. Though all permutations need to be searched in general, the first matched permutation terminates the entire search as subsequent matchings involving the same set of inputs are no longer necessary. Algorithm 1 Find All Candidate Matchings 1: for all gate g LIB do 2: c g := key clause in CNF signature of g 3: v gout := output variable of g 4: for all clause c C(CNF) do 5: if c g = c then 6: for all l c do 7: for all permutation p of V(g) \ {v gout } do 8: if c = V(g) and a matching m of g exists with c \ {var(l)} p and var(l) v gout then 9: Record m and continue from line :4 10: else if c < V(g) and multiple partial matchings of g exist with var(l) v gout then 11: for all Partial matching m do 12: if we can complete m with set of variables δ s.t. δ c \ {var(l)} p then 13: Record m 14: end if 15: end for 16: Continue from line 7 17: end if 18: end for 19: end for 20: end if 21: end for 22: end for The use of the key clause not only eases our pattern matching, it also plays an important role in the pruning of repeated matchings. Since the key clause in the CNF signature can be uniquely chosen in most cases, each candidate matching is discovered exactly once. Without this pruning, a candidate gate with an n clause CNF signature could be discovered as many as n times. It is worth mentioning that there are cases where the CNF signature of a gate does not have a key clause containing all input variables. Consider the gate that implements the logic function d = ab+bc. The CNF signature is (a +b +d)(b +c +d)(b+d )(a+c+d ) and none

3 of the four clauses contains all 4 variables a,b,c and d. CNF2CKT is still able to find all matchings for such a logic gate in the library despite the lack of the clause containing all variables, as illustrated in line 10 in Algorithm 1. In this case, CNF2CKT uses a structure hashing to prune the repeated matchings explicitly by recording the normalized (e.g. alphabetically sorted) successful matchings in the hash table. However, the introduction of the structure hashing causes a considerable amount of overhead in the entire algorithm in this case. Note that Algorithm 1 completely finds all possible gate matchings, which is important since we are going to construct a maximum acyclic combinational circuit using these matchings. III. CONSTRUCTING THE CIRCUIT USING MATCHINGS Using all detected gate matchings as building blocks, we need to construct a maximum acyclic combinational circuit from the given CNF. We focus on acyclic combinational circuits because in most cases an acyclic combinational circuit is used in the verification tasks. Let all possible gate matchings be denoted by M. Each individual matching m M matches logic gate g(m) from the library with set of inputs I(m), output variable out(m) to a set of matched clauses C(m) C(CNF). Recall that all gates in the library are single output. A clause c C(CNF) could be involved in a set of matchings S(c). Our objective is to select a maximum cover M c M such that the set of gates {g(m) : m M c } form an acyclic combinational circuit. With this notation, we present our constraints: 1) v V (CNF) if v = out(m i ) and v = out(m j ) for m i,m j M c, then m i = m j. In other words, every signal in the circuit can be the output of at most one gate in the cover. 2) c C(CNF) if c C(m i ) and c C(m j ) for m i,m j M c, then m i = m j. In other words, each clause can be involved in only one matching in the cover. 3) c C(CNF) if S(c) /0, then m S(c) such that m M c. In other words, every matched clause must be involved in at least one matching in the cover. 4) The logic circuit formed by {g(m) : m M c } must be acyclic. Constraints 1 and 2 are the correctness conditions for the cover, Constraint 3 focuses on maximizing the cover M c and Constraint 4 enforces an acyclic circuit to be extracted from the CNF. A. Maximizing the Cover M c Constraint 1 is clearly true for all logic circuits. Constraint 2 is true since the output variable appears in every clause in the CNF signature. Consider the following proof by contradiction. Proof: Suppose a clause c is involved in matchings m i,m j and m i m j. Then there must exist a variable x c and x = out(m i ). Similarly, there exists y c and y = out(m j ). According to constraint 1, x y. So we have y I(m i ) and x I(m j ), which means g(m i ) has x as input and y as output; similarly g(m j ) has y as input and x as output and they form a cycle! The contradiction shows that each clause can only be involved in at most one matching. We propose a SAT based approach to solve this problem optimally using zchaff [1]. While, SAT like MIS, is NP-complete, there are several highly efficient SAT packages available. We use a Boolean variable to denote whether the matching is going to be present in the cover. So the problem of finding a maximum cover is equivalent to finding a satisfying assignment with maximum true variables, which is also known as the max-ones SAT problem [12]. We do not solve the general max-ones problem, but rather construct a solution for this specific instance. Constraint 1 can be encoded into a set of clauses in the form of (m 1 + m 2 )(m 1 + m 3 )(m 2 + m 3 ) if all three matchings m 1,m 2 and m 3 share the same variable as their output. When a clause is involved in n matchings, constraint 2 and 3 together require the one-hot property (one and only one of them is true) among these n matchings. For example, these are the derived clauses for the onehot constraint with 3 matchings: (m 1 +m 2 )(m 1 +m 3 )(m 2 +m 3 )(m 1 + m 2 + m 3 ). Therefore, the objective of our max-ones SAT problem is equivalent to maximizing the total number of matchings in the cover M c. Unlike constraint 1 and 2, constraint 3 is not always true. It will be true only if no clause is left uncovered by M c. In fact, it may cause the overall optimization problem to be over-constrained. However, we include it in our SAT based approach because it motivates the SAT solver to look for the maximum number of true variables, which is equivalent to the maximum matchings in cover M c. If we only have constraint 1 and 2, then the SAT solver could easily give a trivial satisfying solution with all variables set to false. This is due to the fact that all clauses generated according to constraint 1 and 2 are 0-implication, i.e. they can only imply variables to be false (or 0), but can never imply a variable to be true (or 1). Constraint 3 helps us to avoid this situation by introducing 1-implication clauses like (m 1 + m 2 + m 3 ) when a clause is involved in matching m 1, m 2 and m 3. We refer to this kind of a clause as a constraint 3 clause. If the resulting SAT instance, with all clauses generated according to constraint 1, 2 and 3, is satisfiable, then clearly we have found a maximum cover (possibly cyclic at this point) since every matched clause is involved. On the other hand, if the SAT instance turns out to be unsatisfiable, the only reason is because of the over-constraints imposed by constraint 3, some of which have to be relaxed in order to obtain a satisfying solution. This problem is known as the Partial MAX-SAT problem [13], which contains two types of clauses: relaxable (constraint 3 clauses in our case) and non-relaxable (all other clauses). The objective is to satisfy all non-relaxable clauses and maximum number of relaxable clauses. We adopt an iterative relaxation strategy [13] with the use of the unsatisfiable core [14] that can be provided by the SAT solver for unsatisfiable instances. An unsatisfiable core is a subset of the original CNF clauses that are unsatisfiable by themselves. For each unsatisfiable core found (in each iteration) with k (k > 0) constraint 3 clauses, we add an unique relaxation variable to each of the k clauses. We restrict these k relaxation variables to be one-hot, which ensures that at any time there can only be one and at most one clause being relaxed (i.e. its relaxation variable is true). The relaxation process continues until the problem instance becomes satisfiable. This iterative UNSAT core relaxation strategy provides the optimal solution [13]. B. Enforcing the Acyclic Property of the Resulting Circuit Our discussion so far has been focusing on finding the maximum cover. However, we also have to enforce it to be acyclic. These cycles in the extracted circuits are usually caused by the undirectional gates. A gate is called undirectional if its output variable cannot be uniquely determined based only on its CNF signature and it is called directional if otherwise. For example, an n-input XOR gate (undirectional) can have n different orientations in terms of its output signal without violating constraint 1, 2 or 3. However, among these n orientations, many of them are likely to cause a combinational cycle somewhere else in the circuit. We perform an acyclic check for each maximum cover found by SAT. If the resulting circuit is cyclic, the cycle is identified and the matchings corresponding to the cycle are grouped into a blocking clause [15], which is added back to the problem instance to avoid

4 the solutions containing this cycle. The current solution is hence invalidated and the SAT solver is asked to find another feasible maximum cover. For example, if gates g(m 1 ),g(m 2 ),...,g(m k ) {g(m) : m M c } create a combinational cycle in the circuit, then the corresponding matchings are blocked by adding the clause (m 1 + m m k ). Note that the adding of blocking clause utilizes the incremental [16] SAT feature of zchaff. Maintaining the maximum amount of the learned clauses, i.e. recording the most visited search space, is a great advantage. Since constraints 1, 2 and 3 guarantee a maximum cover, the resulting solution is a maximum cover with the acyclic property. The combined algorithm for both maximum cover and restriction to an acyclic circuit is given in Algorithm 2. Algorithm 2 Construct A Maximum Acyclic Cover 1: Given all possible candidate matchings, construct a SAT instance using constraint 1, 2 and 3. 2: while true do 3: while SAT solver returns UNSATISFIABLE do 4: Let C o := the UNSAT CORE 5: Iteratively relax all constraint 3 clauses in C o 6: end while 7: while SAT solver returns SATISFIABLE do 8: if Resulting graph is acyclic then 9: Return this maximum cover 10: else 11: Add blocking clause containing matchings in the cycle 12: end if 13: end while 14: end while Note that Algorithm 2 has nested WHILE loops because there may not be any acyclic solution at this point, which in turn means that we need to further relax certain constraint 3 clauses. We will present one such case (XOR-Chain) in Section IV. IV. EXPERIMENTAL RESULTS We performed extensive experiments on thousands of CNF descriptions [17], both circuit encoded and non-circuit encoded. Circuit encoded benchmarks include DIMACS, beijing, ISCAS85 and various IBM benchmarks. Non-circuit encoded benchmarks include hanoi and some difficult benchmarks used in the SAT 05 Competition [18], e.g. the VPN class of benchmarks that are generated by model analyzer Alloy [19] on VPN models. Due to the page limit, we try to present more representative benchmarks (i.e. benchmarks with largest/smallest extracted circuit structure using largest/smallest amount of time). Further, we present more non-circuit generated benchmarks since it is not surprising to see that a large amount of circuit structure can be extracted from circuit generated benchmarks. Our matching library consists of (N)AND, (N)OR gates up to 10 inputs, X(N)OR gate up to 4 inputs, INV, BUF and MAJ3 gates. It is worth mentioning that both the matching time and the covering time are dependent on the gate library. Obviously, the more gates we have in the library, the longer it takes to match all of them. The complexity of the gates in the library also affects the execution time. For example, the CNF signature of a 4-input XOR gate has 16 clauses, each of which has 5 literals. Even verifying a partial matching of this gate takes more time than verifying a complete matching of a 4-input AND gate, which has only 5 clauses, 4 of which are 2 literal clauses. All the experiments are conducted on a Dell PowerEdge 700 running Linux Fedora Core 1.0 (g++ GCC 3.3.2) with single Pentium 4 2.8GHz, 1MB L2 cache CPU on 800MHz main bus. The first row in Table I gives the result of c499 whose original CNF description contains 606 variables in 1870 clauses. Our pattern matcher detects a total of 1124 candidate matchings. After 46 iterations of cycle detection/elimination and 0 iteration of relaxation on constraint 3 clauses, we can successfully construct an acyclic combinational circuit using 564 (out of 1870) matchings found by the pattern matcher. The total number of clauses involved in the construction of this circuit is The largest connected component in the circuit involves 605 variables, which is just 1 less than the total number of variables in the CNF description. The remaining 1 variable and unmatched clauses correspond to the property assertion for this benchmark. Note that the largest connected component involves more variables than the size of the cover M c, this is because input variables are included in the connected component but are excluded from the cover since they do not match to any gate in the library. The pattern matcher takes 0.06 second and the construction of the circuit takes 0.04 second. Note that if a CNF comes from a circuit, it is guaranteed for the circuit structure to be extracted completely. The circuit structures extracted from non-circuit generated CNF may vary dramatically. For example, we can only extract a set of small circuit structures from hanoi6. While for benchmarks like Mat317, we could recover a large circuit structure that includes every variable in the problem. Note that there are still unmatched clauses in this case, which correspond to the undetected relationships among some of these variables. In circuit encoded benchmarks, Table I also A B Fig. 1. C D F An XOR chain with three inputs shows the result of an XOR-Chain with 16 inputs. The XOR-Chain benchmark is based on the logic equation (v 1 (v 2 (v 3 (... (v n 1 v n ))))) ((((v 1 v 2 ) v 3 )... v n 1 ) v n ). Figure 1 shows an XOR-Chain with 3 inputs. The final assertion is E G, hence the CNF description containing clauses (E + G)(E + G ) should always be unsatisfiable. However, note that (E +G)(E +G ) can be matched as an INV, which is shown with segmented lines in Figure 1. Such topology is always cyclic if we try to include all 4 XOR gate and the INV gate in our final circuit. As a result, a huge number of blocking clauses are added to avoid each possible cycle and eventually the problem turns unsatisfiable to include all 5 gates. After relaxing one of the constraint 3 clauses (leaving any one of the 5 gate uncovered), we can now find an acyclic solution with 4 gates. The XOR-Chain is an extreme case of a heavily cyclic circuit, which we never encountered in any other circuit encoded industrial benchmark. Although not shown in our results, there are cases where the number of detected gates is too large for the covering algorithm to find the optimal solution within given time limit, e.g. 1 hour. V. DERIVING CIRCUIT OBSERVABILITY DON T CARES FROM CNF: AN APPLICATION The ability to decode circuit structures from the CNF has many applications, such as applying various Circuit-SAT algorithms [10,20,21] on CNF-SAT; customized SAT solvers for different sets of benchmarks based on the characteristics of the extracted E G

5 TABLE I STATISTICS OF THE EXTRACTED CIRCUIT STRUCTURE FROM BOTH CIRCUIT ENCODED AND NON-CIRCUIT ENCODED BENCHMARKS. Cate- Number Number Matches Cover Clauses Largest Cyclic Relax Matching Covering Benchmark gory Variables Clauses M M c Used Compon. Iter. Iter. time (s) time (s) Circuit Benchmarks Non-Circuit Benchmarks c bitadd xorchain longmult longmult longmult IBM01r/k IBM06r/k hanoi par simon/mat simon/mat linvrinv marijn/el l pyhala VPN/clause VPN/clause VPN/clause VPN/clause VPN/clause circuit (e.g. different decision strategies for CNFs for different types of circuits), etc. In addition to the above applications, we give an example of a straightforward application, which is to derive the Circuit Observability Don t Cares (Cir-ODC) from the extracted circuit structure and use it to accelerate the SAT solver [8,22 24]. The notion of Cir-ODC is as follows. Some signal s, under certain conditions C, no longer affects the outputs of the circuit. These conditions, C, are referred to as observability don t care conditions for s [8]. Figure 2 shows a two input AND gate G, which takes the output Fig. 2. An AND gate G takes as input the only fan-out from a logic cone C. value of a logic cone C of gates as one of its inputs. The output value of the AND gate G is fixed to be 0 if its input from B is zero, regardless of the output value of C, and therefore the entire logic cone of C need not be considered any more if it has only one fan-out that goes into G. Correspondingly in SAT, all the clauses corresponding to C can be ignored in the SAT solver in subsequent search. These clauses can be treated as Cir-ODC clauses and those gate outputs as Cir-ODC variables, since they are unobservable at the outputs of the circuit. This is accomplished by adding certain don t care literals to these clauses which are handled specially in SAT. These don t care literals help the SAT solver to reduce the unnecessary Boolean Constraint Propagation and provide a better guide to the decision heuristic. On the other hand, the SAT solver has to be modified in several aspects (e.g. no implication on don t care literals, decision heuristic, conflict driven clause learning, etc.) to handle the Cir-ODC information. In the example given by Figure 2, if we use b to denote the output variable of B, then don t care literal b is the Cir-ODC B C G condition for C to be unobservable. Clearly we need circuit structure information to derive these don t care literals. With the CNF2CKT algorithm provided in this paper, we can do just that when only the CNF is available. Table II gives detailed performance comparison between zchaff with Cir-ODC handling capability and the original zchaff. The first row of Table II shows the results for benchmark longmult12 with 5974 variables, among which 4987 gates are identified (The detailed information of benchmark longmult12, e.g. number of clauses, size of the largest connected component, etc., can be found in Table I). The Cir-ODC computation algorithm derives a total number of 2190 Cir- ODC literals and the maximum number of Cir-ODC literals added to a particular clause is 24. The time used for extracting the maximum circuit structure by CNF2CKT is 0.69 seconds (gate matching takes 0.55 seconds and SAT covering takes 0.14 seconds as shown in Table I). The time used for detecting/propagating Cir-ODC literals is 0.04 seconds. zchaff with Cir-ODC handling capability takes seconds, which brings the total time used by this approach to seconds. While zchaff alone (no CNF2CKT, Cir-ODC, etc.) takes seconds on benchmark longmult12. zchaff with Cir-ODC handling capability shows obvious advantages on both circuit encoded and non-circuit encoded benchmarks. Note that the VPN class of benchmarks are difficult to solve (this is also the reason that they are given more time in our experiment as compared to other circuit encoded benchmarks) and clause8 is not solvable at SAT 05 Competition [18] by any solvers within 200 minutes. For small benchmarks like clause2, the overall performance of zchaff with Cir-ODC using CNF2CKT is comparable to zchaff alone due to the overhead caused by CNF2CKT. However, for large benchmarks like clause6 and clause8, the time taken by CNF2CKT is very small compared to the time taken by zchaff. clause10 is an extremely large benchmark (187MB) and CNF2CKT takes seconds, but the overall performance is still significantly better than zchaff alone. More experimental results are given in Figure 3. Note the execution time taken by zchaff with Cir-ODC also includes the time used by CNF2CKT in the gate matching/circuit construction and the time

6 TABLE II PERFORMANCE COMPARISON ON ZCHAFF WITH CIR-ODC INFORMATION OBTAINED USING CNF2CKT. Cate- Number Gates Cir-ODC Literals zchaff Using Cir-ODC from CNF2CKT Benchmark gory Variables Detected Total Max/Cls CNF2CKT CirODC zchaffdc Total Circuit Non-Circuit zchaff longmult longmult longmult IBM01r/k > 3600 IBM06r/k > 3600 VPN/clause VPN/clause VPN/clause VPN/clause mem out VPN/clause used in Cir-ODC computation. The benchmark families considered in experiments on using Cir-ODC information include longmult, ferry, fpga routing, parity, hard eq check and various IBM benchmarks. The Cir-ODC handling ability clearly improves the performance of zchaff, both in terms of reducing the average execution time and the number of time-outs. Time Used: zchaff Only Time Used: CNF2CKT + Cir-ODC + zchaff with Cir-ODC Handling Fig. 3. Scatter plot of the execution time in seconds. Time-out is set to 300 seconds. The time used by zchaff with Cir-ODC includes the time used by CNF2CKT and the Cir-ODC computation time. There are 220 points in this figure and 137/83 of them are above/below the dividing line. VI. CONCLUSIONS We have presented a practically efficient and optimal tool, CNF2CKT, for extracting the maximum circuit structure from any given CNF description according to a pre-specified gate library. The CNF-to-circuit decoding time is library dependent and short for most benchmarks. The extracted circuit structure is useful in many applications, particularly when the CNF is not encoded from a circuit, or the circuit descriptions are not readily available. We show an example of exploiting circuit observability don t cares in CNF-SAT. We believe that CNF2CKT could benefit other researchers, particularly in the academia, by providing a viable way to bridge the gap between circuit-sat and CNF-SAT so that successful techniques from either branch can be easily shared with the other one. REFERENCES [1] M. W. Moskewicz, C. F. Madigan, Y. Zhao, L. Zhang, and S. Malik, Chaff: Engineering an efficient SAT solver, in DAC, [2] E. Goldberg and Y. Novikov, Berkmin: A fast and robust SAT solver, in DATE, 2002, pp [3] J. Marques-Silva and K. A. Sakallah, GRASP: A search algorithm for propositional satisfiability, IEEE Transactions on Computers, vol. 48, pp , [4] C. M. Li, Integrating equivalency reasoning into Davis-Putnam procedure, in Proceedings of the 7th National Conference on Artificial Intelligence (AAAI 00), 2000, pp [5] R. Ostrowski, Éric Grégoire, B. Mazure, and L. Saïs, Recovering and exploiting structural knowledge from cnf formulas, in Proceedings of the 8th International Conference on Principles and Practice of Constraint Programming (CP 02), 2002, pp [6] J. A. Roy, I. L. Markov, and V. Bertacco, Restoring circuit structure from SAT instances, in International Workshop on Logic Synthesis, Temecula Creek, CA, [7] K. Bartlett, R. K. Brayton, G. Hachtel, R. M. Jacoby, C. R. Morisson, R. L. Rudell, A. Sangiovanni-Vincentelli, and A. R. Wang, Multilevel logic optimization using implicit don t cares, IEEE Transactions on Computer-Aided Design, vol. 7, pp , June, [8] Z. Fu, Y. Yu, and S. Malik, Considering circuit observability don t cares in CNF satisfiability, in DATE, [9] G. S. Tseitin, On the complexity of derivation in propositional calculus, Studies in Constructive Mathematics and Mathematical Logic, pp , [10] M. K. Ganai, L. Zhang, P. Ashar, A. Gupta, and S. Malik, Combining strengths of circuit-based and CNF-based algorithms for a highperformance SAT solver, in DAC, [11] P. Foggia, The VFLib graph matching library graph/db/vflib-2.0/doc/vflib.html, March [12] N. Creignou, S. Khanna, and M. Sudan, Complexity classifications of boolean constraint satisfaction problems. SIAM, Philadelphia, [13] Z. Fu and S. Malik, On solving the Partial MAX-SAT problem, in International Conference on Theory and Applications of Satisfiability Testing (SAT 06), LNCS 4121, 2006, pp [14] L. Zhang and S. Malik, Validating SAT solvers using an independent resolution-based checker: Practical implementations and other applications, in DATE, [15] K. McMillan, Applying SAT methods in unbounded symbolic model checking, in Proceedings of the 14th International Conference on Computer-Aided Verification (CAV 02), July 2002, pp [16] O. Strichman, Prunning techniques for the SAT-based bounded model checking problem, in Proceedings of the 11th Conference on Correct Hardware Design and Verification Methods (CHARME 01), [17] D. L. Berre, July [18] D. L. Berre and L. Simon, [19] D. Jackson, Automating first-order relational logic, in ACM SIGSOFT Conference, Foundations of Software Engineering, November [20] A. Kuehlmann, M. K. Ganai, and V. Paruthi, Circuit-based Boolean reasoning, in DAC, [21] F. Lu, L. Wang, K. Cheng, and R. Huang, A circuit SAT solver with signal correlation guided learning, in DATE, 2003, pp [22] A. Gupta, A. Gupta, Z. Yang, and P. Ashar, Dynamic detection and removal of inactive clauses in SAT with application in image computation, in DAC, [23] S. Safarpour, A. Veneris, R. Drechsler, and J. Lee, Managing don t cares in Boolean satisfiability, in DATE, [24] M. N. Velev, Encoding global unobservability for efficient translation to SAT, in The 7th International Conference on Theory and Applications of Satisfiability Testing, Vancover, Canada, May, 2004.

Considering Circuit Observability Don t Cares in CNF Satisfiability

Considering Circuit Observability Don t Cares in CNF Satisfiability Considering Circuit Observability Don t Cares in CNF Satisfiability Zhaohui Fu Yinlei Yu Sharad Malik Department of Electrical Engineering Princeton University Princeton, NJ 08544, USA {zfu, yyu, sharad}@princeton.edu

More information

Learning Techniques for Pseudo-Boolean Solving and Optimization

Learning Techniques for Pseudo-Boolean Solving and Optimization Learning Techniques for Pseudo-Boolean Solving and Optimization José Faustino Fragoso Fremenin dos Santos September 29, 2008 Abstract The extension of conflict-based learning from Propositional Satisfiability

More information

Lookahead Saturation with Restriction for SAT

Lookahead Saturation with Restriction for SAT Lookahead Saturation with Restriction for SAT Anbulagan 1 and John Slaney 1,2 1 Logic and Computation Program, National ICT Australia Ltd., Canberra, Australia 2 Computer Sciences Laboratory, Australian

More information

Restoring Circuit Structure From SAT Instances. Jarrod A. Roy, Igor L. Markov, and Valeria Bertacco University of Michigan at Ann Arbor

Restoring Circuit Structure From SAT Instances. Jarrod A. Roy, Igor L. Markov, and Valeria Bertacco University of Michigan at Ann Arbor Restoring Circuit Structure From SAT Instances Jarrod A. Roy, Igor L. Markov, and Valeria Bertacco University of Michigan at Ann Arbor Outline Motivation Preliminaries A Generic Circuit Detection Algorithm

More information

On Computing Minimum Size Prime Implicants

On Computing Minimum Size Prime Implicants On Computing Minimum Size Prime Implicants João P. Marques Silva Cadence European Laboratories / IST-INESC Lisbon, Portugal jpms@inesc.pt Abstract In this paper we describe a new model and algorithm for

More information

On Resolution Proofs for Combinational Equivalence Checking

On Resolution Proofs for Combinational Equivalence Checking On Resolution Proofs for Combinational Equivalence Checking Satrajit Chatterjee Alan Mishchenko Robert Brayton Department of EECS U. C. Berkeley {satrajit, alanmi, brayton}@eecs.berkeley.edu Andreas Kuehlmann

More information

On Resolution Proofs for Combinational Equivalence

On Resolution Proofs for Combinational Equivalence 33.4 On Resolution Proofs for Combinational Equivalence Satrajit Chatterjee Alan Mishchenko Robert Brayton Department of EECS U. C. Berkeley {satrajit, alanmi, brayton}@eecs.berkeley.edu Andreas Kuehlmann

More information

Using Synthesis Techniques in SAT Solvers

Using Synthesis Techniques in SAT Solvers 1. Introduction Using Synthesis Techniques in SAT Solvers Rolf Drechsler Institute of Computer Science University of Bremen 28359 Bremen, Germany drechsle@informatik.uni-bremen.de Abstract In many application

More information

Validating SAT Solvers Using an Independent Resolution-Based Checker: Practical Implementations and Other Applications

Validating SAT Solvers Using an Independent Resolution-Based Checker: Practical Implementations and Other Applications Validating SAT Solvers Using an Independent Resolution-Based Checker: Practical Implementations and Other Applications Lintao Zhang Department of Electrical Engineering Princeton University lintaoz@ee.princeton.edu

More information

Local Two-Level And-Inverter Graph Minimization without Blowup

Local Two-Level And-Inverter Graph Minimization without Blowup Local Two-Level And-Inverter Graph Minimization without Blowup Robert Brummayer and Armin Biere Institute for Formal Models and Verification Johannes Kepler University Linz, Austria {robert.brummayer,

More information

Full CNF Encoding: The Counting Constraints Case

Full CNF Encoding: The Counting Constraints Case Full CNF Encoding: The Counting Constraints Case Olivier Bailleux 1 and Yacine Boufkhad 2 1 LERSIA, Université de Bourgogne Avenue Alain Savary, BP 47870 21078 Dijon Cedex olivier.bailleux@u-bourgogne.fr

More information

Boolean Representations and Combinatorial Equivalence

Boolean Representations and Combinatorial Equivalence Chapter 2 Boolean Representations and Combinatorial Equivalence This chapter introduces different representations of Boolean functions. It then discusses the applications of these representations for proving

More information

A Scalable Algorithm for Minimal Unsatisfiable Core Extraction

A Scalable Algorithm for Minimal Unsatisfiable Core Extraction A Scalable Algorithm for Minimal Unsatisfiable Core Extraction Nachum Dershowitz 1, Ziyad Hanna 2, and Alexander Nadel 1,2 1 School of Computer Science, Tel Aviv University, Ramat Aviv, Israel {nachumd,

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Tuomas Sandholm Carnegie Mellon University Computer Science Department [Read Chapter 6 of Russell & Norvig] Constraint satisfaction problems (CSPs) Standard search problem:

More information

A Novel SAT All-Solutions Solver for Efficient Preimage Computation

A Novel SAT All-Solutions Solver for Efficient Preimage Computation A Novel SAT All-Solutions Solver for Efficient Preimage Computation Bin Li Department of ECE Virginia Tech. Blacksburg, VA, 24061 Michael S. Hsiao Department of ECE Virginia Tech. Blacksburg, VA, 24061

More information

Heuristic Backtracking Algorithms for SAT

Heuristic Backtracking Algorithms for SAT Heuristic Backtracking Algorithms for SAT A. Bhalla, I. Lynce, J.T. de Sousa and J. Marques-Silva IST/INESC-ID, Technical University of Lisbon, Portugal fateet,ines,jts,jpmsg@sat.inesc.pt Abstract In recent

More information

Managing Don t Cares in Boolean Satisfiability

Managing Don t Cares in Boolean Satisfiability Managing on t Cares in Boolean Satisfiability Sean Safarpour 1 ndreas eneris 1,2 Rolf rechsler 3 Joanne ee 1 bstract dvances in Boolean satisfiability solvers have popularized their use in many of today

More information

Towards More Effective Unsatisfiability-Based Maximum Satisfiability Algorithms

Towards More Effective Unsatisfiability-Based Maximum Satisfiability Algorithms Towards More Effective Unsatisfiability-Based Maximum Satisfiability Algorithms Joao Marques-Silva and Vasco Manquinho School of Electronics and Computer Science, University of Southampton, UK IST/INESC-ID,

More information

An Experimental Evaluation of Conflict Diagnosis and Recursive Learning in Boolean Satisfiability

An Experimental Evaluation of Conflict Diagnosis and Recursive Learning in Boolean Satisfiability An Experimental Evaluation of Conflict Diagnosis and Recursive Learning in Boolean Satisfiability Fadi A. Aloul and Karem A. Sakallah Department of Electrical Engineering and Computer Science University

More information

Verification of Proofs of Unsatisfiability for CNF Formulas

Verification of Proofs of Unsatisfiability for CNF Formulas Verification of Proofs of Unsatisfiability for CNF Formulas Evgueni Goldberg Cadence Berkeley Labs (USA), Email: egold@cadence.com Yakov Novikov The United Institute of Informatics Problems, National Academy

More information

Hybrid Constraint Solvers

Hybrid Constraint Solvers Hybrid Constraint Solvers - An overview Why Hybrid Solvers CP and SAT: Lazy Clause Generation CP and LP: Reification of Linear Constraints Conclusions 9 November 2011 Pedro Barahona - EPCL - Hybrid Solvers

More information

Unrestricted Nogood Recording in CSP search

Unrestricted Nogood Recording in CSP search Unrestricted Nogood Recording in CSP search George Katsirelos and Fahiem Bacchus Department of Computer Science, University Of Toronto, Toronto, Ontario, Canada [gkatsi,fbacchus]@cs.toronto.edu Abstract.

More information

Restoring Circuit Structure from SAT Instances

Restoring Circuit Structure from SAT Instances Restoring Circuit Structure from SAT Instances Jarrod A. Roy University of Michigan EECS Department Ann Arbor, MI 48109-2122 royj@eecs.umich.edu Igor L. Markov University of Michigan EECS Department Ann

More information

Efficient Circuit to CNF Conversion

Efficient Circuit to CNF Conversion Efficient Circuit to CNF Conversion Panagiotis Manolios and Daron Vroon College of Computing, Georgia Institute of Technology, Atlanta, GA, 30332, USA http://www.cc.gatech.edu/home/{manolios,vroon} Abstract.

More information

Combinational Equivalence Checking Using Satisfiability and Recursive Learning

Combinational Equivalence Checking Using Satisfiability and Recursive Learning Combinational Equivalence Checking Using Satisfiability and Recursive Learning João Marques-Silva Thomas Glass Instituto Superior Técnico Siemens AG Cadence European Labs/INESC Corporate Technology 1000

More information

Normal Forms for Boolean Expressions

Normal Forms for Boolean Expressions Normal Forms for Boolean Expressions A NORMAL FORM defines a class expressions s.t. a. Satisfy certain structural properties b. Are usually universal: able to express every boolean function 1. Disjunctive

More information

EECS 219C: Formal Methods Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley

EECS 219C: Formal Methods Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Formal Methods Boolean Satisfiability Solving Sanjit A. Seshia EECS, UC Berkeley The Boolean Satisfiability Problem (SAT) Given: A Boolean formula F(x 1, x 2, x 3,, x n ) Can F evaluate to 1

More information

Integration of Supercubing and Learning in a SAT Solver

Integration of Supercubing and Learning in a SAT Solver Integration of Supercubing and Learning in a SAT Solver Domagoj Babić and Alan J. Hu Department of Computer Science University of British Columbia {babic,ajh}@cs.ubc.ca Abstract Learning is an essential

More information

QuteSat. A Robust Circuit-Based SAT Solver for Complex Circuit Structure. Chung-Yang (Ric) Huang National Taiwan University

QuteSat. A Robust Circuit-Based SAT Solver for Complex Circuit Structure. Chung-Yang (Ric) Huang National Taiwan University QuteSat A Robust Circuit-Based SAT Solver for Complex Circuit Structure Chung-Yang (Ric) Huang National Taiwan University To appear: DATE 27 2/1/27 Fact Sheet (Background) Boolean Satisfiability (SAT)

More information

Satisfiability-Based Algorithms for 0-1 Integer Programming

Satisfiability-Based Algorithms for 0-1 Integer Programming Satisfiability-Based Algorithms for 0-1 Integer Programming Vasco M. Manquinho, João P. Marques Silva, Arlindo L. Oliveira and Karem A. Sakallah Cadence European Laboratories / INESC Instituto Superior

More information

Design Diagnosis Using Boolean Satisfiability

Design Diagnosis Using Boolean Satisfiability Design Diagnosis Using Boolean Satisfiability Alexander Smith Andreas Veneris Anastasios Viglas University of Toronto University of Toronto University of Toronto Dept ECE Dept ECE and CS Dept CS Toronto,

More information

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving Sanjit A. Seshia EECS, UC Berkeley Project Proposals Due Friday, February 13 on bcourses Will discuss project topics on Monday Instructions

More information

Boolean Satisfiability: From Theoretical Hardness to Practical Success. Sharad Malik Princeton University

Boolean Satisfiability: From Theoretical Hardness to Practical Success. Sharad Malik Princeton University Boolean Satisfiability: From Theoretical Hardness to Practical Success Sharad Malik Princeton University SAT in a Nutshell Given a Boolean formula, find a variable assignment such that the formula evaluates

More information

ESE535: Electronic Design Automation CNF. Today CNF. 3-SAT Universal. Problem (A+B+/C)*(/B+D)*(C+/A+/E)

ESE535: Electronic Design Automation CNF. Today CNF. 3-SAT Universal. Problem (A+B+/C)*(/B+D)*(C+/A+/E) ESE535: Electronic Design Automation CNF Day 21: April 21, 2008 Modern SAT Solvers ({z}chaff, GRASP,miniSAT) Conjunctive Normal Form Logical AND of a set of clauses Product of sums Clauses: logical OR

More information

Checking Satisfiability of a Conjunction of BDDs

Checking Satisfiability of a Conjunction of BDDs 48. Checking Satisfiability of a Conjunction of BDDs Robert Damiano Advanced Technology Group Synopsys, Inc. Hillsboro, OR robertd@synopsys.com James Kukula Advanced Technology Group Synopsys, Inc. Hillsboro,

More information

On the Relation between SAT and BDDs for Equivalence Checking

On the Relation between SAT and BDDs for Equivalence Checking On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda 1 Rolf Drechsler 2 Alex Orailoglu 1 1 Computer Science & Engineering Department University of California, San Diego La Jolla,

More information

Boolean Functions (Formulas) and Propositional Logic

Boolean Functions (Formulas) and Propositional Logic EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving Part I: Basics Sanjit A. Seshia EECS, UC Berkeley Boolean Functions (Formulas) and Propositional Logic Variables: x 1, x 2, x 3,, x

More information

SAT Solvers. Ranjit Jhala, UC San Diego. April 9, 2013

SAT Solvers. Ranjit Jhala, UC San Diego. April 9, 2013 SAT Solvers Ranjit Jhala, UC San Diego April 9, 2013 Decision Procedures We will look very closely at the following 1. Propositional Logic 2. Theory of Equality 3. Theory of Uninterpreted Functions 4.

More information

Efficient SAT-based Boolean Matching for FPGA Technology Mapping

Efficient SAT-based Boolean Matching for FPGA Technology Mapping Efficient SAT-based Boolean Matching for FPGA Technology Mapping Sean Safarpour, Andreas Veneris Department of Electrical and Computer Engineering University of Toronto Toronto, ON, Canada {sean, veneris}@eecg.toronto.edu

More information

2SAT Andreas Klappenecker

2SAT Andreas Klappenecker 2SAT Andreas Klappenecker The Problem Can we make the following boolean formula true? ( x y) ( y z) (z y)! Terminology A boolean variable is a variable that can be assigned the values true (T) or false

More information

Solving Non-clausal Formulas with DPLL search

Solving Non-clausal Formulas with DPLL search Solving Non-clausal Formulas with DPLL search Christian Thiffault 1, Fahiem Bacchus 1, and Toby Walsh 2 1 Department of Computer Science, University of Toronto, Toronto, Ontario, Canada [cat fbacchus]@cs.toronto.edu

More information

BerkMin: a Fast and Robust Sat-Solver

BerkMin: a Fast and Robust Sat-Solver BerkMin: a Fast and Robust Sat-Solver Evgueni Goldberg Cadence Berkeley Labs(USA), Email: egold@cadence.com Yakov Novikov Academy of Sciences (Belarus), Email: nov@newman.bas-net.by Abstract We describe

More information

Symbolic Methods. The finite-state case. Martin Fränzle. Carl von Ossietzky Universität FK II, Dpt. Informatik Abt.

Symbolic Methods. The finite-state case. Martin Fränzle. Carl von Ossietzky Universität FK II, Dpt. Informatik Abt. Symbolic Methods The finite-state case Part I Martin Fränzle Carl von Ossietzky Universität FK II, Dpt. Informatik Abt. Hybride Systeme 02917: Symbolic Methods p.1/34 What you ll learn How to use and manipulate

More information

Set Manipulation with Boolean Functional Vectors for Symbolic Reachability Analysis

Set Manipulation with Boolean Functional Vectors for Symbolic Reachability Analysis Set Manipulation with Boolean Functional Vectors for Symbolic Reachability Analysis Amit Goel Department of ECE, Carnegie Mellon University, PA. 15213. USA. agoel@ece.cmu.edu Randal E. Bryant Computer

More information

SAT/SMT Solvers and Applications

SAT/SMT Solvers and Applications SAT/SMT Solvers and Applications University of Waterloo Winter 2013 Today s Lecture Lessons learnt so far Implementation-related attacks (control-hazard, malware,...) Program analysis techniques can detect

More information

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus: Boolean Algebra and Simplification CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Topics Motivation: Simplifying Conditional Expressions

More information

Guiding CNF-SAT Search by Analyzing Constraint-Variable Dependencies and Clause Lengths

Guiding CNF-SAT Search by Analyzing Constraint-Variable Dependencies and Clause Lengths APPEARED IN HLDVT 06 1 Guiding CNF-SAT Search by Analyzing Constraint-Variable Dependencies and Clause Lengths Vijay Durairaj and Priyank Kalla Department of Electrical and Computer Engineering University

More information

Search Pruning Conditions for Boolean Optimization

Search Pruning Conditions for Boolean Optimization Search Pruning Conditions for Boolean Optimization Vasco M. Manquinho vmm@algos.inesc.pt Polytechnical Institute of Portalegre Portalegre, Portugal João Marques-Silva jpms@inesc.pt Technical University

More information

Using Problem Symmetry in Search Based Satisfiability Algorithms. Mukul R. Prasad Fujitsu Labs. of America Sunnyvale, CA

Using Problem Symmetry in Search Based Satisfiability Algorithms. Mukul R. Prasad Fujitsu Labs. of America Sunnyvale, CA Using roblem Symmetry in Search Based Satisfiability Algorithms Evgueni I. Goldberg Cadence Berkeley Laboratories Berkeley, CA egold@cadence.com Mukul R. rasad Fujitsu Labs. of America Sunnyvale, CA mukul@fla.fujitsu.com

More information

QingTing: A Fast SAT Solver Using Local Search and E cient Unit Propagation

QingTing: A Fast SAT Solver Using Local Search and E cient Unit Propagation QingTing: A Fast SAT Solver Using Local Search and E cient Unit Propagation Xiao Yu Li, Matthias F. Stallmann, and Franc Brglez Dept. of Computer Science, NC State Univ., Raleigh, NC 27695, USA {xyli,mfms,brglez}@unity.ncsu.edu

More information

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

Variable Ordering for Efficient SAT Search by Analyzing Constraint-Variable Dependencies 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

More information

Combinational Equivalence Checking

Combinational Equivalence Checking Combinational Equivalence Checking Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab. Dept. of Electrical Engineering Indian Institute of Technology Bombay viren@ee.iitb.ac.in

More information

Better test results for the graph coloring and the Pigeonhole Problems using DPLL with k-literal representation

Better test results for the graph coloring and the Pigeonhole Problems using DPLL with k-literal representation Proceedings of the 7 th International Conference on Applied Informatics Eger, Hungary, January 28 31, 2007. Vol. 2. pp. 127 135. Better test results for the graph coloring and the Pigeonhole Problems using

More information

MajorSat: A SAT Solver to Majority Logic

MajorSat: A SAT Solver to Majority Logic MajorSat: A SAT Solver to Majority Logic Speaker : Ching-Yi Huang Authors: Yu-Min Chou, Yung-Chih Chen *, Chun-Yao Wang, Ching-Yi Huang National Tsing Hua University, Taiwan * Yuan Ze University, Taiwan

More information

Conditions for Non-Chronological Backtracking in Boolean Optimization

Conditions for Non-Chronological Backtracking in Boolean Optimization Conditions for Non-Chronological Backtracking in Boolean Optimization Vasco M. Manquinho vmm@algos.inesc.pt Polytechnical Institute of Portalegre Portalegre, Portugal João Marques-Silva jpms@inesc.pt Technical

More information

Unrestricted Backtracking Algorithms for Satisfiability

Unrestricted Backtracking Algorithms for Satisfiability From: AAAI Technical Report FS-01-04. Compilation copyright 2001, AAAI (www.aaai.org). All rights reserved. Unrestricted Backtracking Algorithms for Satisfiability I. Lynce, L. Baptista and J. Marques-Silva

More information

Integrating a SAT Solver with Isabelle/HOL

Integrating a SAT Solver with Isabelle/HOL Integrating a SAT Solver with / Tjark Weber (joint work with Alwen Tiu et al.) webertj@in.tum.de First Munich-Nancy Workshop on Decision Procedures for Theorem Provers March 6th & 7th, 2006 Integrating

More information

Circuit versus CNF Reasoning for Equivalence Checking

Circuit versus CNF Reasoning for Equivalence Checking Circuit versus CNF Reasoning for Equivalence Checking Armin Biere Institute for Formal Models and Verification Johannes Kepler University Linz, Austria Equivalence Checking Workshop 25 Madonna di Campiglio,

More information

Improving Unsatisfiability-based Algorithms for Boolean Optimization

Improving Unsatisfiability-based Algorithms for Boolean Optimization Improving Unsatisfiability-based Algorithms for Boolean Optimization Vasco Manquinho, Ruben Martins, and Inês Lynce IST/INESC-ID, Technical University of Lisbon, Portugal {vmm,ruben,ines}@sat.inesc-id.pt

More information

CS-E3220 Declarative Programming

CS-E3220 Declarative Programming CS-E3220 Declarative Programming Lecture 5: Premises for Modern SAT Solving Aalto University School of Science Department of Computer Science Spring 2018 Motivation The Davis-Putnam-Logemann-Loveland (DPLL)

More information

ABC basics (compilation from different articles)

ABC basics (compilation from different articles) 1. AIG construction 2. AIG optimization 3. Technology mapping ABC basics (compilation from different articles) 1. BACKGROUND An And-Inverter Graph (AIG) is a directed acyclic graph (DAG), in which a node

More information

Watching Clauses in Quantified Boolean Formulae

Watching Clauses in Quantified Boolean Formulae Watching Clauses in Quantified Boolean Formulae Andrew G D Rowley University of St. Andrews, Fife, Scotland agdr@dcs.st-and.ac.uk Abstract. I present a way to speed up the detection of pure literals and

More information

NiVER: Non Increasing Variable Elimination Resolution for Preprocessing SAT instances

NiVER: Non Increasing Variable Elimination Resolution for Preprocessing SAT instances NiVER: Non Increasing Variable Elimination Resolution for Preprocessing SAT instances Sathiamoorthy Subbarayan 1 and Dhiraj K Pradhan 2 1 Department of Innovation, IT-University of Copenhagen, Copenhagen,

More information

Integrating an AIG Package, Simulator, and SAT Solver

Integrating an AIG Package, Simulator, and SAT Solver Integrating an AIG Package, Simulator, and SAT Solver Alan Mishchenko Robert Brayton Department of EECS, UC Berkeley {alanmi, brayton}@berkeley.edu Abstract This paper focuses on problems where the interdependence

More information

SAT Solvers: A Condensed History. Sharad Malik Princeton University COS 598d 3/1/2010

SAT Solvers: A Condensed History. Sharad Malik Princeton University COS 598d 3/1/2010 SAT Solvers: A Condensed History Sharad Malik Princeton University COS 598d 3/1/2010 Where are we today? Intractability of the problem no longer daunting Can regularly handle practical instances with millions

More information

Versatile SAT-based Remapping for Standard Cells

Versatile SAT-based Remapping for Standard Cells Versatile SAT-based Remapping for Standard Cells Alan Mishchenko Robert Brayton Department of EECS, UC Berkeley {alanmi, brayton@berkeley.edu Thierry Besson Sriram Govindarajan Harm Arts Paul van Besouw

More information

Joint Entity Resolution

Joint Entity Resolution Joint Entity Resolution Steven Euijong Whang, Hector Garcia-Molina Computer Science Department, Stanford University 353 Serra Mall, Stanford, CA 94305, USA {swhang, hector}@cs.stanford.edu No Institute

More information

Satisfiability Solvers

Satisfiability Solvers Satisfiability Solvers Part 1: Systematic Solvers 600.325/425 Declarative Methods - J. Eisner 1 Vars SAT solving has made some progress 100000 10000 1000 100 10 1 1960 1970 1980 1990 2000 2010 Year slide

More information

Using Higher Levels of Abstraction for Solving Optimization Problems by Boolean Satisfiability

Using Higher Levels of Abstraction for Solving Optimization Problems by Boolean Satisfiability Using Higher Levels of Abstraction for Solving Optimization Problems by Boolean Satisfiability Robert Wille Daniel Große Mathias Soeken Rolf Drechsler Institute of Computer Science University of Bremen,

More information

Decision Procedures. An Algorithmic Point of View. Decision Procedures for Propositional Logic. D. Kroening O. Strichman.

Decision Procedures. An Algorithmic Point of View. Decision Procedures for Propositional Logic. D. Kroening O. Strichman. Decision Procedures An Algorithmic Point of View Decision Procedures for Propositional Logic D. Kroening O. Strichman ETH/Technion Version 1.0, 2007 Part I Decision Procedures for Propositional Logic Outline

More information

The log-support encoding of CSP into SAT

The log-support encoding of CSP into SAT The log-support encoding of CSP into SAT Marco Gavanelli 1 Dept. of Engineering, Ferrara University, WWW home page: http://www.ing.unife.it/docenti/marcogavanelli/ Abstract. Various encodings have been

More information

Adding a New Conflict Based Branching Heuristic in two Evolved DPLL SAT Solvers

Adding a New Conflict Based Branching Heuristic in two Evolved DPLL SAT Solvers Adding a New Conflict Based Branching Heuristic in two Evolved DPLL SAT Solvers Renato Bruni, Andrea Santori Università di Roma La Sapienza, Dip. di Informatica e Sistemistica, Via Michelangelo Buonarroti

More information

Routing and Wavelength Assignment in Optical Networks Using Boolean Satisfiability

Routing and Wavelength Assignment in Optical Networks Using Boolean Satisfiability Routing and Wavelength Assignment in Optical Networks Using Boolean Satisfiability Fadi A. Aloul Computer Engineering Department American University of Sharjah faloul@aus.edu Bashar Al-Rawi Dept. of Computer

More information

Clone: Solving Weighted Max-SAT in a Reduced Search Space

Clone: Solving Weighted Max-SAT in a Reduced Search Space Clone: Solving Weighted Max-SAT in a Reduced Search Space Knot Pipatsrisawat and Adnan Darwiche {thammakn,darwiche}@cs.ucla.edu Computer Science Department University of California, Los Angeles Abstract.

More information

SEPP: a New Compact Three-Level Logic Form

SEPP: a New Compact Three-Level Logic Form SEPP: a New Compact Three-Level Logic Form Valentina Ciriani Department of Information Technologies Università degli Studi di Milano, Italy valentina.ciriani@unimi.it Anna Bernasconi Department of Computer

More information

P Is Not Equal to NP. ScholarlyCommons. University of Pennsylvania. Jon Freeman University of Pennsylvania. October 1989

P Is Not Equal to NP. ScholarlyCommons. University of Pennsylvania. Jon Freeman University of Pennsylvania. October 1989 University of Pennsylvania ScholarlyCommons Technical Reports (CIS) Department of Computer & Information Science October 1989 P Is Not Equal to NP Jon Freeman University of Pennsylvania Follow this and

More information

Checking Equivalence for Circuits Containing Incompletely Specified Boxes

Checking Equivalence for Circuits Containing Incompletely Specified Boxes Freiburg, Germany, September 00 Checking Equivalence for Circuits Containing Incompletely Specified Boxes Christoph Scholl Bernd Becker Institute of Computer Science Albert Ludwigs University D 79110 Freiburg

More information

Chapter 2 PRELIMINARIES

Chapter 2 PRELIMINARIES 8 Chapter 2 PRELIMINARIES Throughout this thesis, we work with propositional or Boolean variables, that is, variables that take value in the set {true, false}. A propositional formula F representing a

More information

Heuristic-Based Backtracking for Propositional Satisfiability

Heuristic-Based Backtracking for Propositional Satisfiability Heuristic-Based Backtracking for Propositional Satisfiability A. Bhalla, I. Lynce, J.T. de Sousa, and J. Marques-Silva Technical University of Lisbon, IST/INESC-ID, Lisbon, Portugal {ateet,ines,jts,jpms}@sat.inesc.pt

More information

An Analysis and Comparison of Satisfiability Solving Techniques

An Analysis and Comparison of Satisfiability Solving Techniques An Analysis and Comparison of Satisfiability Solving Techniques Ankur Jain, Harsha V. Madhyastha, Craig M. Prince Department of Computer Science and Engineering University of Washington Seattle, WA 98195

More information

Searching for Autarkies to Trim Unsatisfiable Clause Sets

Searching for Autarkies to Trim Unsatisfiable Clause Sets Searching for Autarkies to Trim Unsatisfiable Clause Sets Mark Liffiton and Karem Sakallah Department of Electrical Engineering and Computer Science, University of Michigan, Ann Arbor 48109-2121 {liffiton,karem}@eecs.umich.edu

More information

ON SOLVING OPTIMIZATION PROBLEMS USING BOOLEAN SATISFIABILITY

ON SOLVING OPTIMIZATION PROBLEMS USING BOOLEAN SATISFIABILITY ON SOLVING OPTIMIZATION PROBLEMS USING BOOLEAN SATISFIABILITY Fadi A. Aloul American University of Sharjah Department of Computer Engineering P.O. Box 26666, Sharjah, UAE faloul@ausharjah.edu ABSTRACT

More information

Search Pruning Conditions for Boolean Optimization

Search Pruning Conditions for Boolean Optimization Search Pruning Conditions for Boolean Optimization Vasco M. Manquinho vmm@algos.inesc.pt Polytechnical Institute of Portalegre Portalegre, Portugal João Marques-Silva jpms@inesc.pt Technical University

More information

Formal Verification of Microprocessors

Formal Verification of Microprocessors Efficient Translation of Boolean Formulas to CNF in Formal Verification of Microprocessors Miroslav N. Velev Department of Electrical and Computer Engineering Carnegie Mellon University, Pittsburgh, PA

More information

Lecture 2: Symbolic Model Checking With SAT

Lecture 2: Symbolic Model Checking With SAT Lecture 2: Symbolic Model Checking With SAT Edmund M. Clarke, Jr. School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 (Joint work over several years with: A. Biere, A. Cimatti, Y.

More information

An Introduction to SAT Solvers

An Introduction to SAT Solvers An Introduction to SAT Solvers Knowles Atchison, Jr. Fall 2012 Johns Hopkins University Computational Complexity Research Paper December 11, 2012 Abstract As the first known example of an NP Complete problem,

More information

Abstraction Refinement for Bounded Model Checking

Abstraction Refinement for Bounded Model Checking Abstraction Refinement for Bounded Model Checking Anubhav Gupta 1 and Ofer Strichman 2 1 School of Computer Science, Carnegie Mellon University, USA anubhav@cs.cmu.edu 2 Information Systems Engineering,

More information

A Lightweight Component Caching Scheme for Satisfiability Solvers

A Lightweight Component Caching Scheme for Satisfiability Solvers A Lightweight Component Caching Scheme for Satisfiability Solvers Knot Pipatsrisawat and Adnan Darwiche {thammakn,darwiche}@cs.ucla.edu Computer Science Department University of California, Los Angeles

More information

Some Hardness Proofs

Some Hardness Proofs Some Hardness Proofs Magnus Lie Hetland January 2011 This is a very brief overview of some well-known hard (NP Hard and NP complete) problems, and the main ideas behind their hardness proofs. The document

More information

Chapter S:II. II. Search Space Representation

Chapter S:II. II. Search Space Representation Chapter S:II II. Search Space Representation Systematic Search Encoding of Problems State-Space Representation Problem-Reduction Representation Choosing a Representation S:II-1 Search Space Representation

More information

Solving 3-SAT. Radboud University Nijmegen. Bachelor Thesis. Supervisors: Henk Barendregt Alexandra Silva. Author: Peter Maandag s

Solving 3-SAT. Radboud University Nijmegen. Bachelor Thesis. Supervisors: Henk Barendregt Alexandra Silva. Author: Peter Maandag s Solving 3-SAT Radboud University Nijmegen Bachelor Thesis Author: Peter Maandag s3047121 Supervisors: Henk Barendregt Alexandra Silva July 2, 2012 Contents 1 Introduction 2 1.1 Problem context............................

More information

A Toolbox for Counter-Example Analysis and Optimization

A Toolbox for Counter-Example Analysis and Optimization A Toolbox for Counter-Example Analysis and Optimization Alan Mishchenko Niklas Een Robert Brayton Department of EECS, University of California, Berkeley {alanmi, een, brayton}@eecs.berkeley.edu Abstract

More information

Evaluation of SAT like Proof Techniques for Formal Verification of Word Level Circuits

Evaluation of SAT like Proof Techniques for Formal Verification of Word Level Circuits Evaluation of SAT like Proof Techniques for Formal Verification of Word Level Circuits André Sülflow Ulrich Kühne Robert Wille Daniel Große Rolf Drechsler Institute of Computer Science University of Bremen

More information

A proof-producing CSP solver: A proof supplement

A proof-producing CSP solver: A proof supplement A proof-producing CSP solver: A proof supplement Report IE/IS-2010-02 Michael Veksler Ofer Strichman mveksler@tx.technion.ac.il ofers@ie.technion.ac.il Technion Institute of Technology April 12, 2010 Abstract

More information

NP and computational intractability. Kleinberg and Tardos, chapter 8

NP and computational intractability. Kleinberg and Tardos, chapter 8 NP and computational intractability Kleinberg and Tardos, chapter 8 1 Major Transition So far we have studied certain algorithmic patterns Greedy, Divide and conquer, Dynamic programming to develop efficient

More information

A Boolean Paradigm in Multi-Valued Logic Synthesis

A Boolean Paradigm in Multi-Valued Logic Synthesis A Boolean Paradigm in Multi-Valued Logic Synthesis Abstract Alan Mishchenko Department of ECE Portland State University alanmi@ece.pd.edu Optimization algorithms used in binary multi-level logic synthesis,

More information

A New Algorithm to Create Prime Irredundant Boolean Expressions

A New Algorithm to Create Prime Irredundant Boolean Expressions A New Algorithm to Create Prime Irredundant Boolean Expressions Michel R.C.M. Berkelaar Eindhoven University of technology, P.O. Box 513, NL 5600 MB Eindhoven, The Netherlands Email: michel@es.ele.tue.nl

More information

Symmetry Breaking for Pseudo-Boolean Formulas

Symmetry Breaking for Pseudo-Boolean Formulas Symmetry Breaking for Pseudo-Boolean Formulas FADI A. ALOUL American University of Sharjah and ARATHI RAMANI, IGOR L. MARKOV, and KAREM A. SAKALLAH University of Michigan, Ann Arbor 1.3 Many important

More information

Learning Techniques for Pseudo-Boolean Solving

Learning Techniques for Pseudo-Boolean Solving José Santos IST/UTL, INESC-ID Lisbon, Portugal jffs@sat.inesc-id.pt Vasco Manquinho IST/UTL, INESC-ID Lisbon, Portugal vmm@sat.inesc-id.pt Abstract The extension of conflict-based learning from Propositional

More information

CS-E3200 Discrete Models and Search

CS-E3200 Discrete Models and Search Shahab Tasharrofi Department of Information and Computer Science, Aalto University Lecture 7: Complete and local search methods for SAT Outline Algorithms for solving Boolean satisfiability problems Complete

More information