diff options
author | Camil Staps | 2015-07-03 13:11:30 +0200 |
---|---|---|
committer | Camil Staps | 2015-07-03 13:11:30 +0200 |
commit | 4536333e33d838c40f7041bf6737d63328b32160 (patch) | |
tree | 515fc18f7022fc5db00d5066bd2a9a7d8c61dcb2 /Logic.dcl | |
parent | Truth tables (diff) |
Nicer truthtables
Diffstat (limited to 'Logic.dcl')
-rw-r--r-- | Logic.dcl | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -40,6 +40,14 @@ isEquiv :: Expr -> Bool instance toString Op1 instance toString Op2 instance toString Expr +instance toString TruthTable + +instance == Op1 +instance < Op1 +instance == Op2 +instance < Op2 +instance == Expr +instance < Expr // To sort by unrigorous 'complexity'; e.g. in truthtables binds_stronger :: Op2 Op2 -> Bool // True iff arg1 stronger binds than arg2 @@ -50,5 +58,7 @@ substitute :: AtomOption Expr -> Expr // Substitute all atomic expressions substitute_all :: [AtomOption] Expr -> Expr // Same, for multiple options eval :: Expr -> [Bool] // Evaluate to a simpler form -instance toString TruthTable +subexprs :: Expr -> [Expr] // Subexpressions of an expression +sorted_subexprs :: (Expr -> [Expr]) // Similar, but roughly sorted by complexity +truthtable :: Expr -> TruthTable // Truthtable from an expression |