diff options
author | Camil Staps | 2015-07-03 17:24:29 +0200 |
---|---|---|
committer | Camil Staps | 2015-07-03 17:24:29 +0200 |
commit | 6ff517a8e4227d9489c7b771984dda7508a8158b (patch) | |
tree | 8011bcdc4645f9fcf4132c08ab51ceeb637c6729 /Logic.icl | |
parent | Parser; cleanup (diff) |
Improved parser
Diffstat (limited to 'Logic.icl')
-rw-r--r-- | Logic.icl | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -250,6 +250,9 @@ sorted_subexprs = sort o subexprs simple_truthtable :: Expr -> TruthTable simple_truthtable e = {exprs = [Atom a \\ a <- all_atoms e] ++ [e], options = all_atom_options e} +simple_truthtable_n :: [Expr] -> TruthTable // Simple truthtable with multiple expressions +simple_truthtable_n es = {exprs = removeDup ([Atom a \\ a <- flatten (map all_atoms es)] ++ es), options = flatten (map all_atom_options es)} + truthtable :: Expr -> TruthTable truthtable e = {exprs = sorted_subexprs e ++ [e], options = all_atom_options e} |