Closed ghost closed 10 years ago
I think I spotted the mistake: The column values are populated in the order of the valuation hash, this doesn't necessarily resemble the order of the atoms in the vars list for the formula (which is used for the column labels). Currently working on a fix...
fixed with commit 9f733c8
Memo to self: It would be really great to have test cases on that...
"(e | a) & ((a & (b | c)) | d | ~c)".pl.truthTable res3: String = "--------------------
e a b c d | formula
0 0 0 0 0 | 0 0 0 1 0 0 | 0 0 0 0 0 1 | 0 0 0 1 0 1 | 0 0 0 0 1 0 | 0 0 0 1 1 0 | 0 0 0 0 1 1 | 0 0 0 1 1 1 | 0 1 0 0 0 0 | 1 1 0 1 0 0 | 1 1 0 0 0 1 | 1 1 0 1 0 1 | 1 1 0 0 1 0 | 1 1 0 1 1 0 | 1 1 0 0 1 1 | 1 1 0 1 1 1 | 1 0 1 0 0 0 | 1 0 1 1 0 0 | 1 0 1 0 0 1 | 0 0 1 1 0 1 | 1 0 1 0 1 0 | 1 0 1 1 1 0 | 1 0 1 0 1 1 | 0 <--- Result should be 1
0 1 1 1 1 | 1 1 1 0 0 0 | 1 1 1 1 0 0 | 1 1 1 0 0 1 | 1 1 1 1 0 1 | 1 1 1 0 1 0 | 1 1 1 1 1 0 | 1 1 1 0 1 1 | 1 1 1 1 1 1 | 1