diff --git a/alib2algo/src/automaton/run/Accept.cpp b/alib2algo/src/automaton/run/Accept.cpp
index 725e85f854ddb4f39d7904cc6dda42e655479a04..3f1e2735407068d7f0c8898aa17dc5c62c454560 100644
--- a/alib2algo/src/automaton/run/Accept.cpp
+++ b/alib2algo/src/automaton/run/Accept.cpp
@@ -12,16 +12,75 @@ namespace automaton {
 
 namespace run {
 
-auto AcceptDFALinearString = registration::AbstractRegister < Accept, bool, const automaton::DFA < > &, const string::LinearString < > & > ( Accept::accept );
-auto AcceptNFALinearString = registration::AbstractRegister < Accept, bool, const automaton::NFA < > &, const string::LinearString < > & > ( Accept::accept );
-auto AcceptEpsilonNFALinearString = registration::AbstractRegister < Accept, bool, const automaton::EpsilonNFA < > &, const string::LinearString < > & > ( Accept::accept );
-auto AcceptDFTARankedTree = registration::AbstractRegister < Accept, bool, const automaton::DFTA < > &, const tree::RankedTree < > & > ( Accept::accept );
-auto AcceptNFTARankedTree = registration::AbstractRegister < Accept, bool, const automaton::NFTA < > &, const tree::RankedTree < > & > ( Accept::accept );
-auto AcceptInputDrivenDPDALinearString = registration::AbstractRegister < Accept, bool, const automaton::InputDrivenDPDA < > &, const string::LinearString < > & > ( Accept::accept );
-auto AcceptVisiblyPushdownDPDALinearString = registration::AbstractRegister < Accept, bool, const automaton::VisiblyPushdownDPDA < > &, const string::LinearString < > & > ( Accept::accept );
-auto AcceptRealTimeHeightDeterministicDPDALinearString = registration::AbstractRegister < Accept, bool, const automaton::RealTimeHeightDeterministicDPDA < > &, const string::LinearString < > & > ( Accept::accept );
-auto AcceptDPDALinearString = registration::AbstractRegister < Accept, bool, const automaton::DPDA < > &, const string::LinearString < > & > ( Accept::accept );
-auto AcceptNPDTALinearString = registration::AbstractRegister < Accept, bool, const automaton::NPDTA < > &, const string::LinearString < > & > ( Accept::accept );
+auto AcceptDFALinearString = registration::AbstractRegister < Accept, bool, const automaton::DFA < > &, const string::LinearString < > & > ( Accept::accept, "automaton", "string" ).setDocumentation (
+"Automaton run implementation resulting in boolean true if the automaton accepted the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return true if the automaton accepts given string" );
+
+auto AcceptNFALinearString = registration::AbstractRegister < Accept, bool, const automaton::NFA < > &, const string::LinearString < > & > ( Accept::accept, "automaton", "string" ).setDocumentation (
+"Automaton run implementation resulting in boolean true if the automaton accepted the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return true if the automaton accepts given string" );
+
+auto AcceptEpsilonNFALinearString = registration::AbstractRegister < Accept, bool, const automaton::EpsilonNFA < > &, const string::LinearString < > & > ( Accept::accept, "automaton", "string" ).setDocumentation (
+"Automaton run implementation resulting in boolean true if the automaton accepted the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return true if the automaton accepts given string" );
+
+auto AcceptDFTARankedTree = registration::AbstractRegister < Accept, bool, const automaton::DFTA < > &, const tree::RankedTree < > & > ( Accept::accept, "automaton", "tree" ).setDocumentation (
+"Automaton run implementation resulting in boolean true if the automaton accepted the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return true if the automaton accepts given string" );
+
+auto AcceptNFTARankedTree = registration::AbstractRegister < Accept, bool, const automaton::NFTA < > &, const tree::RankedTree < > & > ( Accept::accept, "automaton", "tree" ).setDocumentation (
+"Automaton run implementation resulting in boolean true if the automaton accepted the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return true if the automaton accepts given string" );
+
+auto AcceptInputDrivenDPDALinearString = registration::AbstractRegister < Accept, bool, const automaton::InputDrivenDPDA < > &, const string::LinearString < > & > ( Accept::accept, "automaton", "string" ).setDocumentation (
+"Automaton run implementation resulting in boolean true if the automaton accepted the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return true if the automaton accepts given string" );
+
+auto AcceptVisiblyPushdownDPDALinearString = registration::AbstractRegister < Accept, bool, const automaton::VisiblyPushdownDPDA < > &, const string::LinearString < > & > ( Accept::accept, "automaton", "string" ).setDocumentation (
+"Automaton run implementation resulting in boolean true if the automaton accepted the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return true if the automaton accepts given string" );
+
+auto AcceptRealTimeHeightDeterministicDPDALinearString = registration::AbstractRegister < Accept, bool, const automaton::RealTimeHeightDeterministicDPDA < > &, const string::LinearString < > & > ( Accept::accept, "automaton", "string" ).setDocumentation (
+"Automaton run implementation resulting in boolean true if the automaton accepted the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return true if the automaton accepts given string" );
+
+auto AcceptDPDALinearString = registration::AbstractRegister < Accept, bool, const automaton::DPDA < > &, const string::LinearString < > & > ( Accept::accept, "automaton", "string" ).setDocumentation (
+"Automaton run implementation resulting in boolean true if the automaton accepted the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return true if the automaton accepts given string" );
+
+auto AcceptNPDTALinearString = registration::AbstractRegister < Accept, bool, const automaton::NPDTA < > &, const string::LinearString < > & > ( Accept::accept, "automaton", "string" ).setDocumentation (
+"Automaton run implementation resulting in boolean true if the automaton accepted the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return true if the automaton accepts given string" );
 
 } /* namespace run */
 
diff --git a/alib2algo/src/automaton/run/Occurrences.cpp b/alib2algo/src/automaton/run/Occurrences.cpp
index fe572433391014ea992dab58ccd6050c969dc1e5..2632372ddcecfd809586ecfd510d88b0bb498ac4 100644
--- a/alib2algo/src/automaton/run/Occurrences.cpp
+++ b/alib2algo/src/automaton/run/Occurrences.cpp
@@ -12,12 +12,47 @@ namespace automaton {
 
 namespace run {
 
-auto OccurrencesDFALinearString = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::DFA < > &, const string::LinearString < > & > ( Occurrences::occurrences );
-auto OccurrencesDFTARankedTree = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::DFTA < > &, const tree::RankedTree < > & > ( Occurrences::occurrences );
-auto OccurrencesInputDrivenDPDALinearString = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::InputDrivenDPDA < > &, const string::LinearString < > & > ( Occurrences::occurrences );
-auto OccurrencesVisiblyPushdownDPDALinearString = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::VisiblyPushdownDPDA < > &, const string::LinearString < > & > ( Occurrences::occurrences );
-auto OccurrencesRealTimeHeightDeterministicDPDALinearString = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::RealTimeHeightDeterministicDPDA < > &, const string::LinearString < > & > ( Occurrences::occurrences );
-auto OccurrencesDPDALinearString = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::DPDA < > &, const string::LinearString < > & > ( Occurrences::occurrences );
+auto OccurrencesDFALinearString = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::DFA < > &, const string::LinearString < > & > ( Occurrences::occurrences, "automaton", "string" ).setDocumentation (
+"Automaton occurrences run implementation.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return set of indexes to the string where the automaton passed a final state" );
+
+auto OccurrencesDFTARankedTree = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::DFTA < > &, const tree::RankedTree < > & > ( Occurrences::occurrences, "automaton", "tree" ).setDocumentation (
+"Automaton occurrences run implementation.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return set of indexes to the string where the automaton passed a final state" );
+
+auto OccurrencesInputDrivenDPDALinearString = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::InputDrivenDPDA < > &, const string::LinearString < > & > ( Occurrences::occurrences, "automaton", "string" ).setDocumentation (
+"Automaton occurrences run implementation.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return set of indexes to the string where the automaton passed a final state" );
+
+auto OccurrencesVisiblyPushdownDPDALinearString = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::VisiblyPushdownDPDA < > &, const string::LinearString < > & > ( Occurrences::occurrences, "automaton", "string" ).setDocumentation (
+"Automaton occurrences run implementation.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return set of indexes to the string where the automaton passed a final state" );
+
+auto OccurrencesRealTimeHeightDeterministicDPDALinearString = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::RealTimeHeightDeterministicDPDA < > &, const string::LinearString < > & > ( Occurrences::occurrences, "automaton", "string" ).setDocumentation (
+"Automaton occurrences run implementation.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return set of indexes to the string where the automaton passed a final state" );
+
+auto OccurrencesDPDALinearString = registration::AbstractRegister < Occurrences, ext::set < unsigned >, const automaton::DPDA < > &, const string::LinearString < > & > ( Occurrences::occurrences, "automaton", "string" ).setDocumentation (
+"Automaton occurrences run implementation.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return set of indexes to the string where the automaton passed a final state" );
 
 } /* namespace run */
 
diff --git a/alib2algo/src/automaton/run/Result.cpp b/alib2algo/src/automaton/run/Result.cpp
index ea862e291a34e12adc7cdf74f93e6b044493d0bb..04356157f1b065170bc2dec4e99f82dc697a9286 100644
--- a/alib2algo/src/automaton/run/Result.cpp
+++ b/alib2algo/src/automaton/run/Result.cpp
@@ -12,19 +12,96 @@ namespace automaton {
 
 namespace run {
 
-auto ResultDFALinearString = registration::AbstractRegister < Result, DefaultStateType, const automaton::DFA < > &, const string::LinearString < > & > ( Result::result );
-auto ResultDFTARankedTree = registration::AbstractRegister < Result, DefaultStateType, const automaton::DFTA < > &, const tree::RankedTree < > & > ( Result::result );
-auto ResultInputDrivenDPDALinearString = registration::AbstractRegister < Result, DefaultStateType, const automaton::InputDrivenDPDA < > &, const string::LinearString < > & > ( Result::result );
-auto ResultVisiblyPushdownDPDALinearString = registration::AbstractRegister < Result, DefaultStateType, const automaton::VisiblyPushdownDPDA < > &, const string::LinearString < > & > ( Result::result );
-auto ResultRealTimeHeightDeterministicDPDALinearString = registration::AbstractRegister < Result, DefaultStateType, const automaton::RealTimeHeightDeterministicDPDA < > &, const string::LinearString < > & > ( Result::result );
-auto ResultDPDALinearString = registration::AbstractRegister < Result, DefaultStateType, const automaton::DPDA < > &, const string::LinearString < > & > ( Result::result );
-
-auto ResultDFALinearString2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::DFA < > &, const string::LinearString < > &, const DefaultStateType & > ( Result::result );
-auto ResultDFTARankedTree2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::DFTA < > &, const tree::RankedTree < > &, const DefaultStateType & > ( Result::result );
-auto ResultInputDrivenDPDALinearString2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::InputDrivenDPDA < > &, const string::LinearString < > &, const DefaultStateType & > ( Result::result );
-auto ResultVisiblyPushdownDPDALinearString2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::VisiblyPushdownDPDA < > &, const string::LinearString < > &, const DefaultStateType & > ( Result::result );
-auto ResultRealTimeHeightDeterministicDPDALinearString2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::RealTimeHeightDeterministicDPDA < > &, const string::LinearString < > &, const DefaultStateType & > ( Result::result );
-auto ResultDPDALinearString2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::DPDA < > &, const string::LinearString < > &, const DefaultStateType & > ( Result::result );
+auto ResultDFALinearString = registration::AbstractRegister < Result, DefaultStateType, const automaton::DFA < > &, const string::LinearString < > & > ( Result::result, "automaton", "string" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return state where the run stopped" );
+
+auto ResultDFTARankedTree = registration::AbstractRegister < Result, DefaultStateType, const automaton::DFTA < > &, const tree::RankedTree < > & > ( Result::result, "automaton", "tree" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return state where the run stopped" );
+
+auto ResultInputDrivenDPDALinearString = registration::AbstractRegister < Result, DefaultStateType, const automaton::InputDrivenDPDA < > &, const string::LinearString < > & > ( Result::result, "automaton", "string" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return state where the run stopped" );
+
+auto ResultVisiblyPushdownDPDALinearString = registration::AbstractRegister < Result, DefaultStateType, const automaton::VisiblyPushdownDPDA < > &, const string::LinearString < > & > ( Result::result, "automaton", "string" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return state where the run stopped" );
+
+auto ResultRealTimeHeightDeterministicDPDALinearString = registration::AbstractRegister < Result, DefaultStateType, const automaton::RealTimeHeightDeterministicDPDA < > &, const string::LinearString < > & > ( Result::result, "automaton", "string" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return state where the run stopped" );
+
+auto ResultDPDALinearString = registration::AbstractRegister < Result, DefaultStateType, const automaton::DPDA < > &, const string::LinearString < > & > ( Result::result, "automaton", "string" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return state where the run stopped" );
+
+
+auto ResultDFALinearString2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::DFA < > &, const string::LinearString < > &, const DefaultStateType & > ( Result::result, "automaton", "string", "fail" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@param fail the state to use when transition function is not defined for the input\n\
+@return state where the run stopped" );
+
+auto ResultDFTARankedTree2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::DFTA < > &, const tree::RankedTree < > &, const DefaultStateType & > ( Result::result, "automaton", "tree", "fail" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@param fail the state to use when transition function is not defined for the input\n\
+@return state where the run stopped" );
+
+auto ResultInputDrivenDPDALinearString2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::InputDrivenDPDA < > &, const string::LinearString < > &, const DefaultStateType & > ( Result::result, "automaton", "string", "fail" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@param fail the state to use when transition function is not defined for the input\n\
+@return state where the run stopped" );
+
+auto ResultVisiblyPushdownDPDALinearString2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::VisiblyPushdownDPDA < > &, const string::LinearString < > &, const DefaultStateType & > ( Result::result, "automaton", "string", "fail" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@param fail the state to use when transition function is not defined for the input\n\
+@return state where the run stopped" );
+
+auto ResultRealTimeHeightDeterministicDPDALinearString2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::RealTimeHeightDeterministicDPDA < > &, const string::LinearString < > &, const DefaultStateType & > ( Result::result, "automaton", "string", "fail" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@param fail the state to use when transition function is not defined for the input\n\
+@return state where the run stopped" );
+
+auto ResultDPDALinearString2 = registration::AbstractRegister < Result, DefaultStateType, const automaton::DPDA < > &, const string::LinearString < > &, const DefaultStateType & > ( Result::result, "automaton", "string", "fail" ).setDocumentation (
+"General automaton run implementation resulting in the reached state. Generic fail state is returned if the automaton's transition function was not defined for the input.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@param fail the state to use when transition function is not defined for the input\n\
+@return state where the run stopped" );
 
 } /* namespace run */
 
diff --git a/alib2algo/src/automaton/run/Translate.cpp b/alib2algo/src/automaton/run/Translate.cpp
index c1b605fa577cb1a3ab729b4f2e558f1449c5db69..8a094a0eac163af840f6f490f37877322b0c93fd 100644
--- a/alib2algo/src/automaton/run/Translate.cpp
+++ b/alib2algo/src/automaton/run/Translate.cpp
@@ -1,19 +1,24 @@
-/*
- * Translate.cpp
- *
- *  Created on: 12. 5. 2016
- *      Author: Jakub Doupal
- */
-
-#include "Translate.h"
-#include <registration/AlgoRegistration.hpp>
-
-namespace automaton {
-
-namespace run {
-
-auto TranslateNPDTALinearString = registration::AbstractRegister < Translate, ext::set < string::LinearString < > >, const automaton::NPDTA < > &, const string::LinearString < > & > ( Translate::translate );
-
-} /* namespace run */
-
-} /* namespace automaton */
+/*
+ * Translate.cpp
+ *
+ *  Created on: 12. 5. 2016
+ *      Author: Jakub Doupal
+ */
+
+#include "Translate.h"
+#include <registration/AlgoRegistration.hpp>
+
+namespace automaton {
+
+namespace run {
+
+auto TranslateNPDTALinearString = registration::AbstractRegister < Translate, ext::set < string::LinearString < > >, const automaton::NPDTA < > &, const string::LinearString < > & > ( Translate::translate, "automaton", "string" ).setDocumentation (
+"Implementation of a run of an automaton that is producing output.\n\
+\n\
+@param automaton the runned automaton\n\
+@param string the input of the automaton\n\
+@return set of strings representing the translations" );
+
+} /* namespace run */
+
+} /* namespace automaton */
diff --git a/alib2algo/src/automaton/run/Translate.h b/alib2algo/src/automaton/run/Translate.h
index 315926cf8c7ccd1392805dbac860fdecc0e216fb..4f4cfaa204e2353b27347e97e7cbf21361774793 100644
--- a/alib2algo/src/automaton/run/Translate.h
+++ b/alib2algo/src/automaton/run/Translate.h
@@ -1,63 +1,63 @@
-/*
- * Translate.h
- *
- *  Created on: 12. 5. 2016
- *      Author: Jakub Doupal
- */
-
-#ifndef _AUTOMATON_TRANSLATE_H__
-#define _AUTOMATON_TRANSLATE_H__
-
-#include <string/LinearString.h>
-
-#include "Run.h"
-#include <automaton/PDA/NPDTA.h>
-
-#include <alib/deque>
-#include <alib/set>
-
-namespace automaton {
-
-namespace run {
-
-/**
- * \brief
- * Implementation of transducer run over its input.
- */
-class Translate {
-public:
-	/**
-	 * \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 set of strings representing the translations
-	 */
-	template < class InputSymbolType, class OutputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
-	static ext::set < string::LinearString < OutputSymbolType > > translate ( const automaton::NPDTA < InputSymbolType, OutputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & automaton, const string::LinearString < InputSymbolType > & string );
-
-};
-
-template < class InputSymbolType, class OutputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
-ext::set < string::LinearString < OutputSymbolType > > Translate::translate ( const automaton::NPDTA < InputSymbolType, OutputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & automaton, const string::LinearString < InputSymbolType > & string ) {
-	ext::tuple < bool, ext::set < StateType >, ext::set < ext::vector < OutputSymbolType > > > res = Run::calculateStates ( automaton, string );
-	ext::set < string::LinearString < OutputSymbolType > > strings;
-
-	for ( const auto & rawString : std::get < 2 > ( res ) )
-		strings . insert ( string::LinearString < OutputSymbolType > ( rawString ) );
-
-	return strings;
-}
-
-} /* namespace run */
-
-} /* namespace automaton */
-
-#endif /* _AUTOMATON_TRANSLATE_H__ */
+/*
+ * Translate.h
+ *
+ *  Created on: 12. 5. 2016
+ *      Author: Jakub Doupal
+ */
+
+#ifndef _AUTOMATON_TRANSLATE_H__
+#define _AUTOMATON_TRANSLATE_H__
+
+#include <string/LinearString.h>
+
+#include "Run.h"
+#include <automaton/PDA/NPDTA.h>
+
+#include <alib/deque>
+#include <alib/set>
+
+namespace automaton {
+
+namespace run {
+
+/**
+ * \brief
+ * Implementation of transducer run over its input.
+ */
+class Translate {
+public:
+	/**
+	 * Implementation of a run of an automaton that is producing output.
+	 *
+	 * \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 set of strings representing the translations
+	 */
+	template < class InputSymbolType, class OutputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
+	static ext::set < string::LinearString < OutputSymbolType > > translate ( const automaton::NPDTA < InputSymbolType, OutputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & automaton, const string::LinearString < InputSymbolType > & string );
+
+};
+
+template < class InputSymbolType, class OutputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
+ext::set < string::LinearString < OutputSymbolType > > Translate::translate ( const automaton::NPDTA < InputSymbolType, OutputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & automaton, const string::LinearString < InputSymbolType > & string ) {
+	ext::tuple < bool, ext::set < StateType >, ext::set < ext::vector < OutputSymbolType > > > res = Run::calculateStates ( automaton, string );
+	ext::set < string::LinearString < OutputSymbolType > > strings;
+
+	for ( const auto & rawString : std::get < 2 > ( res ) )
+		strings . insert ( string::LinearString < OutputSymbolType > ( rawString ) );
+
+	return strings;
+}
+
+} /* namespace run */
+
+} /* namespace automaton */
+
+#endif /* _AUTOMATON_TRANSLATE_H__ */