I'm converting my problem to SMT and I have noticed that the SMT solvers (MathSat5 and CVC4) are slow when solving sat instances. My suspension is that there is something in my translation that is making it go slow.
I'm attaching a sample cnf instance and the smt2 translation for reference and below I'm providing solver times (excluding the translation time) for a larger instance to compare MathSat5, CVC4 and MiniSat.
Solver Solver Time (s)
-------------------------------------
MiniSat 0.028062 s
MathSat5 2.629702 s
CVC4 7.488870 s
CVC4(QF_SAT) 1.253978 s
So does anyone have an idea why these times are drastically different? PS. cvc4 says it spent 5.862 seconds in: theory uf symmetry_breaker
Sample cnf:
-------------------------------------
p cnf 20 91
4 -18 19 0
...
4 -16 -5 0
Sample smt2:
-------------------------------------
(set-logic QF_UF)
(set-info :smt-lib-version 2.0)
(set-option :produce-models true)
(declare-fun v1 () Bool)
...
(declare-fun x20 () Bool)
(assert (or v4 (not x18) x19))
...
(assert (or v4 (not v16) (not v5)))
(check-sat)
(get-value ( v1 ... x20))
(exit)
Thanks
SMT solvers have extra overhead because of theory solvers. In CVC4, you can avoid this by using the following commands:
(set-logic QF_UF)
(set-info :cvc4-logic QF_SAT)
instead of
(set-logic QF_UF)
Note that this is a CVC4 extension, not part of the SMT-LIB standard. But if you are truly using only Boolean reasoning, this should give you competitive performance.