From e7eddf78e5fc3c9621b4e819d98e406dd9cb4748 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 3 Jul 2015 17:24:29 +0200 Subject: Improved parser --- Logic.icl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Logic.icl') 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} -- cgit v1.2.3