module FST.AutomatonTypes (
StateTy, FirstState, LastState, InitialStates, FinalStates,
Transitions, TransitionTable,
Sigma,
AutomatonFunctions (..)
) where
type StateTy = Int
type FirstState = Int
type LastState = Int
type InitialStates = [StateTy]
type FinalStates = [StateTy]
type Transitions a = [(a, StateTy)]
type TransitionTable a = [(StateTy, Transitions a)]
type Sigma a = [a]
class AutomatonFunctions f where
states :: f a -> [StateTy]
isFinal :: f a -> StateTy -> Bool
finals :: f a -> FinalStates
initials :: f a -> InitialStates
transitionList :: f a -> StateTy -> Transitions a
transitionTable :: f a -> TransitionTable a
transitions :: Eq a => f a -> (StateTy, a) -> [StateTy]
firstState :: Eq a => f a -> StateTy
lastState :: Eq a => f a -> StateTy
alphabet :: f a -> Sigma a