diff options
Diffstat (limited to 'Logic.dcl')
-rw-r--r-- | Logic.dcl | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -20,6 +20,11 @@ import StdEnv // All Chars may be used, but typically only [a-zA-Z] are used :: AtomName :== Char +// Possibility for an atom to be true or false +:: AtomOption :== (AtomName,Bool) + +:: TruthTable = {exprs :: [Expr], options :: [[AtomOption]]} + isBool :: Expr -> Bool isAtom :: Expr -> Bool isApp1 :: Expr -> Bool @@ -38,3 +43,12 @@ instance toString Expr binds_stronger :: Op2 Op2 -> Bool // True iff arg1 stronger binds than arg2 +all_atoms :: Expr -> [AtomName] // All the atomic expressions in an expressions +all_atom_options :: Expr -> [[AtomOption]] // All AtomOptions for all atomic expressions in an expression + +substitute :: AtomOption Expr -> Expr // Substitute all atomic expressions with some name with some constant +substitute_all :: [AtomOption] Expr -> Expr // Same, for multiple options +eval :: Expr -> [Bool] // Evaluate to a simpler form + +instance toString TruthTable + |