|
Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
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()) |
| using automaton::transform::StateType = typedef typename T::StateType |
| res automaton::transform::addFinalState | ( | newInitialState | ) |
| res automaton::transform::addInputSymbols | ( | first. | getInputAlphabet() | ) |
| res automaton::transform::addInputSymbols | ( | second. | getInputAlphabet() | ) |
| res automaton::transform::addState | ( | newInitialState | ) |
| 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 | ||
| ) |
| automaton::transform::for | ( | const auto &q :first. | getStates() | ) |
| t first automaton::transform::for | ( | const auto &q :second. | getStates() | ) | { t.second, SECOND } ) |
| automaton::transform::for | ( | const auto &t :automaton. | getTransitionsFromStateautomaton.getInitialState() | ) |
| automaton::transform::for | ( | const auto &t :first. | getTransitions() | ) |
| automaton::transform::for | ( | const auto &t :second. | getTransitions() | ) |
| automaton::transform::if | ( | first. | getFinalStates).contains(first.getInitialState() | ) |
| CompactAutomaton< T > automaton::transform::res | ( | automaton. | getInitialState() | ) |
| automaton::NFA< typename AutomatonType::SymbolType, ext::pair< typename AutomatonType::StateType, unsigned > > automaton::transform::res | ( | { first.getInitialState(), FIRST } | ) |
| res automaton::transform::setInputAlphabet | ( | automaton. | getInputAlphabet() | ) |
| automaton::transform::while | ( | !stack. | empty() | ) |
| 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() | ) |
| Automaton::StateType automaton::transform::newInitialState = common::createUnique(automaton.getInitialState(), automaton.getStates()) |
| return automaton::transform::res |
| t first automaton::transform::second |
| for(const auto &qf :res.getFinalStates()) for(const auto &t res automaton::transform::setInitialState(newInitialState) | ( | newInitialState | ) |
| std::stack<ext::tuple<StateType, StateType, SymbolType> > automaton::transform::stack |
| ext::set< ext::tuple < StateType, StateType, SymbolType > > automaton::transform::visited |