diff options
Diffstat (limited to 'Logic.dcl')
-rw-r--r-- | Logic.dcl | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -65,12 +65,12 @@ instance toString Op2 instance toString Expr instance toString TruthTable -instance == Op1 -instance < Op1 +instance == Op1 +instance < Op1 // Maybe useful later if more unary operators are added instance == Op2 -instance < Op2 +instance < Op2 // To sort by precedence instance == Expr -instance < Expr // To sort by unrigorous 'complexity'; e.g. in truthtables +instance < Expr // To sort by unrigorous 'complexity'; e.g. in truthtables binds_stronger :: Op2 Op2 -> Bool // True iff arg1 stronger binds than arg2 @@ -87,3 +87,5 @@ sorted_subexprs :: (Expr -> [Expr]) // Similar, but roughly sorted by co simple_truthtable :: Expr -> TruthTable // Simple truthtable: only the atomic expression and the expression itself truthtable :: Expr -> TruthTable // Truthtable from an expression +parse :: String -> Expr // Parse a string into an expression + |