definition:
|
nnf :: Boolean -> Boolean
nnf (Var x) = Var x
nnf n@(Not f) = case f of
(Var _) -> n
(Not g) -> nnf g
(And fs) -> Or (map (nnf . Not) fs)
(Or fs) -> And (map (nnf . Not) fs)
nnf (And fs) = And (map nnf fs)
nnf (Or fs) = Or (map nnf fs)
|
demand:
|
argument 1
|
deterministic:
|
deterministic operation
|
failfree:
|
_
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{({Var}) |-> {Var} || ({Not}) |-> _ || ({And}) |-> {And} || ({Or}) |-> {Or}}
|
name:
|
nnf
|
precedence:
|
no precedence defined
|
result-values:
|
_
|
signature:
|
Dimacs.Types.Boolean -> Dimacs.Types.Boolean
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
possibly non-terminating
|
totally-defined:
|
reducible on all ground data terms
|