3

i need to use sat solver for checking satisfiability of boolean expressions..

I have complex boolean expression like this

alt text

is there any automatic cnf file converter so that i can give it straight to sat solver?

I read the cnf format file.. but how to express this expression in .cnf file? i get confused when there is a conjunction inside the paranthesis and how to express --> and <-> ? please help me

Guy Coder
  • 24,501
  • 8
  • 71
  • 136
karthi
  • 2,762
  • 4
  • 30
  • 28

2 Answers2

6

There are a couple of solutions.

Limboole is an open source tool which I believe includes a separate 'propositional logic to CNF' converter.

More generally, you could also use a tool that supports propositional logic natively; some examples include Z3, CVC3, and Yices.

phooji
  • 10,086
  • 2
  • 38
  • 45
  • The SMT solvers you named are really overkill for SAT solving.... – EfForEffort Nov 06 '12 at 03:06
  • @DenisBueno: I kind of agree (SMT solvers do a lot more than SAT solving). In this case I don't really see a cost though -- modern DPLL(T)-based SMT solvers have SAT performance on par with the best SAT-only solvers, and they are not that much harder to use. If you're willing to use the SMT-lib syntax, you can write pretty high-level propositional stuff and still use the solvers interchangeably. I'll add that Z3, cvc3, and yices are being actively maintained and have fairly active mailing lists to support users. – phooji Nov 06 '12 at 04:13
2

SBSAT is a state based SAT solver that is able to accept a variety of input formats. You could take a simple expression and give it to SBSAT to convert to CNF. The manual, section 4.10, describes how to do this.

EfForEffort
  • 55,816
  • 4
  • 36
  • 41
  • I could not find such a feature in `SBSAT`. It is possible to specify the "trace format" as input format. However, this does not allow nested boolean expressions but only netlists of gate statements. – Axel Kemper Jan 16 '14 at 13:17