Skip to content
Snippets Groups Projects
Commit a3a4776d authored by Jan Trávníček's avatar Jan Trávníček
Browse files

document automaton accept algorithm

parent fa312646
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -33,27 +33,154 @@ namespace run {
class Accept {
public:
/**
* Performs conversion.
* @return left regular grammar equivalent to source automaton.
* Automaton run implementation resulting in boolean true if the automaton accepted the input.
*
* \tparam SymbolType type of symbols of the string and terminal symbols of the runned automaton
* \tparam StateType type of states of the runned automaton
*
* \param automaton the runned automaton
* \param string the input of the automaton
*
* \return true if the automaton accepts given string
*/
template < class SymbolType, class StateType >
static bool accept ( const automaton::DFA < SymbolType, StateType > & automaton, const string::LinearString < SymbolType > & string );
/**
* \override
*
* \tparam SymbolType type of symbols of the string and terminal symbols of the runned automaton
* \tparam StateType type of states of the runned automaton
*
* \param automaton the runned automaton
* \param string the input of the automaton
*
* \return true if the automaton accepts given string
*/
template < class SymbolType, class StateType >
static bool accept ( const automaton::NFA < SymbolType, StateType > & automaton, const string::LinearString < SymbolType > & string );
/**
* \override
*
* \tparam SymbolType type of symbols of the string and terminal symbols of the runned automaton
* \tparam EpsilonType type of epsilon in the runned automaton
* \tparam StateType type of states of the runned automaton
*
* \param automaton the runned automaton
* \param string the input of the automaton
*
* \return true if the automaton accepts given string
*/
template < class SymbolType, class EpsilonType, class StateType >
static bool accept ( const automaton::EpsilonNFA < SymbolType, EpsilonType, StateType > & automaton, const string::LinearString < SymbolType > & string );
/**
* \override
*
* \tparam SymbolType type of symbols of nodes and terminal symbols of the runned automaton
* \tparam RankType type of ranks of nodes and terminal symbols of the runned automaton
* \tparam StateType type of states of the runned automaton
*
* \param automaton the runned automaton
* \param string the input of the automaton
*
* \return true if the automaton accepts given string
*/
template < class SymbolType, class RankType, class StateType >
static bool accept ( const automaton::DFTA < SymbolType, RankType, StateType > & automaton, const tree::RankedTree < SymbolType, RankType > & tree );
/**
* \override
*
* \tparam SymbolType type of symbols of nodes and terminal symbols of the runned automaton
* \tparam RankType type of ranks of nodes and terminal symbols of the runned automaton
* \tparam StateType type of states of the runned automaton
*
* \param automaton the runned automaton
* \param string the input of the automaton
*
* \return true if the automaton accepts given string
*/
template < class SymbolType, class RankType, class StateType >
static bool accept ( const automaton::NFTA < SymbolType, RankType, StateType > & automaton, const tree::RankedTree < SymbolType, RankType > & tree );
/**
* \override
*
* \tparam InputSymbolType type of symbols of the string and terminal symbols of the runned automaton
* \tparam PushdownStoreSymbolType type of pushdown store symbols of the runned automaton
* \tparam StateType type of states of the runned automaton
*
* \param automaton the runned automaton
* \param string the input of the automaton
*
* \return true if the automaton accepts given string
*/
template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
static bool accept ( const automaton::InputDrivenDPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & automaton, const string::LinearString < InputSymbolType > & string );
/**
* \override
*
* \tparam InputSymbolType type of symbols of the string and terminal symbols of the runned automaton
* \tparam PushdownStoreSymbolType type of pushdown store symbols of the runned automaton
* \tparam StateType type of states of the runned automaton
*
* \param automaton the runned automaton
* \param string the input of the automaton
*
* \return true if the automaton accepts given string
*/
template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
static bool accept ( const automaton::VisiblyPushdownDPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & automaton, const string::LinearString < InputSymbolType > & string );
/**
* \override
*
* \tparam InputSymbolType type of symbols of the string and terminal symbols of the runned automaton
* \tparam EpsilonType type of epsilon in the runned automaton
* \tparam PushdownStoreSymbolType type of pushdown store symbols of the runned automaton
* \tparam StateType type of states of the runned automaton
*
* \param automaton the runned automaton
* \param string the input of the automaton
*
* \return true if the automaton accepts given string
*/
template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
static bool accept ( const automaton::RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & automaton, const string::LinearString < InputSymbolType > & string );
/**
* \override
*
* \tparam InputSymbolType type of symbols of the string and terminal symbols of the runned automaton
* \tparam EpsilonType type of epsilon in the runned automaton
* \tparam PushdownStoreSymbolType type of pushdown store symbols of the runned automaton
* \tparam StateType type of states of the runned automaton
*
* \param automaton the runned automaton
* \param string the input of the automaton
*
* \return true if the automaton accepts given string
*/
template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
static bool accept ( const automaton::DPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & automaton, const string::LinearString < InputSymbolType > & string );
/**
* \override
*
* \tparam InputSymbolType type of input symbols of the string and terminal symbols of the runned automaton
* \tparam OutputSymbolType type of output symbols of the runned automaton
* \tparam EpsilonType type of epsilon in the runned automaton
* \tparam PushdownStoreSymbolType type of pushdown store symbols of the runned automaton
* \tparam StateType type of states of the runned automaton
*
* \param automaton the runned automaton
* \param string the input of the automaton
*
* \return true if the automaton accepts given string
*/
template < class InputSymbolType, class OutputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
static bool accept ( const automaton::NPDTA < InputSymbolType, OutputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & automaton, const string::LinearString < InputSymbolType > & string );
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment