This is a very simple command-line tool to generate a truth table based on a given boolean expression.

Examples

sh $ target/debug/truth-table "a or b" a b | a∨b 0 0 | 0 0 1 | 1 1 0 | 1 1 1 | 1

sh $ truth-table "(a or b) -> c" a b c | (a∨b)→c 0 0 0 | 1 0 0 1 | 1 0 1 0 | 0 0 1 1 | 1 1 0 0 | 0 1 0 1 | 1 1 1 0 | 0 1 1 1 | 1