21.01.2015 Views

Boolean Satisfiability (SAT) Algorithms

Boolean Satisfiability (SAT) Algorithms

Boolean Satisfiability (SAT) Algorithms

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Converting a Circuit to a CNF<br />

Circuit_to_CNF(Circuit c)<br />

Assign one variable to each gate in the circuit,<br />

including PIs<br />

For each gate in the circuit, generate the clauses<br />

for the characteristic function of this gate<br />

Conjunct all the clauses in step 2, return the CNF<br />

Write_CNF(gate g)<br />

Enumerate all the forward implications of this gate<br />

For each implication, generate a clause by the<br />

rule: p q ≡ (p’ + q)<br />

<strong>Boolean</strong> <strong>SAT</strong> <strong>Algorithms</strong> / FLOLAC 2009 Prof. Chung-Yang (Ric) Huang http://dvlab.ee.ntu.edu.tw<br />

90

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!