Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Types | Public Member Functions | Friends
automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT > Class Template Referencefinal

#include <NPDTA.h>

Inheritance diagram for automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >:
[legend]
Collaboration diagram for automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >:
[legend]

Public Types

typedef InputSymbolTypeT InputSymbolType
 
typedef OutputSymbolTypeT OutputSymbolType
 
typedef PushdownStoreSymbolTypeT PushdownStoreSymbolType
 
typedef StateTypeT StateType
 

Public Member Functions

 NPDTA (ext::set< StateType > states, ext::set< InputSymbolType > inputAlphabet, ext::set< OutputSymbolType > outputAlphabet, ext::set< PushdownStoreSymbolType > pushdownStoreAlphabet, StateType initialState, PushdownStoreSymbolType initialSymbol, ext::set< StateType > finalStates)
 Creates a new instance of the automaton with a concrete set of states, input alphabet, pushdown store alphabet, initial state, initial pushdown symbol and a set of final states. More...
 
 NPDTA (StateType initialState, PushdownStoreSymbolType initialPushdownSymbol)
 Creates a new instance of the automaton with a concrete initial state and initial pushdown store symbol. More...
 
const StateTypegetInitialState () const &
 
StateType && getInitialState () &&
 
bool setInitialState (StateType state)
 
const ext::set< StateType > & getStates () const &
 
ext::set< StateType > && getStates () &&
 
bool addState (StateType state)
 
void setStates (ext::set< StateType > states)
 
void removeState (const StateType &state)
 
const ext::set< StateType > & getFinalStates () const &
 
ext::set< StateType > && getFinalStates () &&
 
bool addFinalState (StateType state)
 
void setFinalStates (ext::set< StateType > states)
 
void removeFinalState (const StateType &state)
 
const ext::set< PushdownStoreSymbolType > & getPushdownStoreAlphabet () const &
 
ext::set< PushdownStoreSymbolType > && getPushdownStoreAlphabet () &&
 
bool addPushdownStoreSymbol (PushdownStoreSymbolType symbol)
 
void addPushdownStoreSymbols (ext::set< PushdownStoreSymbolType > symbols)
 
void setPushdownStoreAlphabet (ext::set< PushdownStoreSymbolType > symbols)
 
void removePushdownStoreSymbol (const PushdownStoreSymbolType &symbol)
 
const PushdownStoreSymbolTypegetInitialSymbol () const &
 
PushdownStoreSymbolType && getInitialSymbol () &&
 
bool setInitialSymbol (PushdownStoreSymbolType symbol)
 
const ext::set< InputSymbolType > & getInputAlphabet () const &
 
ext::set< InputSymbolType > && getInputAlphabet () &&
 
bool addInputSymbol (InputSymbolType symbol)
 
void addInputSymbols (ext::set< InputSymbolType > symbols)
 
void setInputAlphabet (ext::set< InputSymbolType > symbols)
 
void removeInputSymbol (const InputSymbolType &symbol)
 
const ext::set< OutputSymbolType > & getOutputAlphabet () const &
 
ext::set< OutputSymbolType > && getOutputAlphabet () &&
 
bool addOutputSymbol (OutputSymbolType symbol)
 
void addOutputSymbols (ext::set< OutputSymbolType > symbols)
 
void setOutputAlphabet (ext::set< OutputSymbolType > symbols)
 
void removeOutputSymbol (const OutputSymbolType &symbol)
 
bool addTransition (StateType from, common::symbol_or_epsilon< InputSymbolType > input, ext::vector< PushdownStoreSymbolType > pop, StateType to, ext::vector< PushdownStoreSymbolType > push, ext::vector< OutputSymbolType > output)
 Adds a transition to the automaton. More...
 
bool addTransition (StateType from, InputSymbolType input, ext::vector< PushdownStoreSymbolType > pop, StateType to, ext::vector< PushdownStoreSymbolType > push, ext::vector< OutputSymbolType > output)
 Adds a transition to the automaton. More...
 
bool addTransition (StateType from, ext::vector< PushdownStoreSymbolType > pop, StateType to, ext::vector< PushdownStoreSymbolType > push, ext::vector< OutputSymbolType > output)
 Adds a transition to the automaton. More...
 
