BC_MINISAT_ALL: Blocking Clause-based AllSAT Solver

Takahisa Toda

Back to Top Page.

Last update: 2015-7-27


1. Description

A blocking clause-based AllSAT solver, implemented on top of MiniSat-C v1.14.1 obtained from The MiniSat Page, is presented.

One way to extend an ordinary SAT solver to AllSAT solving is to use blocking clauses. That is, whenever a solver finds a solution, take complement by considering a solution as a product of literals, i.e., cube, add it to CNF, and restart the solver from scratch. The obtained clause here is called a blocking clause. This approach was first introduced by McMillan 2002. Continueing search at the point where a solution is found is not straightforward, as mentioned in Jin et al 2005. This kind of blocking clauses can only "block" the single assignment we have just found, although it is nevertheless valuable because of nonchronological backtracking. To block many solutions, it is common to perform simplication of satisfying assignment by removing "redundant" literals and to compute the corresponding blocking clause.

In our implementation, whether simplification is performed or not can be selected by defining macro in Makefile (see below). Several techniques for simplification have been proposed (see Morgado and Marques-Silva 2005, Yu et al. 2014), however computing the minimum one is intractable, and we have to compromise ourselves with approximation, which means the simplified solutions may not be optimal. Our implementation performs simplification in a greedy manner and does not employ special optimizations except for a failthful implementation of the blocking clause mechanism stated above. Although there is still room for improvement on our simplification algorithm, we decided to release because no such implementation is available elsewhere.

2. DOWNLOAD

  • Latest version: blocking clause based minisat_all version 1.0.0, released on 27th Jul., 2015. Since we are planning to release other minisal_all based on completely different techniques, we call the blocking clause based program bc_minisat_all in short. According to this, the version number is reset.
  • Old versions: v.2.0.1, v.2.0.0, v.1.0.0.

3. FILE FORMAT

Input boolean formula should be in DIMACS CNF format. For details of DIMACS CNF format and benchmark problems, see SATLIB.

4. HOW TO COMPILE


$ tar zxvf bc_minisat_all-1.0.0.tar.gz
$ cd bc_minisat_all-1.0.0
$ make

      

5. MACRO

Program behavior can be controlled by defining the following macro in Makefile.
  • SIMPLIFICATION: Simplification of assignments is enabled. If this is not defined, simplification is not performed, and blocking clauses consisting of decision literals are used.
  • NONDISJOINT: Nondisjoint partial assignments are computed (see Yu et al. 2014). If this is not defined, computed partial assignments are pairwise disjoint: in other words, different partial assignments do not share common total assignments. This macro makes sense only when SIMPLIFICATION is defined too.
  • INC_VAR_ORD: Variable selection heuristic is disabled and variables are selected in increasing order of variable indices. If this is not defined, variable selection heuristic is used. This functionality is added to evaluate efficiency of variable selection heuristics.
  • TIMELIMIT: timelimit and progress report options are enabled. If this is not defined, specified options are ignored.
  • GMP: GNU MP bignum library is used to count a huge number of solutions.

6. USAGE

If an output file is specified, all satisfying assignments to a CNF are generated in DIMACS CNF format without problem line. Notice: there may be as many number of assignments as can not be stored in a disk space. If simplification is performed, computed assingments are partial, which means some variables may not appear. If you want to use timelimit or progress report functionality, define TIMELIMIT in Makefile.


Usage:  ./minisat_all [options] input-file [output-file]
-t<int> timelimit(sec): place an integer without space after 't'
-i<int> interval(sec) reporting number of solutions: the same as above

    

7. LICENSE

minisat_all is implemented by modifying MiniSat-C_v1.14.1. Please check the license file included in this software.

8. REFERENCES