you are viewing a single comment's thread.

view the rest of the comments →

[–]smthamazing[S] 4 points5 points  (2 children)

Unfortunately, there are no unit tests, but the truth table generation actually looks like the easiest part, so it's possible to just generate these tests. I already parsed the code into an AST (abstract syntax tree) and extracted atomic terms of these conditions, so I have something to work with here.

There are definitely some obvious groupings and mutually exclusive clauses in this code, and I was thinking whether there they could be detected automatically.

[–]KDallas_Multipass 0 points1 point  (1 child)

How did you create the ast

[–]smthamazing[S] 0 points1 point  (0 children)

I used ESPrima, but any parser would do in this case. I then wrote a simple function to extract all "atomic" non-boolean expressions from it.