diff --git a/alib2data/src/alphabet/SymbolBase.h b/alib2data/src/alphabet/SymbolBase.h
index 44781e16d14fdad0428356d2b81fe723ae9ab7c8..40511b9bcb8e85cb127a13c9cb8fd705ecd41129 100644
--- a/alib2data/src/alphabet/SymbolBase.h
+++ b/alib2data/src/alphabet/SymbolBase.h
@@ -14,9 +14,22 @@ namespace alphabet {
 
 class SymbolBase;
 
-typedef std::acceptor_base<SymbolBase,
-			EndSymbol, LabeledSymbol, BlankSymbol, BottomOfTheStackSymbol, RankedSymbol, BarSymbol, RankedBarSymbol, SubtreeWildcardSymbol, SymbolSetSymbol, SymbolPairSymbol, UniqueSymbol, StartSymbol
-	> VisitableSymbolBase;
+// ----------------------------------------------------------------------------------------------------------------------
+
+template<typename T>
+class acceptor_base_helper {
+};
+
+template<typename ... Ts>
+class acceptor_base_helper< std::tuple< Ts ... > > :
+	public std::acceptor_base<
+			SymbolBase, Ts ...
+	> {
+};
+
+typedef acceptor_base_helper< alib::SymbolTypes > VisitableSymbolBase;
+
+// ----------------------------------------------------------------------------------------------------------------------
 
 /**
  * Represents symbol in an alphabet.
diff --git a/alib2data/src/automaton/AutomatonBase.h b/alib2data/src/automaton/AutomatonBase.h
index ebcfc1846ae4c18f0fce87fbf595c24ee172c6e8..10fb7468707b5529ee82a29e8a3091a0d0d1d785 100644
--- a/alib2data/src/automaton/AutomatonBase.h
+++ b/alib2data/src/automaton/AutomatonBase.h
@@ -15,12 +15,25 @@ namespace automaton {
 
 class AutomatonBase;
 
-typedef std::acceptor_base<AutomatonBase,
-			automaton::DFA, automaton::NFA, automaton::MultiInitialStateNFA, automaton::EpsilonNFA, automaton::CompactNFA, automaton::ExtendedNFA, automaton::DFTA, automaton::NFTA, automaton::DPDA, automaton::SinglePopDPDA, automaton::InputDrivenDPDA, automaton::VisiblyPushdownDPDA, automaton::RealTimeHeightDeterministicDPDA, automaton::NPDA, automaton::SinglePopNPDA, automaton::InputDrivenNPDA, automaton::VisiblyPushdownNPDA, automaton::RealTimeHeightDeterministicNPDA, automaton::OneTapeDTM
-	> VisitableAutomatonBase;
+// ----------------------------------------------------------------------------------------------------------------------
+
+template<typename T>
+class acceptor_base_helper {
+};
+
+template<typename ... Ts>
+class acceptor_base_helper< std::tuple< Ts ... > > :
+	public std::acceptor_base<
+			AutomatonBase, Ts ...
+	> {
+};
+
+typedef acceptor_base_helper< alib::AutomatonTypes > VisitableAutomatonBase;
+
+// ----------------------------------------------------------------------------------------------------------------------
 
 /**
- * Abstract base class for all automata.
+ * Represents symbol in an alphabet.
  */
 class AutomatonBase : public alib::ObjectBase, public VisitableAutomatonBase {
 public:
diff --git a/alib2data/src/container/ContainerBase.h b/alib2data/src/container/ContainerBase.h
index 84608d550e175b068426ded35be289067c71a8b0..1da3921ddc767b08edd86952d1202beeeea2e31a 100644
--- a/alib2data/src/container/ContainerBase.h
+++ b/alib2data/src/container/ContainerBase.h
@@ -14,15 +14,25 @@ namespace container {
 
 class ContainerBase;
 
-typedef std::acceptor_base<ContainerBase,
-			container::ObjectsSet,
-			container::ObjectsVector,
-			container::ObjectsPair,
-			container::ObjectsMap
-	> VisitableContainerBase;
+// ----------------------------------------------------------------------------------------------------------------------
+
+template<typename T>
+class acceptor_base_helper {
+};
+
+template<typename ... Ts>
+class acceptor_base_helper< std::tuple< Ts ... > > :
+	public std::acceptor_base<
+			ContainerBase, Ts ...
+	> {
+};
+
+typedef acceptor_base_helper< alib::ContainerTypes > VisitableContainerBase;
+
+// ----------------------------------------------------------------------------------------------------------------------
 
 /**
- * Represents container in a hierarchy.
+ * Represents symbol in an alphabet.
  */
 class ContainerBase : public alib::ObjectBase, public VisitableContainerBase {
 public:
diff --git a/alib2data/src/grammar/GrammarBase.h b/alib2data/src/grammar/GrammarBase.h
index 9dc7b96f194db1e3aeb08530202255f897fa0c51..4f6727ade343ba11a1e8fcf7d608226d4a27aeaa 100644
--- a/alib2data/src/grammar/GrammarBase.h
+++ b/alib2data/src/grammar/GrammarBase.h
@@ -15,12 +15,25 @@ namespace grammar {
 
 class GrammarBase;
 
-typedef std::acceptor_base<GrammarBase,
-			grammar::LeftLG, grammar::LeftRG, grammar::RightLG, grammar::RightRG, grammar::LG, grammar::CFG, grammar::EpsilonFreeCFG, grammar::CNF, grammar::GNF, grammar::CSG, grammar::NonContractingGrammar, grammar::ContextPreservingUnrestrictedGrammar, grammar::UnrestrictedGrammar
-	> VisitableGrammarBase;
+// ----------------------------------------------------------------------------------------------------------------------
+
+template<typename T>
+class acceptor_base_helper {
+};
+
+template<typename ... Ts>
+class acceptor_base_helper< std::tuple< Ts ... > > :
+	public std::acceptor_base<
+			GrammarBase, Ts ...
+	> {
+};
+
+typedef acceptor_base_helper< alib::GrammarTypes > VisitableGrammarBase;
+
+// ----------------------------------------------------------------------------------------------------------------------
 
 /**
- * Abstract base class for all grammars.
+ * Represents symbol in an alphabet.
  */
 class GrammarBase : public alib::ObjectBase, public VisitableGrammarBase {
 public:
diff --git a/alib2data/src/graph/GraphBase.h b/alib2data/src/graph/GraphBase.h
index aafa9ff94c228fd03de5c47e32902516b2df94b2..4158ba8c94e5f693a5af4fef8a9d9a196700f421 100644
--- a/alib2data/src/graph/GraphBase.h
+++ b/alib2data/src/graph/GraphBase.h
@@ -8,17 +8,34 @@ namespace graph {
 
 class GraphBase;
 
-typedef std::acceptor_base<GraphBase, DirectedGraph, UndirectedGraph> VisitableGraphBase;
+// ----------------------------------------------------------------------------------------------------------------------
 
-// Abstract base class for all graphs.
-class GraphBase : public alib::ObjectBase, public VisitableGraphBase
-{
+template<typename T>
+class acceptor_base_helper {
+};
+
+template<typename ... Ts>
+class acceptor_base_helper< std::tuple< Ts ... > > :
+	public std::acceptor_base<
+			GraphBase, Ts ...
+	> {
+};
+
+typedef acceptor_base_helper< alib::GraphTypes > VisitableGraphBase;
+
+// ----------------------------------------------------------------------------------------------------------------------
+
+/**
+ * Represents symbol in an alphabet.
+ */
+class GraphBase : public alib::ObjectBase, public VisitableGraphBase {
 public:
 	using VisitableGraphBase::Accept;
 	using alib::VisitableObjectBase::Accept;
 
-	virtual GraphBase *clone() const = 0;
-	virtual GraphBase *plunder() && = 0;
+	virtual GraphBase* clone() const = 0;
+	virtual GraphBase* plunder() && = 0;
+
 };
 
 } // namespace graph
diff --git a/alib2data/src/label/LabelBase.h b/alib2data/src/label/LabelBase.h
index fe0b81816aa34f5b21ef1ad9af45aea12df09d8f..0d5e1260cf4c73895cb67fb91cf71a8502e1dffd 100644
--- a/alib2data/src/label/LabelBase.h
+++ b/alib2data/src/label/LabelBase.h
@@ -14,12 +14,25 @@ namespace label {
 
 class LabelBase;
 
-typedef std::acceptor_base<LabelBase,
-			label::PrimitiveLabel, label::HexavigesimalLabel, label::ObjectLabel, label::LabelSetLabel, label::LabelPairLabel, label::UniqueLabel
-	> VisitableLabelBase;
+// ----------------------------------------------------------------------------------------------------------------------
+
+template<typename T>
+class acceptor_base_helper {
+};
+
+template<typename ... Ts>
+class acceptor_base_helper< std::tuple< Ts ... > > :
+	public std::acceptor_base<
+			LabelBase, Ts ...
+	> {
+};
+
+typedef acceptor_base_helper< alib::LabelTypes > VisitableLabelBase;
+
+// ----------------------------------------------------------------------------------------------------------------------
 
 /**
- * Abstract base class for all automata.
+ * Represents symbol in an alphabet.
  */
 class LabelBase : public alib::ObjectBase, public VisitableLabelBase {
 public:
diff --git a/alib2data/src/object/ObjectBase.h b/alib2data/src/object/ObjectBase.h
index 5d13cb6a58b420e8ec5a9e83a8012436de91cbc8..05250ce6755ca87187750c303091c074c020659e 100644
--- a/alib2data/src/object/ObjectBase.h
+++ b/alib2data/src/object/ObjectBase.h
@@ -150,20 +150,54 @@ namespace alib {
 
 class ObjectBase;
 
-typedef std::tuple<
-			Void,
-			exception::AlibException,
-			automaton::DFA, automaton::NFA, automaton::MultiInitialStateNFA, automaton::EpsilonNFA, automaton::CompactNFA, automaton::ExtendedNFA, automaton::DFTA, automaton::NFTA, automaton::DPDA, automaton::SinglePopDPDA, automaton::InputDrivenDPDA, automaton::VisiblyPushdownDPDA, automaton::RealTimeHeightDeterministicDPDA, automaton::NPDA, automaton::SinglePopNPDA, automaton::InputDrivenNPDA, automaton::VisiblyPushdownNPDA, automaton::RealTimeHeightDeterministicNPDA, automaton::OneTapeDTM,
-			grammar::LeftLG, grammar::LeftRG, grammar::RightLG, grammar::RightRG, grammar::LG, grammar::CFG, grammar::EpsilonFreeCFG, grammar::CNF, grammar::GNF, grammar::CSG, grammar::NonContractingGrammar, grammar::ContextPreservingUnrestrictedGrammar, grammar::UnrestrictedGrammar,
-			graph::DirectedGraph, graph::UndirectedGraph,
-			label::PrimitiveLabel, label::HexavigesimalLabel, label::ObjectLabel, label::LabelSetLabel, label::LabelPairLabel, label::UniqueLabel,
-			regexp::UnboundedRegExp, regexp::FormalRegExp,
-			string::Epsilon, string::LinearString, string::CyclicString,
-			alphabet::EndSymbol, alphabet::LabeledSymbol, alphabet::BlankSymbol, alphabet::BottomOfTheStackSymbol, alphabet::RankedSymbol, alphabet::BarSymbol, alphabet::RankedBarSymbol, alphabet::SubtreeWildcardSymbol, alphabet::SymbolPairSymbol, alphabet::SymbolSetSymbol, alphabet::UniqueSymbol, alphabet::StartSymbol,
-			container::ObjectsSet, container::ObjectsVector, container::ObjectsPair, container::ObjectsMap,
-			primitive::String, primitive::Integer, primitive::Character, primitive::Unsigned, primitive::Bool,
-			tree::RankedTree, tree::PrefixRankedNotation, tree::UnrankedTree
-	> Types;
+typedef std::tuple< tree::RankedTree, tree::PrefixRankedNotation, tree::UnrankedTree
+	> TreeTypes;
+
+typedef std::tuple< primitive::String, primitive::Integer, primitive::Character, primitive::Unsigned, primitive::Bool
+	> PrimitiveTypes;
+
+typedef std::tuple< container::ObjectsSet, container::ObjectsVector, container::ObjectsPair, container::ObjectsMap
+	> ContainerTypes;
+
+typedef std::tuple< alphabet::EndSymbol, alphabet::LabeledSymbol, alphabet::BlankSymbol, alphabet::BottomOfTheStackSymbol, alphabet::RankedSymbol, alphabet::BarSymbol, alphabet::RankedBarSymbol, alphabet::SubtreeWildcardSymbol, alphabet::SymbolPairSymbol, alphabet::SymbolSetSymbol, alphabet::UniqueSymbol, alphabet::StartSymbol
+	> SymbolTypes;
+
+typedef std::tuple< string::Epsilon, string::LinearString, string::CyclicString
+	> StringTypes;
+
+typedef std::tuple< regexp::UnboundedRegExp, regexp::FormalRegExp
+	> RegExpTypes;
+
+typedef std::tuple< label::PrimitiveLabel, label::HexavigesimalLabel, label::ObjectLabel, label::LabelSetLabel, label::LabelPairLabel, label::UniqueLabel
+	> LabelTypes;
+
+typedef std::tuple< graph::DirectedGraph, graph::UndirectedGraph
+	> GraphTypes;
+
+typedef std::tuple< grammar::LeftLG, grammar::LeftRG, grammar::RightLG, grammar::RightRG, grammar::LG, grammar::CFG, grammar::EpsilonFreeCFG, grammar::CNF, grammar::GNF, grammar::CSG, grammar::NonContractingGrammar, grammar::ContextPreservingUnrestrictedGrammar, grammar::UnrestrictedGrammar
+	> GrammarTypes;
+
+typedef std::tuple< automaton::DFA, automaton::NFA, automaton::MultiInitialStateNFA, automaton::EpsilonNFA, automaton::CompactNFA, automaton::ExtendedNFA, automaton::DFTA, automaton::NFTA, automaton::DPDA, automaton::SinglePopDPDA, automaton::InputDrivenDPDA, automaton::VisiblyPushdownDPDA, automaton::RealTimeHeightDeterministicDPDA, automaton::NPDA, automaton::SinglePopNPDA, automaton::InputDrivenNPDA, automaton::VisiblyPushdownNPDA, automaton::RealTimeHeightDeterministicNPDA, automaton::OneTapeDTM
+	> AutomatonTypes;
+
+typedef std::tuple< Void, exception::AlibException
+	> OtherTypes;
+// --------------------------------------------------------------------------------------------------------------------
+
+template<typename ... Ts>
+class types_merger {
+};
+
+template<typename ... TreeTypes, typename ... PrimitiveTypes, typename ... ContainerTypes, typename ... SymbolTypes, typename ... StringTypes, typename ... RegExpTypes, typename ... LabelTypes, typename ... GraphTypes, typename ... GrammarTypes, typename ... AutomatonTypes, typename ... OtherTypes>
+class types_merger<std::tuple<TreeTypes...>, std::tuple<PrimitiveTypes...>, std::tuple<ContainerTypes...>, std::tuple<SymbolTypes...>, std::tuple<StringTypes...>, std::tuple<RegExpTypes...>, std::tuple<LabelTypes...>, std::tuple<GraphTypes...>, std::tuple<GrammarTypes...>, std::tuple<AutomatonTypes...>, std::tuple<OtherTypes...>> {
+public:
+	typedef std::tuple<
+			OtherTypes..., AutomatonTypes..., GrammarTypes..., GraphTypes..., LabelTypes..., RegExpTypes..., StringTypes..., SymbolTypes..., ContainerTypes..., PrimitiveTypes..., TreeTypes...
+		> MergedTypes;
+
+};
+
+typedef types_merger<TreeTypes, PrimitiveTypes, ContainerTypes, SymbolTypes, StringTypes, RegExpTypes, LabelTypes, GraphTypes, GrammarTypes, AutomatonTypes, OtherTypes>::MergedTypes Types;
 
 // ----------------------------------------------------------------------------------------------------------------------
 
diff --git a/alib2data/src/primitive/PrimitiveBase.h b/alib2data/src/primitive/PrimitiveBase.h
index 4ff1465fc6f929e0a8fe9a35b4bf1feadfe190d2..f78c0aeb103d9f6dd4b200281165b70579ff2ec8 100644
--- a/alib2data/src/primitive/PrimitiveBase.h
+++ b/alib2data/src/primitive/PrimitiveBase.h
@@ -14,12 +14,25 @@ namespace primitive {
 
 class PrimitiveBase;
 
-typedef std::acceptor_base<PrimitiveBase,
-			primitive::String, primitive::Integer, primitive::Character, primitive::Unsigned, primitive::Bool
-	> VisitablePrimitiveBase;
+// ----------------------------------------------------------------------------------------------------------------------
+
+template<typename T>
+class acceptor_base_helper {
+};
+
+template<typename ... Ts>
+class acceptor_base_helper< std::tuple< Ts ... > > :
+	public std::acceptor_base<
+			PrimitiveBase, Ts ...
+	> {
+};
+
+typedef acceptor_base_helper< alib::PrimitiveTypes > VisitablePrimitiveBase;
+
+// ----------------------------------------------------------------------------------------------------------------------
 
 /**
- * Abstract base class for all automata.
+ * Represents symbol in an alphabet.
  */
 class PrimitiveBase : public alib::ObjectBase, public VisitablePrimitiveBase {
 public:
diff --git a/alib2data/src/regexp/RegExpBase.h b/alib2data/src/regexp/RegExpBase.h
index 103f005fa757fc600b7544b6ee944ed9ccb0c3cd..532148c92dbcfafaf85aadd7294ff153c9b3381f 100644
--- a/alib2data/src/regexp/RegExpBase.h
+++ b/alib2data/src/regexp/RegExpBase.h
@@ -14,12 +14,25 @@ namespace regexp {
 
 class RegExpBase;
 
-typedef std::acceptor_base<RegExpBase,
-			UnboundedRegExp, FormalRegExp
-	> VisitableRegExpBase;
+// ----------------------------------------------------------------------------------------------------------------------
+
+template<typename T>
+class acceptor_base_helper {
+};
+
+template<typename ... Ts>
+class acceptor_base_helper< std::tuple< Ts ... > > :
+	public std::acceptor_base<
+			RegExpBase, Ts ...
+	> {
+};
+
+typedef acceptor_base_helper< alib::RegExpTypes > VisitableRegExpBase;
+
+// ----------------------------------------------------------------------------------------------------------------------
 
 /**
- * Abstract base class for all automata.
+ * Represents symbol in an alphabet.
  */
 class RegExpBase : public alib::ObjectBase, public VisitableRegExpBase {
 public:
@@ -28,6 +41,7 @@ public:
 
 	virtual RegExpBase* clone() const = 0;
 	virtual RegExpBase* plunder() && = 0;
+
 };
 
 } /* namespace regexp */
diff --git a/alib2data/src/string/StringBase.h b/alib2data/src/string/StringBase.h
index bd7627fb72b55b04cd576665ecb0714ab690b03d..d2a3e40b58b91c8f7328f47527897ddcdbe5fdf2 100644
--- a/alib2data/src/string/StringBase.h
+++ b/alib2data/src/string/StringBase.h
@@ -14,20 +14,34 @@ namespace string {
 
 class StringBase;
 
-typedef std::acceptor_base<StringBase,
-			string::Epsilon, string::LinearString, string::CyclicString
-	> VisitableStringBase;
+// ----------------------------------------------------------------------------------------------------------------------
+
+template<typename T>
+class acceptor_base_helper {
+};
+
+template<typename ... Ts>
+class acceptor_base_helper< std::tuple< Ts ... > > :
+	public std::acceptor_base<
+			StringBase, Ts ...
+	> {
+};
+
+typedef acceptor_base_helper< alib::StringTypes > VisitableStringBase;
+
+// ----------------------------------------------------------------------------------------------------------------------
 
 /**
- * Represents string in an alphabet.
+ * Represents symbol in an alphabet.
  */
-class StringBase : public VisitableStringBase, public alib::ObjectBase {
+class StringBase : public alib::ObjectBase, public VisitableStringBase {
 public:
 	using VisitableStringBase::Accept;
 	using alib::VisitableObjectBase::Accept;
 
 	virtual StringBase* clone() const = 0;
 	virtual StringBase* plunder() && = 0;
+
 };
 
 } /* namespace string */
diff --git a/alib2data/src/tree/TreeBase.h b/alib2data/src/tree/TreeBase.h
index 4a91f60f7e7ee02d26f5691f5a0315003b212728..85198e5efb2412216ad2afee21ab9abca6033609 100644
--- a/alib2data/src/tree/TreeBase.h
+++ b/alib2data/src/tree/TreeBase.h
@@ -16,12 +16,25 @@ namespace tree {
 
 class TreeBase;
 
-typedef std::acceptor_base<TreeBase,
-			tree::RankedTree, tree::PrefixRankedNotation, tree::UnrankedTree
-	> VisitableTreeBase;
+// ----------------------------------------------------------------------------------------------------------------------
+
+template<typename T>
+class acceptor_base_helper {
+};
+
+template<typename ... Ts>
+class acceptor_base_helper< std::tuple< Ts ... > > :
+	public std::acceptor_base<
+			TreeBase, Ts ...
+	> {
+};
+
+typedef acceptor_base_helper< alib::TreeTypes > VisitableTreeBase;
+
+// ----------------------------------------------------------------------------------------------------------------------
 
 /**
- * Abstract base class for all trees.
+ * Represents symbol in an alphabet.
  */
 class TreeBase : public alib::ObjectBase, public VisitableTreeBase {
 public: