Module Dimacs.Build

This module defines some operation to support the construction of Boolean formulas.

Author: Sven Hueser

Version: July 2021

Summary of exported operations:

va :: Int -> Boolean  Deterministic 
A Boolean variable with an index.
no :: Boolean -> Boolean  Deterministic 
Boolean negation.
nv :: Int -> Boolean  Deterministic 
Negated variable with an index.
(./\) :: Boolean -> Boolean -> Boolean  Deterministic 
Conjunction.
(.\/) :: Boolean -> Boolean -> Boolean  Deterministic 
Disjunction.
xor :: Boolean -> Boolean -> Boolean  Deterministic 
Exclusive or.
nnf :: Boolean -> Boolean  Deterministic 
cnf :: Boolean -> Boolean  Deterministic 
dist :: Boolean -> Boolean -> Boolean  Deterministic 
flatten :: Boolean -> Boolean  Deterministic 
flattenAnd :: [Boolean] -> [Boolean]  Deterministic 
flattenOr :: [Boolean] -> [Boolean]  Deterministic 
nubB :: Boolean -> Boolean  Deterministic 
toCNF :: Boolean -> Boolean  Deterministic 
filterTauts :: Boolean -> Boolean  Deterministic 
isTaut :: Boolean -> Bool  Deterministic 

Exported operations:

va :: Int -> Boolean  Deterministic 

A Boolean variable with an index. Note that the index should be a positive number.

Further infos:
  • solution complete, i.e., able to compute all solutions

no :: Boolean -> Boolean  Deterministic 

Boolean negation.

Further infos:
  • solution complete, i.e., able to compute all solutions

nv :: Int -> Boolean  Deterministic 

Negated variable with an index. Note that the index should be a positive number.

(./\) :: Boolean -> Boolean -> Boolean  Deterministic 

Conjunction.

Further infos:
  • defined as right-associative infix operator with precedence 3

(.\/) :: Boolean -> Boolean -> Boolean  Deterministic 

Disjunction.

Further infos:
  • defined as right-associative infix operator with precedence 2

xor :: Boolean -> Boolean -> Boolean  Deterministic 

Exclusive or.

nnf :: Boolean -> Boolean  Deterministic 

cnf :: Boolean -> Boolean  Deterministic 

dist :: Boolean -> Boolean -> Boolean  Deterministic 

flatten :: Boolean -> Boolean  Deterministic 

flattenAnd :: [Boolean] -> [Boolean]  Deterministic 

flattenOr :: [Boolean] -> [Boolean]  Deterministic 

nubB :: Boolean -> Boolean  Deterministic 

toCNF :: Boolean -> Boolean  Deterministic 

isTaut :: Boolean -> Bool  Deterministic