Portability | unportable |
---|---|
Stability | unstable |
Maintainer | Martin Avanzini <martin.avanzini@uibk.ac.at>, Andreas Schnabl <andreas.schnabl@uibk.ac.at> |
Safe Haskell | Safe-Infered |
This module implements automata functionality as employed by the bounds processor.
- data Enrichment
- data WeakBoundedness
- type Label = Int
- type LSym = (Symbol, Label)
- type State = Int
- data LTerm
- data Rule
- ppRule :: (Symbol -> Doc) -> Rule -> Doc
- type FwdAutomaton = IntMap (IntMap (Map [State] (Set State)))
- type BwdAutomaton = IntMap (IntMap (IntMap (Set [State])))
- data Automaton = Automaton {
- fwd :: FwdAutomaton
- bwd :: BwdAutomaton
- fresh :: State
- maxlabel :: Label
- size :: LTerm -> Int
- isEpsilonRule :: Rule -> Bool
- lift :: Symbol -> Label -> LSym
- base :: LSym -> Symbol
- height :: LSym -> Label
- baseTerm :: LTerm -> Term
- toRules :: Automaton -> [Rule]
- fromRules :: [Rule] -> Automaton
- empty :: Automaton
- freshState :: Automaton -> (State, Automaton)
- freshStates :: Int -> Automaton -> ([State], Automaton)
- fwdInsert :: LSym -> [State] -> State -> FwdAutomaton -> FwdAutomaton
- bwdInsert :: LSym -> [State] -> State -> BwdAutomaton -> BwdAutomaton
- insert :: Rule -> Automaton -> Automaton
- mkFreshState :: MonadState Automaton m => m State
- mkInsertRule :: MonadState Automaton m => Rule -> m ()
- step :: Automaton -> LSym -> [State] -> Set State
- bstep :: Automaton -> LSym -> State -> Set [State]
- bstepUL :: Automaton -> Symbol -> State -> [(Label, Set [State])]
- rulesDefiningUL :: Automaton -> Symbol -> [(Label, [State], Set State)]
- rulesDefining :: Automaton -> LSym -> [([State], Set State)]
- symbols :: Automaton -> Set LSym
Documentation
data Enrichment
This datatype represents the enrichment employed.
data Rule
data Automaton
Automaton | |
|
isEpsilonRule :: Rule -> Bool
freshState :: Automaton -> (State, Automaton)
freshStates :: Int -> Automaton -> ([State], Automaton)
fwdInsert :: LSym -> [State] -> State -> FwdAutomaton -> FwdAutomaton
bwdInsert :: LSym -> [State] -> State -> BwdAutomaton -> BwdAutomaton
mkFreshState :: MonadState Automaton m => m State
mkInsertRule :: MonadState Automaton m => Rule -> m ()