bool removeTransition (const StateType &from, const common::symbol_or_epsilon< InputSymbolType > &input, const ext::vector< PushdownStoreSymbolType > &pop, const StateType &to, const ext::vector< PushdownStoreSymbolType > &push, const ext::vector< OutputSymbolType > &output)
 Removes a transition from the automaton. More...
 
bool removeTransition (const StateType &from, const InputSymbolType &input, const ext::vector< PushdownStoreSymbolType > &pop, const StateType &to, const ext::vector< PushdownStoreSymbolType > &push, const ext::vector< OutputSymbolType > &output)
 Removes a transition from the automaton. More...
 
bool removeTransition (const StateType &from, const ext::vector< PushdownStoreSymbolType > &pop, const StateType &to, const ext::vector< PushdownStoreSymbolType > &push, const ext::vector< OutputSymbolType > &output)
 Removes a transition from the automaton. More...
 
const ext::multimap< ext::tuple< StateType, common::symbol_or_epsilon< InputSymbolType >, ext::vector< PushdownStoreSymbolType > >, ext::tuple< StateType, ext::vector< PushdownStoreSymbolType >, ext::vector< OutputSymbolType > > > & getTransitions () const &
 
ext::multimap< ext::tuple< StateType, common::symbol_or_epsilon< InputSymbolType >, ext::vector< PushdownStoreSymbolType > >, ext::tuple< StateType, ext::vector< PushdownStoreSymbolType >, ext::vector< OutputSymbolType > > > && getTransitions () &&
 
ext::multimap< ext::tuple< StateType, common::symbol_or_epsilon< InputSymbolType >, ext::vector< PushdownStoreSymbolType > >, ext::tuple< StateType, ext::vector< PushdownStoreSymbolType >, ext::vector< OutputSymbolType > > > getTransitionsFromState (const StateType &from) const
 
auto operator<=> (const NPDTA &other) const
 
bool operator== (const NPDTA &other) const
 
- Public Member Functions inherited from core::Components< NPDTA< DefaultSymbolType, DefaultSymbolType, DefaultSymbolType, DefaultStateType >, ext::set< DefaultSymbolType >, component::Set, InputAlphabet, ext::set< DefaultSymbolType >, component::Set, OutputAlphabet, ext::set< DefaultSymbolType >, component::Set, PushdownStoreAlphabet, DefaultSymbolType, component::Value, InitialSymbol, ext::set< DefaultStateType >, component::Set, std::tuple< States, FinalStates >, DefaultStateType, component::Value, InitialState >
void accessComponent ()
 

Friends

ext::ostreamoperator<< (ext::ostream &out, const NPDTA &instance)
 

Additional Inherited Members

- Static Public Member Functions inherited from core::Components< NPDTA< DefaultSymbolType, DefaultSymbolType, DefaultSymbolType, DefaultStateType >, ext::set< DefaultSymbolType >, component::Set, InputAlphabet, ext::set< DefaultSymbolType >, component::Set, OutputAlphabet, ext::set< DefaultSymbolType >, component::Set, PushdownStoreAlphabet, DefaultSymbolType, component::Value, InitialSymbol, ext::set< DefaultStateType >, component::Set, std::tuple< States, FinalStates >, DefaultStateType, component::Value, InitialState >
static void registerComponent ()
 
static void unregisterComponent ()
 

Detailed Description

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
class automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >

Nondeterministic Pushdown Translation Automaton. Translates context free languages.

Definition A = (Q, T, D, G, I, Z, \delta, F), Q (States) = nonempty finite set of states, T (TerminalAlphabet) = finite set of terminal symbols - having this empty won't let automaton do much though, T (OutputAlphabet) = finite set of output symbols - having this empty won't let automaton do translation at all, G (PushdownStoreAlphabet) = finite set of pushdown store symbol - having this empty makes the automaton equivalent to DFA I (InitialState) = initial state, Z (InitialPushdownStoreSymbol) = initial pushdown store symbol \delta = transition function of the form A \times a \times \alpha -> B \times \beta \times \gamma, where A, B \in Q, a \in T \cup { \eps }, \alpha, \beta \in G*, and \gamma \in D*, F (FinalStates) = set of final states

Template Parameters
InputSymbolTypeTused for the terminal alphabet
OutputSymbolTypeTused for the output alphabet
PushdownSymbolTypeTused for the pushdown store alphabet
StateTypeTused to the states, and the initial state of the automaton.

