Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 514 Bytes

README.md

File metadata and controls

18 lines (15 loc) · 514 Bytes

Normal forms converter

This project converts propositional formula into three normal forms: NNF, DNF, CNF.

Example

$ stack run
a <=> ~ (a & b => c | d)
NNF: (~a | a & b & ~c & ~d) & (~a | ~b | c | d | a)
DNF: ~a & ~a | a & b & ~c & ~d & ~a | ~a & ~b | a & b & ~c & ~d & ~b | ~a & c | a & b & ~c & ~d & c | ~a & d | a & b & ~c & ~d & d | ~a & a | a & b & ~c & ~d & a
CNF: (~a | a) & (~a | b) & (~a | ~c) & (~a | ~d) & (~a | ~b | c | d | a)

Tests

To run tests execute:

$ stack test