Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Data Structures | Typedefs | Functions | Variables
automaton::transform Namespace Reference

Data Structures

class  AutomataConcatenation
 
class  AutomataConcatenationEpsilonTransition
 
class  AutomataIntersectionCartesianProduct
 
class  AutomataLeftQuotientCartesianProduct
 
class  AutomataUnion
 
class  AutomataUnionCartesianProduct
 
class  AutomataUnionEpsilonTransition
 
class  AutomataUnionMultipleInitialStates
 
class  AutomatonComplement
 
class  AutomatonIteration
 
class  AutomatonIterationEpsilonTransition
 
class  Compaction
 
class  PDAToRHPDA
 
class  Reverse
 
class  RHPDAToPDA
 

Typedefs

template<class T >
using StateType = typename T::StateType
 

Functions

automaton::NFA< typename AutomatonType::SymbolType, ext::pair< typename AutomatonType::StateType, unsigned > > res ({ first.getInitialState(), FIRST })
 
 for (const auto &q :first.getStates()) res.addState(
 
 for (const auto &q :second.getStates()) res.addState( { t.second, SECOND } )
 
res addInputSymbols (first.getInputAlphabet())
 
res addInputSymbols (second.getInputAlphabet())
 
 for (const auto &t :first.getTransitions())
 
 for (const auto &t :second.getTransitions()) res.addTransition(
 
 if (first.getFinalStates().contains(first.getInitialState()))
 
res addState (newInitialState)
 
 for (const auto &t :automaton.getTransitionsFromState(automaton.getInitialState()))
 
res addFinalState (newInitialState)
 
CompactAutomaton< T > res (automaton.getInitialState())
 
res setInputAlphabet (automaton.getInputAlphabet())
 
 while (!stack.empty())
 
template<class T >
void constructTransitions (const ext::tuple< DefaultStateType, DefaultSymbolType, ext::vector< DefaultSymbolType > > &stFirst, const ext::map< DefaultStateType, ext::set< ext::tuple< ext::vector< DefaultSymbolType >, DefaultStateType, ext::vector< DefaultSymbolType > > > > &epsilonTransitions, const DefaultStateType &toState, ext::vector< DefaultSymbolType > pops, ext::vector< DefaultSymbolType > pushes, T &res)
 

Variables

t first second
 
return res
 
template<class Automaton >
Automaton::StateType newInitialState = common::createUnique(automaton.getInitialState(), automaton.getStates())
 
for(const auto &qf :res.getFinalStates()) for(const auto &t res setInitialState (newInitialState)
 
ext::set< ext::tuple< StateType, StateType, SymbolType > > visited
 
std::stack< ext::tuple< StateType, StateType, SymbolType > > stack
 
for(const auto &transition:automaton.getTransitionsFromState(automaton.getInitialState())) stack.push(ext if (automaton.getFinalStates().count(automaton.getInitialState())) res.addFinalState(automaton.getInitialState())
 

Typedef Documentation

◆ StateType

template<class T >
using automaton::transform::StateType = typedef typename T::StateType
Initial value:
{
using SymbolType = typename T::SymbolType
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176

Function Documentation

◆ addFinalState()

res automaton::transform::addFinalState ( newInitialState  )

◆ addInputSymbols() [1/2]

res automaton::transform::addInputSymbols ( first.  getInputAlphabet())

◆ addInputSymbols() [2/2]

res automaton::transform::addInputSymbols ( second.  getInputAlphabet())

◆ addState()

res automaton::transform::addState ( newInitialState  )

◆ constructTransitions()

template<class T >
void automaton::transform::constructTransitions ( const ext::tuple< DefaultStateType, DefaultSymbolType, ext::vector< DefaultSymbolType > > &  stFirst,
const ext::map< DefaultStateType, ext::set< ext::tuple< ext::vector< DefaultSymbolType >, DefaultStateType, ext::vector< DefaultSymbolType > > > > &  epsilonTransitions,
const DefaultStateType toState,
ext::vector< DefaultSymbolType pops,
ext::vector< DefaultSymbolType pushes,
T &  res 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ for() [1/5]

automaton::transform::for ( const auto &q :first.  getStates())

◆ for() [2/5]

t first automaton::transform::for ( const auto &q :second.  getStates()) { t.second, SECOND } )

◆ for() [3/5]

automaton::transform::for ( const auto &t :automaton.  getTransitionsFromStateautomaton.getInitialState())

◆ for() [4/5]

automaton::transform::for ( const auto &t :first.  getTransitions())

◆ for() [5/5]

automaton::transform::for ( const auto &t :second.  getTransitions())

◆ if()

automaton::transform::if ( first.  getFinalStates).contains(first.getInitialState())

◆ res() [1/2]

CompactAutomaton< T > automaton::transform::res ( automaton.  getInitialState())

◆ res() [2/2]

automaton::NFA< typename AutomatonType::SymbolType, ext::pair< typename AutomatonType::StateType, unsigned > > automaton::transform::res ( { first.getInitialState(), FIRST }  )

◆ setInputAlphabet()

res automaton::transform::setInputAlphabet ( automaton.  getInputAlphabet())

◆ while()

automaton::transform::while ( !stack.  empty())
Here is the call graph for this function:

Variable Documentation

◆ if

for(const auto &transition:automaton.getTransitionsFromState(automaton.getInitialState())) stack.push(ext automaton::transform::if(automaton.getFinalStates().count(automaton.getInitialState())) res.addFinalState(automaton.getInitialState()) ( automaton.  getFinalStates).count(automaton.getInitialState())

◆ newInitialState

template<class Automaton >
Automaton::StateType automaton::transform::newInitialState = common::createUnique(automaton.getInitialState(), automaton.getStates())

◆ res

return automaton::transform::res

◆ second

t first automaton::transform::second

◆ setInitialState

for(const auto &qf :res.getFinalStates()) for(const auto &t res automaton::transform::setInitialState(newInitialState) ( newInitialState  )

◆ stack

std::stack<ext::tuple<StateType, StateType, SymbolType> > automaton::transform::stack

◆ visited

ext::set< ext::tuple < StateType, StateType, SymbolType > > automaton::transform::visited