- data NFA st ab = NFA {
- startSt :: st
- isFinalSt :: Maybe (st -> Bool)
- finalStList :: [st]
- transitions :: Map st (Map st [Maybe ab])
- states :: [[st]]
- finalSt :: NFA st ab -> [st]
- addTrans :: (Ord ab, Ord st) => NFA st ab -> st -> Maybe ab -> st -> NFA st ab
- lookupTrans :: (Ord ab, Ord st) => NFA st ab -> st -> Maybe ab -> [st]
- automatonPaths :: (Ord st, Ord ab) => NFA st ab -> [[ab]]
- automatonPathSets :: (Ord st, Ord ab) => NFA st ab -> [[[ab]]]
- numStates :: NFA st ab -> Int
- numTransitions :: NFA st ab -> Int
Documentation
Note: there are two ways to define the final states.
1. you may define them as a list of states in finalStList
2. you may define them via the isFinalSt function
The state list is ignored if you define isFinalSt
automatonPaths :: (Ord st, Ord ab) => NFA st ab -> [[ab]]Source
automatonPathSets :: (Ord st, Ord ab) => NFA st ab -> [[[ab]]]Source
Not quite the set of all paths, but the sets of all transitions
numTransitions :: NFA st ab -> IntSource