Safe Haskell | Safe |
---|---|
Language | Haskell98 |
This module defines data types, type classes and instances for NFA
- class Nfa s a | s -> a where
- buildNFA :: (Nfa s a, Eq s, Eq a) => s -> NFA s a
- data NFA s a = NFA {
- all_states :: [s]
- delta_states :: [(s, a, s)]
- init_states :: [s]
- final_states :: [s]
- data SNFA s a = SNFA {
- mapping_states :: s -> Int
- sall_states :: [Int]
- sdelta_states :: [(Int, a, Int)]
- sinit_states :: [Int]
- sfinal_states :: [Int]
- toSNFA :: (Eq s, Eq a) => NFA s a -> SNFA s a
- nofAllStates :: NFA a t -> Int
- nofDelta :: NFA t1 t -> Int
- nofInitStates :: NFA a t -> Int
- nofFinalStates :: NFA a t -> Int
Documentation
the NFA data type
NFA | |
|
the optimized NFA using Int to represent states, IntMap to represent delta
SNFA | |
|
toSNFA :: (Eq s, Eq a) => NFA s a -> SNFA s a Source #
The function toSNFA
converts from an NFA to an SNFA
nofAllStates :: NFA a t -> Int Source #
nofInitStates :: NFA a t -> Int Source #
nofFinalStates :: NFA a t -> Int Source #