One of my lectures deals with mathematical logic. In order to play around with this highly interessting topic I wrote a small program dealing with this. The program is able to
- compute thruth tables
- evaluate expressions with custom input
- render syntax graphs
- check if an expression is satisfiable or a tautology
- Normalize expressions to CNF or DNF
The following operators are allowed:
You may use lower case characters suffixed with integer numbers (e.g.
a, b, c2, d-3
* This is just a test
(((a & b ) -> ((c | (a & c)) <-> d)) & a) <-> (a & (a <-> (b | c)))
Be aware that as I’m just beginning diving into this field all algorithms implemented in this application are NP complete. Meaning that the time it takes to compute certain things grows exponentially to the amount of distinct atoms (e.g. computing a truth tabe for
a & b
is way faster than for
a & b & c & d & e & f & g & h & i & j & k & l & m & n & o & p & q & r & s & t & u & v & w & x & y & z
which produces 67108864 rows).
The program runs on Windows, MacOSX and Linux. Alltough I didn’t test Windows (cauz’ I don’t have that “operating system” running anywhere). I’ll publish the binaries and source as soon as I have access to the University network tomorrow (where I have enough space left to do so).