Member Typedef Documentation

◆ InputSymbolType

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
typedef InputSymbolTypeT automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::InputSymbolType

◆ OutputSymbolType

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
typedef OutputSymbolTypeT automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::OutputSymbolType

◆ PushdownStoreSymbolType

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
typedef PushdownStoreSymbolTypeT automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::PushdownStoreSymbolType

◆ StateType

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
typedef StateTypeT automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::StateType

Constructor & Destructor Documentation

◆ NPDTA() [1/2]

template<class InputSymbolType , class OutputSymbolType , class PushdownStoreSymbolType , class StateType >
automaton::NPDTA< InputSymbolType, OutputSymbolType, PushdownStoreSymbolType, StateType >::NPDTA ( ext::set< StateType states,
ext::set< InputSymbolType inputAlphabet,
ext::set< OutputSymbolType outputAlphabet,
ext::set< PushdownStoreSymbolType pushdownStoreAlphabet,
StateType  initialState,
PushdownStoreSymbolType  initialSymbol,
ext::set< StateType finalStates 
)
explicit

Creates a new instance of the automaton with a concrete set of states, input alphabet, pushdown store alphabet, initial state, initial pushdown symbol and a set of final states.

Parameters
statesthe initial set of states of the automaton
inputAlphabetthe initial input alphabet
outputAlphabetthe initial output alphabet
pushdownStoreAlphabetthe initial set of symbols used in the pushdown store by the automaton
initialStatethe initial state of the automaton
initialPushdownSymbolthe initial pushdown symbol of the automaton
finalStatesthe initial set of final states of the automaton

◆ NPDTA() [2/2]

Creates a new instance of the automaton with a concrete initial state and initial pushdown store symbol.

Parameters
initialStatethe initial state of the automaton
initialPushdownSymbolthe initial pushdown symbol of the automaton

Member Function Documentation

◆ addFinalState()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
bool automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::addFinalState ( StateType  state)
inline

Adder of a final state.

Parameters
statethe new state to be added to a set of final states
Returns
true if the state was indeed added

◆ addInputSymbol()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
bool automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::addInputSymbol ( InputSymbolType  symbol)
inline

Adder of a input symbol.

Parameters
symbolthe new symbol to be added to an input alphabet
Returns
true if the symbol was indeed added

◆ addInputSymbols()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::addInputSymbols ( ext::set< InputSymbolType symbols)
inline

Adder to an input symbols.

Parameters
symbolsnew symbols to be added to an input alphabet

◆ addOutputSymbol()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
bool automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::addOutputSymbol ( OutputSymbolType  symbol)
inline

Adder to an output symbol.

Parameters
symbolthe new symbol to be added to an output alphabet
Returns
true if the symbol was indeed added

◆ addOutputSymbols()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::addOutputSymbols ( ext::set< OutputSymbolType symbols)
inline

Adder to an output symbols.

Parameters
symbolsnew symbols to be added to an output alphabet

◆ addPushdownStoreSymbol()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
bool automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::addPushdownStoreSymbol ( PushdownStoreSymbolType  symbol)
inline

Adder of a pushdown store symbol.

Parameters
symbolthe new symbol to be added to a pushdown store alphabet
Returns
true if the symbol was indeed added

◆ addPushdownStoreSymbols()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::addPushdownStoreSymbols ( ext::set< PushdownStoreSymbolType symbols)
inline

Adder of pushdown store symbols.

Parameters
symbolsnew symbols to be added to a pushdown store alphabet

◆ addState()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
bool automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::addState ( StateType  state)
inline

Adder of a state.

Parameters
statethe new state to be added to a set of states
Returns
true if the state was indeed added

◆ addTransition() [1/3]

Adds a transition to the automaton.

The transition is in a form A \times a \times \alpha -> B \times \beta \times \gamma, where A, B \in Q, a \in T \cup { \eps }, \alpha, \beta \in G*, and \gamma in D*

Parameters
fromthe source state (A)
inputthe input symbol or epsilon (a)
popsymbols to be poped from pushdown store on the transition use (\alpha)
tothe target state (B)
pushsymbols to be pushed to the pushdown store on the transition use (\beta)
outputresulting symbols of the transition when used (\gamma)
Exceptions
AutomatonExceptionwhen transition contains state or symbol not present in the automaton components
Returns
true if the transition was indeed added
Here is the call graph for this function:

