Skip to content

Commit 6166a97

Browse files
committed
Allowing nnf to call to_CNF
1 parent 562cebc commit 6166a97

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: nnf/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,11 @@ def neg(node: NNF) -> NNF:
590590

591591
return neg(self)
592592

593+
def to_CNF(self: T_NNF) -> 'And[Or[Var]]':
594+
"""Compile theory to a semantically equivalent CNF formula."""
595+
from nnf import tseitin
596+
return tseitin.to_CNF(self)
597+
593598
def _cnf_satisfiable(self) -> bool:
594599
"""A naive DPLL SAT solver."""
595600
def DPLL(clauses: t.FrozenSet[t.FrozenSet[Var]]) -> bool:

0 commit comments

Comments
 (0)