Converting circuit benchmark to CNF formula to use to solve with SAT solvers

322 views Asked by At

Is there any tool that can convert circuit benchmarks (ISCAS) to CNF so that it can be used in SAT solver? The main goal is to find some input patterns for the circuit which will give some predefined output in some gates.

2

There are 2 answers

0
Axel Kemper On

Tool questions are out of scope for this site.

I am not aware of a direct "ISCAS to DIMACS" converter.

You may have a look at bc2cnf. This is a versatile converter which reads a circuit description and writes the corresponding CNF in DIMACS format.It also contains a parser/converter for the ISCAS-related EDIMACS format.

0
cynthi8 On

ABC offers both read_bench and write_cnf.

However, write_cnf only works for circuits with one primary output. You will likely need to edit your benchmarks so that the primary output is 1 when your gate conditions are satisfied.