◆ addTransition() [2/3]

Adds a transition to the automaton.

The transition is in a form A \times \eps \times \alpha -> B \times \beta \times \gamma, where A, B \in Q, \alpha, \beta \in G*, and \gamma in D*

Parameters
fromthe source state (A)
popsymbols to be poped from pushdown store on the transition use (\alpha)
tothe target state (B)
pushsymbols to be pushed to the pushdown store on the transition use (\beta)
outputresulting symbols of the transition when used (\gamma)
Exceptions
AutomatonExceptionwhen transition contains state or symbol not present in the automaton components
Returns
true if the transition was indeed added

◆ addTransition() [3/3]

Adds a transition to the automaton.

The transition is in a form A \times a \times \alpha -> B \times \beta \times \gamma, where A, B \in Q, a \in T, \alpha, \beta \in G*, and \gamma in D*

Parameters
fromthe source state (A)
inputthe input symbol (a)
popsymbols to be poped from pushdown store on the transition use (\alpha)
tothe target state (B)
pushsymbols to be pushed to the pushdown store on the transition use (\beta)
outputresulting symbols of the transition when used (\gamma)
Exceptions
AutomatonExceptionwhen transition contains state or symbol not present in the automaton components
Returns
true if the transition was indeed added

◆ getFinalStates() [1/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
ext::set< StateType > && automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getFinalStates ( ) &&
inline

Getter of final states.

Returns
the final states of the automaton
Here is the call graph for this function:

◆ getFinalStates() [2/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
const ext::set< StateType > & automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getFinalStates ( ) const &
inline

Getter of final states.

Returns
the final states of the automaton
Here is the caller graph for this function:

◆ getInitialState() [1/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
StateType && automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getInitialState ( ) &&
inline

Getter of the initial state.

Returns
the initial state of the automaton
Here is the call graph for this function:

◆ getInitialState() [2/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
const StateType & automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getInitialState ( ) const &
inline

Getter of the initial state.

Returns
the initial state of the automaton
Here is the caller graph for this function:

◆ getInitialSymbol() [1/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
PushdownStoreSymbolType && automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getInitialSymbol ( ) &&
inline

Getter of the initial pushdown store symbol.

Returns
the initial pushdown store symbol of the automaton
Here is the call graph for this function:

◆ getInitialSymbol() [2/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
const PushdownStoreSymbolType & automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getInitialSymbol ( ) const &
inline

Getter of the initial pushdown store symbol.

Returns
the initial pushdown store symbol of the automaton
Here is the caller graph for this function:

◆ getInputAlphabet() [1/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
ext::set< InputSymbolType > && automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getInputAlphabet ( ) &&
inline

Getter of the input alphabet.

Returns
the input alphabet of the automaton
Here is the call graph for this function:

◆ getInputAlphabet() [2/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
const ext::set< InputSymbolType > & automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getInputAlphabet ( ) const &
inline

Getter of the input alphabet.

Returns
the input alphabet of the automaton
Here is the caller graph for this function:

◆ getOutputAlphabet() [1/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
ext::set< OutputSymbolType > && automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getOutputAlphabet ( ) &&
inline

Getter of the input alphabet.

Returns
the input alphabet of the automaton
Here is the call graph for this function:

◆ getOutputAlphabet() [2/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
const ext::set< OutputSymbolType > & automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getOutputAlphabet ( ) const &
inline

Getter of the input alphabet.

Returns
the input alphabet of the automaton
Here is the caller graph for this function:

◆ getPushdownStoreAlphabet() [1/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
ext::set< PushdownStoreSymbolType > && automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getPushdownStoreAlphabet ( ) &&
inline

Getter of the pushdown store alphabet.

Returns
the pushdown store alphabet of the automaton
Here is the call graph for this function:

◆ getPushdownStoreAlphabet() [2/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
const ext::set< PushdownStoreSymbolType > & automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getPushdownStoreAlphabet ( ) const &
inline

Getter of the pushdown store alphabet.

Returns
the pushdown store alphabet of the automaton
Here is the caller graph for this function:

◆ getStates() [1/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
ext::set< StateType > && automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getStates ( ) &&
inline

Getter of states.

Returns
the states of the automaton
Here is the call graph for this function:

◆ getStates() [2/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
const ext::set< StateType > & automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::getStates ( ) const &
inline

Getter of states.

Returns
the states of the automaton
Here is the caller graph for this function:

◆ getTransitions() [1/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
ext::multimap< ext::tuple< StateType, common::symbol_or_epsilon< InputSymbolType >, ext::vector< PushdownStoreSymbolType > >, ext::tuple< StateType, ext::vector< PushdownStoreSymbolType >, ext::vector< OutputSymbolType > > > && automaton::NPDTA< InputSymbolType, OutputSymbolType, PushdownStoreSymbolType, StateType >::getTransitions ( ) &&

Get the transition function of the automaton in its natural form.

Returns
transition function of the automaton

◆ getTransitions() [2/2]

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
const ext::multimap< ext::tuple< StateType, common::symbol_or_epsilon< InputSymbolType >, ext::vector< PushdownStoreSymbolType > >, ext::tuple< StateType, ext::vector< PushdownStoreSymbolType >, ext::vector< OutputSymbolType > > > & automaton::NPDTA< InputSymbolType, OutputSymbolType, PushdownStoreSymbolType, StateType >::getTransitions ( ) const &

Get the transition function of the automaton in its natural form.

Returns
transition function of the automaton

◆ getTransitionsFromState()

Get a subset of the transition function of the automaton, with the source state fixed in the transitions natural representation.

Parameters
fromfilter the transition function based on this state as a source state
Returns
a subset of the transition function of the automaton with the source state fixed
Here is the call graph for this function:

◆ operator<=>()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
auto automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::operator<=> ( const NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT > &  other) const
inline

The three way comparison implementation

Parameters
otherthe other instance
Returns
the ordering between this object and the other.
Here is the call graph for this function:

◆ operator==()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
bool automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::operator== ( const NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT > &  other) const
inline

The equality comparison implementation.

Parameters
otherthe other object to compare with.
Returns
true if this and other objects are equal, false othervise
Here is the call graph for this function:

◆ removeFinalState()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::removeFinalState ( const StateType state)
inline

Remover of a final state.

Parameters
statea state to be removed from a set of final states
Returns
true if the state was indeed removed

◆ removeInputSymbol()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::removeInputSymbol ( const InputSymbolType symbol)
inline

Remover of an input symbol.

Parameters
symbola symbol to be removed from an input alphabet
Returns
true if the symbol was indeed removed

◆ removeOutputSymbol()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::removeOutputSymbol ( const OutputSymbolType symbol)
inline

Remover of an output symbol.

Parameters
symbola symbol to be removed from an output alphabet
Returns
true if the symbol was indeed removed

◆ removePushdownStoreSymbol()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::removePushdownStoreSymbol ( const PushdownStoreSymbolType symbol)
inline

Remover of an pushdown store symbol.

Parameters
symbola symbol to be removed from a pushdown store alphabet
Returns
true if the symbol was indeed removed

◆ removeState()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::removeState ( const StateType state)
inline

Remover of a state.

Parameters
statea state to be removed from a set of states
Returns
true if the state was indeed removed

◆ removeTransition() [1/3]

template<class InputSymbolType , class OutputSymbolType , class PushdownStoreSymbolType , class StateType >
bool automaton::NPDTA< InputSymbolType, OutputSymbolType, PushdownStoreSymbolType, StateType >::removeTransition ( const StateType from,
const common::symbol_or_epsilon< InputSymbolType > &  input,
const ext::vector< PushdownStoreSymbolType > &  pop,
const StateType to,
const ext::vector< PushdownStoreSymbolType > &  push,
const ext::vector< OutputSymbolType > &  output 
)

Removes a transition from the automaton.

The transition is in a form A \times a \times \alpha -> B \times \beta \times \gamma, where A, B \in Q, a \in T \cup { \eps }, \alpha, \beta \in G*, and \gamma \in D*

Parameters
fromthe source state (A)
inputthe input symbol or epsilon (a)
popsymbols poped from pushdown store on the transition use (\alpha)
tothe target state (B)
pushsymbols pushed to the pushdown store on the transition use (\beta)
outputresulting symbols of the transition when used (\gamma)
Exceptions
AutomatonExceptionwhen removed transition left hand side was found but the right hand side did not match.
Returns
true if the transition was indeed removed
Here is the call graph for this function:

◆ removeTransition() [2/3]

template<class InputSymbolType , class OutputSymbolType , class PushdownStoreSymbolType , class StateType >
bool automaton::NPDTA< InputSymbolType, OutputSymbolType, PushdownStoreSymbolType, StateType >::removeTransition ( const StateType from,
const ext::vector< PushdownStoreSymbolType > &  pop,
const StateType to,
const ext::vector< PushdownStoreSymbolType > &  push,
const ext::vector< OutputSymbolType > &  output 
)

Removes a transition from the automaton.

The transition is in a form A \times \eps \times \alpha -> B \times \beta \times \gamma, where A, B \in Q, a \in T, \alpha, \beta \in G*, and \gamma \in D*

Parameters
fromthe source state (A)
popsymbols poped from pushdown store on the transition use (\alpha)
tothe target state (B)
pushsymbols pushed to the pushdown store on the transition use (\beta)
outputresulting symbols of the transition when used (\gamma)
Exceptions
AutomatonExceptionwhen removed transition left hand side was found but the right hand side did not match.
Returns
true if the transition was indeed removed

◆ removeTransition() [3/3]

template<class InputSymbolType , class OutputSymbolType , class PushdownStoreSymbolType , class StateType >
bool automaton::NPDTA< InputSymbolType, OutputSymbolType, PushdownStoreSymbolType, StateType >::removeTransition ( const StateType from,
const InputSymbolType input,
const ext::vector< PushdownStoreSymbolType > &  pop,
const StateType to,
const ext::vector< PushdownStoreSymbolType > &  push,
const ext::vector< OutputSymbolType > &  output 
)

Removes a transition from the automaton.

The transition is in a form A \times a \times \alpha -> B \times \beta \times \gamma, where A, B \in Q, a \in T, \alpha, \beta \in G*, and \gamma \in D*

Parameters
fromthe source state (A)
inputthe input symbol (a)
popsymbols poped from pushdown store on the transition use (\alpha)
tothe target state (B)
pushsymbols pushed to the pushdown store on the transition use (\beta)
outputresulting symbols of the transition when used (\gamma)
Exceptions
AutomatonExceptionwhen removed transition left hand side was found but the right hand side did not match.
Returns
true if the transition was indeed removed

◆ setFinalStates()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::setFinalStates ( ext::set< StateType states)
inline

Setter of final states.

Parameters
statescompletely new set of final states

◆ setInitialState()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
bool automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::setInitialState ( StateType  state)
inline

Setter of the initial state.

Parameters
statenew initial state of the automaton
Returns
true if the initial state was indeed changed

◆ setInitialSymbol()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
bool automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::setInitialSymbol ( PushdownStoreSymbolType  symbol)
inline

Setter of the initial pushdown store symbol.

Parameters
symbolnew initial pushdown store symbol of the automaton
Returns
true if the initial pushdown store symbol was indeed changed

◆ setInputAlphabet()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::setInputAlphabet ( ext::set< InputSymbolType symbols)
inline

Setter of input alphabet.

Parameters
symbolscompletely new input alphabet

◆ setOutputAlphabet()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::setOutputAlphabet ( ext::set< OutputSymbolType symbols)
inline

Setter of an output alphabet.

Parameters
symbolscompletely new output alphabet

◆ setPushdownStoreAlphabet()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::setPushdownStoreAlphabet ( ext::set< PushdownStoreSymbolType symbols)
inline

Setter of a pushdown store alphabet.

Parameters
symbolscompletely new pushdown store alphabet

◆ setStates()

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
void automaton::NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >::setStates ( ext::set< StateType states)
inline

Setter of states.

Parameters
statescompletely new set of states

Friends And Related Function Documentation

◆ operator<<

template<class InputSymbolTypeT = DefaultSymbolType, class OutputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType>
ext::ostream & operator<< ( ext::ostream out,
const NPDTA< InputSymbolTypeT, OutputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT > &  instance 
)
friend

Print this object as raw representation to ostream.

Parameters
outostream where to print
instanceobject to print
Returns
modified output stream

The documentation for this class was generated from the following file: