aboutsummaryrefslogtreecommitdiff
path: root/Logic.icl
diff options
context:
space:
mode:
authorCamil Staps2015-07-03 17:24:29 +0200
committerCamil Staps2015-07-03 17:32:30 +0200
commite7eddf78e5fc3c9621b4e819d98e406dd9cb4748 (patch)
tree87c455f97f1211fdd227d374dcece9c5fb50d20e /Logic.icl
parentParser; cleanup (diff)
Improved parser
Diffstat (limited to 'Logic.icl')
-rw-r--r--Logic.icl3
1 files changed, 3 insertions, 0 deletions
diff --git a/Logic.icl b/Logic.icl
index 0d739cd..dabc71d 100644
--- a/Logic.icl
+++ b/Logic.icl
@@ -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}