Copyright | (c) Eddie Jones 2020 |
---|---|
License | BSD-3 |
Maintainer | eddiejones2108@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Reduced Ordered Binary Decision Diagrams
Synopsis
- data Diagram l s a
- runDiagram :: (forall s. Diagram l s a) -> a
- data Prop l s
- mkProp :: (Eq l, Hashable l) => l -> Prop l s -> Prop l s -> Diagram l s (Prop l s)
- true :: Prop l s
- false :: Prop l s
- atom :: (Hashable l, Eq l) => l -> Diagram l s (Prop l s)
- notAtom :: (Hashable l, Eq l) => l -> Diagram l s (Prop l s)
- mapAtom :: (Eq l, Hashable l) => (l -> l) -> Prop l s -> Diagram l s (Prop l s)
- bindAtom :: (Ord l, Hashable l) => Prop l s -> (l -> Diagram l s (Prop l s)) -> Diagram l s (Prop l s)
- and :: (Ord l, Hashable l) => Prop l s -> Prop l s -> Diagram l s (Prop l s)
- or :: (Ord l, Hashable l) => Prop l s -> Prop l s -> Diagram l s (Prop l s)
- not :: (Ord l, Hashable l) => Prop l s -> Diagram l s (Prop l s)
- restrict :: (Hashable l, Ord l) => l -> Bool -> Prop l s -> Diagram l s (Prop l s)
- fold :: (Hashable l, Eq l) => (l -> b -> b -> Diagram l s b) -> (Bool -> Diagram l s b) -> Prop l s -> Diagram l s b
- anySat :: (Hashable l, Eq l) => Prop l s -> Diagram l s Bool
Diagram
A binary decision diagram
runDiagram :: (forall s. Diagram l s a) -> a Source #
Extract non-diagrammatic information
Propositions
A diagramatic proposition build on atomic propositions of type l
mkProp :: (Eq l, Hashable l) => l -> Prop l s -> Prop l s -> Diagram l s (Prop l s) Source #
Make a proposition (if not already present) from it's lo and hi cases
atom :: (Hashable l, Eq l) => l -> Diagram l s (Prop l s) Source #
Construct a diagramatic proposition from an atom
notAtom :: (Hashable l, Eq l) => l -> Diagram l s (Prop l s) Source #
Construct a diagramatic proposition from an atom
mapAtom :: (Eq l, Hashable l) => (l -> l) -> Prop l s -> Diagram l s (Prop l s) Source #
Map atoms in proposition
bindAtom :: (Ord l, Hashable l) => Prop l s -> (l -> Diagram l s (Prop l s)) -> Diagram l s (Prop l s) Source #
Replace an atom with a non-terminal in a Prop
sub-diagram
Combinations
and :: (Ord l, Hashable l) => Prop l s -> Prop l s -> Diagram l s (Prop l s) Source #
Lift boolean and to diagramatic proposition
or :: (Ord l, Hashable l) => Prop l s -> Prop l s -> Diagram l s (Prop l s) Source #
Lift boolean or to diagramatic proposition
not :: (Ord l, Hashable l) => Prop l s -> Diagram l s (Prop l s) Source #
Lift boolean not to diagramatic proposition
restrict :: (Hashable l, Ord l) => l -> Bool -> Prop l s -> Diagram l s (Prop l s) Source #
Assign an atomic proposition a boolean value