From 008dcc1db35f29259ceca1dc62a1ae833e2ce64e Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Thu, 30 Jul 2015 10:31:24 +0200
Subject: [PATCH] remove visitor capability

Conflicts:
	alib2data/src/automaton/common/AutomatonFromXMLParser.h
---
 alib2data/src/alphabet/BarSymbol.h            |   2 +-
 alib2data/src/alphabet/BlankSymbol.h          |   2 +-
 .../src/alphabet/BottomOfTheStackSymbol.h     |   2 +-
 alib2data/src/alphabet/EndSymbol.h            |   2 +-
 alib2data/src/alphabet/LabeledSymbol.h        |   2 +-
 alib2data/src/alphabet/RankedSymbol.h         |   2 +-
 alib2data/src/alphabet/StartSymbol.h          |   2 +-
 .../src/alphabet/SubtreeWildcardSymbol.h      |   2 +-
 alib2data/src/alphabet/SymbolBase.h           |  24 +-
 alib2data/src/alphabet/SymbolPairSymbol.h     |   2 +-
 alib2data/src/alphabet/SymbolSetSymbol.h      |   2 +-
 alib2data/src/alphabet/UniqueSymbol.h         |   2 +-
 alib2data/src/alphabet/VariablesBarSymbol.h   |   2 +-
 alib2data/src/automaton/AutomatonBase.h       | 209 +-----------------
 alib2data/src/automaton/FSM/CompactNFA.h      |   2 +-
 alib2data/src/automaton/FSM/DFA.h             |   2 +-
 alib2data/src/automaton/FSM/EpsilonNFA.h      |   2 +-
 alib2data/src/automaton/FSM/ExtendedNFA.h     |   2 +-
 .../src/automaton/FSM/MultiInitialStateNFA.h  |   2 +-
 alib2data/src/automaton/FSM/NFA.h             |   2 +-
 alib2data/src/automaton/PDA/DPDA.h            |   2 +-
 alib2data/src/automaton/PDA/InputDrivenDPDA.h |   2 +-
 alib2data/src/automaton/PDA/InputDrivenNPDA.h |   2 +-
 alib2data/src/automaton/PDA/NPDA.h            |   2 +-
 .../PDA/RealTimeHeightDeterministicDPDA.h     |   2 +-
 .../PDA/RealTimeHeightDeterministicNPDA.h     |   2 +-
 alib2data/src/automaton/PDA/SinglePopDPDA.h   |   2 +-
 alib2data/src/automaton/PDA/SinglePopNPDA.h   |   2 +-
 .../src/automaton/PDA/VisiblyPushdownDPDA.h   |   2 +-
 .../src/automaton/PDA/VisiblyPushdownNPDA.h   |   2 +-
 alib2data/src/automaton/TA/DFTA.h             |   2 +-
 alib2data/src/automaton/TA/NFTA.h             |   2 +-
 alib2data/src/automaton/TM/OneTapeDTM.h       |   2 +-
 .../automaton/common/AutomatonFromXMLParser.h |   1 +
 alib2data/src/container/ContainerBase.h       |  24 +-
 alib2data/src/container/ObjectsMap.h          |   2 +-
 alib2data/src/container/ObjectsPair.h         |   2 +-
 alib2data/src/container/ObjectsSet.h          |   2 +-
 alib2data/src/container/ObjectsVector.h       |   2 +-
 alib2data/src/exception/AlibException.h       |   2 +-
 alib2data/src/grammar/ContextFree/CFG.h       |   2 +-
 alib2data/src/grammar/ContextFree/CNF.h       |   2 +-
 .../src/grammar/ContextFree/EpsilonFreeCFG.h  |   2 +-
 alib2data/src/grammar/ContextFree/GNF.h       |   2 +-
 alib2data/src/grammar/ContextFree/LG.h        |   2 +-
 alib2data/src/grammar/ContextSensitive/CSG.h  |   2 +-
 .../ContextSensitive/NonContractingGrammar.h  |   2 +-
 alib2data/src/grammar/GrammarBase.h           |  75 +------
 alib2data/src/grammar/Regular/LeftLG.h        |   2 +-
 alib2data/src/grammar/Regular/LeftRG.h        |   2 +-
 alib2data/src/grammar/Regular/RightLG.h       |   2 +-
 alib2data/src/grammar/Regular/RightRG.h       |   2 +-
 .../ContextPreservingUnrestrictedGrammar.h    |   2 +-
 .../Unrestricted/UnrestrictedGrammar.h        |   2 +-
 alib2data/src/graph/GraphBase.h               |  24 +-
 alib2data/src/graph/directed/DirectedGraph.h  |   3 +-
 .../src/graph/undirected/UndirectedGraph.h    |   3 +-
 alib2data/src/label/HexavigesimalLabel.h      |   2 +-
 alib2data/src/label/LabelBase.h               |  24 +-
 alib2data/src/label/LabelPairLabel.h          |   2 +-
 alib2data/src/label/LabelSetLabel.h           |   2 +-
 alib2data/src/label/ObjectLabel.h             |   2 +-
 alib2data/src/label/PrimitiveLabel.h          |   2 +-
 alib2data/src/label/UniqueLabel.h             |   2 +-
 alib2data/src/object/ObjectBase.h             |  88 +-------
 alib2data/src/object/Void.h                   |   2 +-
 alib2data/src/primitive/Bool.h                |   2 +-
 alib2data/src/primitive/Character.h           |   2 +-
 alib2data/src/primitive/Integer.h             |   2 +-
 alib2data/src/primitive/PrimitiveBase.h       |  24 +-
 alib2data/src/primitive/String.h              |   2 +-
 alib2data/src/primitive/Unsigned.h            |   2 +-
 alib2data/src/regexp/RegExpBase.h             |  25 +--
 alib2data/src/regexp/formal/FormalRegExp.h    |   3 +-
 .../src/regexp/unbounded/UnboundedRegExp.h    |   3 +-
 alib2data/src/string/CyclicString.h           |   2 +-
 alib2data/src/string/Epsilon.h                |   2 +-
 alib2data/src/string/LinearString.h           |   2 +-
 alib2data/src/string/StringBase.h             |  24 +-
 alib2data/src/tree/TreeBase.h                 |  24 +-
 .../src/tree/ranked/PrefixRankedBarPattern.h  |   4 +-
 .../src/tree/ranked/PrefixRankedBarTree.h     |   4 +-
 .../src/tree/ranked/PrefixRankedPattern.h     |   4 +-
 alib2data/src/tree/ranked/PrefixRankedTree.h  |   4 +-
 alib2data/src/tree/ranked/RankedPattern.h     |   3 +-
 alib2data/src/tree/ranked/RankedTree.h        |   3 +-
 alib2data/src/tree/unranked/UnrankedPattern.h |   3 +-
 alib2data/src/tree/unranked/UnrankedTree.h    |   3 +-
 88 files changed, 103 insertions(+), 631 deletions(-)

diff --git a/alib2data/src/alphabet/BarSymbol.h b/alib2data/src/alphabet/BarSymbol.h
index 7a7ff739e3..31b68af10d 100644
--- a/alib2data/src/alphabet/BarSymbol.h
+++ b/alib2data/src/alphabet/BarSymbol.h
@@ -15,7 +15,7 @@ namespace alphabet {
 /**
  * Represents bar symbol for tree linearization.
  */
-class BarSymbol : public std::acceptor<BarSymbol, VisitableSymbolBase, std::acceptor<BarSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class BarSymbol : public SymbolBase {
 public:
 	/**
 	 * Creates a bar symbol.
diff --git a/alib2data/src/alphabet/BlankSymbol.h b/alib2data/src/alphabet/BlankSymbol.h
index e9ce3d43b5..55b9d2e0a3 100644
--- a/alib2data/src/alphabet/BlankSymbol.h
+++ b/alib2data/src/alphabet/BlankSymbol.h
@@ -15,7 +15,7 @@ namespace alphabet {
 /**
  * Represents blank symbol in an alphabet.
  */
-class BlankSymbol : public std::acceptor<BlankSymbol, VisitableSymbolBase, std::acceptor<BlankSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class BlankSymbol : public SymbolBase {
 public:
 	/**
 	 * Creates a blank symbol.
diff --git a/alib2data/src/alphabet/BottomOfTheStackSymbol.h b/alib2data/src/alphabet/BottomOfTheStackSymbol.h
index 811ff4f224..62f1477591 100644
--- a/alib2data/src/alphabet/BottomOfTheStackSymbol.h
+++ b/alib2data/src/alphabet/BottomOfTheStackSymbol.h
@@ -15,7 +15,7 @@ namespace alphabet {
 /**
  * Represents blank symbol in an alphabet.
  */
-class BottomOfTheStackSymbol : public std::acceptor<BottomOfTheStackSymbol, VisitableSymbolBase, std::acceptor<BottomOfTheStackSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class BottomOfTheStackSymbol : public SymbolBase {
 public:
 	/**
 	 * Creates a blank symbol.
diff --git a/alib2data/src/alphabet/EndSymbol.h b/alib2data/src/alphabet/EndSymbol.h
index 4a65cbddde..066ae7b667 100644
--- a/alib2data/src/alphabet/EndSymbol.h
+++ b/alib2data/src/alphabet/EndSymbol.h
@@ -15,7 +15,7 @@ namespace alphabet {
 /**
  * Represents blank symbol in an alphabet.
  */
-class EndSymbol : public std::acceptor<EndSymbol, VisitableSymbolBase, std::acceptor<EndSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class EndSymbol : public SymbolBase {
 public:
 	/**
 	 * Creates a blank symbol.
diff --git a/alib2data/src/alphabet/LabeledSymbol.h b/alib2data/src/alphabet/LabeledSymbol.h
index 1a296f7685..77dcf0e38b 100644
--- a/alib2data/src/alphabet/LabeledSymbol.h
+++ b/alib2data/src/alphabet/LabeledSymbol.h
@@ -16,7 +16,7 @@ namespace alphabet {
 /**
  * Represents symbol in an alphabet.
  */
-class LabeledSymbol : public std::acceptor<LabeledSymbol, VisitableSymbolBase, std::acceptor<LabeledSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class LabeledSymbol : public SymbolBase {
 protected:
 	label::Label label;
 
diff --git a/alib2data/src/alphabet/RankedSymbol.h b/alib2data/src/alphabet/RankedSymbol.h
index de5f0f9b2a..46f1c43ffa 100644
--- a/alib2data/src/alphabet/RankedSymbol.h
+++ b/alib2data/src/alphabet/RankedSymbol.h
@@ -16,7 +16,7 @@ namespace alphabet {
 /**
  * Represents symbol in an alphabet.
  */
-class RankedSymbol : public std::acceptor<RankedSymbol, VisitableSymbolBase, std::acceptor<RankedSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class RankedSymbol : public SymbolBase {
 protected:
 	alphabet::Symbol symbol;
 	primitive::Unsigned rank;
diff --git a/alib2data/src/alphabet/StartSymbol.h b/alib2data/src/alphabet/StartSymbol.h
index 6e5e65325f..cf1b08bbe3 100644
--- a/alib2data/src/alphabet/StartSymbol.h
+++ b/alib2data/src/alphabet/StartSymbol.h
@@ -15,7 +15,7 @@ namespace alphabet {
 /**
  * Represents blank symbol in an alphabet.
  */
-class StartSymbol : public std::acceptor<StartSymbol, VisitableSymbolBase, std::acceptor<StartSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class StartSymbol : public SymbolBase {
 public:
 	/**
 	 * Creates a blank symbol.
diff --git a/alib2data/src/alphabet/SubtreeWildcardSymbol.h b/alib2data/src/alphabet/SubtreeWildcardSymbol.h
index befd082309..472a9aade6 100644
--- a/alib2data/src/alphabet/SubtreeWildcardSymbol.h
+++ b/alib2data/src/alphabet/SubtreeWildcardSymbol.h
@@ -15,7 +15,7 @@ namespace alphabet {
 /**
  * Represents subtreeWildcard symbol for tree linearization.
  */
-class SubtreeWildcardSymbol : public std::acceptor<SubtreeWildcardSymbol, VisitableSymbolBase, std::acceptor<SubtreeWildcardSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class SubtreeWildcardSymbol : public SymbolBase {
 public:
 	/**
 	 * Creates a subtreeWildcard symbol.
diff --git a/alib2data/src/alphabet/SymbolBase.h b/alib2data/src/alphabet/SymbolBase.h
index 6678117536..217395b7a2 100644
--- a/alib2data/src/alphabet/SymbolBase.h
+++ b/alib2data/src/alphabet/SymbolBase.h
@@ -12,33 +12,11 @@
 
 namespace alphabet {
 
-class SymbolBase;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-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.
  */
-class SymbolBase : public alib::ObjectBase, public VisitableSymbolBase {
+class SymbolBase : public alib::ObjectBase {
 public:
-	using VisitableSymbolBase::Accept;
-	using alib::VisitableObjectBase::Accept;
-
 	virtual SymbolBase* clone() const = 0;
 	virtual SymbolBase* plunder() && = 0;
 
diff --git a/alib2data/src/alphabet/SymbolPairSymbol.h b/alib2data/src/alphabet/SymbolPairSymbol.h
index ccf45cad9d..82b6c1fd3a 100644
--- a/alib2data/src/alphabet/SymbolPairSymbol.h
+++ b/alib2data/src/alphabet/SymbolPairSymbol.h
@@ -16,7 +16,7 @@ namespace alphabet {
 /**
  * Represents symbol in an alphabet.
  */
-class SymbolPairSymbol : public std::acceptor<SymbolPairSymbol, VisitableSymbolBase, std::acceptor<SymbolPairSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class SymbolPairSymbol : public SymbolBase {
 protected:
 	std::pair<Symbol, Symbol> symbol;
 
diff --git a/alib2data/src/alphabet/SymbolSetSymbol.h b/alib2data/src/alphabet/SymbolSetSymbol.h
index 91a66f50d6..bb8ebad910 100644
--- a/alib2data/src/alphabet/SymbolSetSymbol.h
+++ b/alib2data/src/alphabet/SymbolSetSymbol.h
@@ -16,7 +16,7 @@ namespace alphabet {
 /**
  * Represents symbol in an alphabet.
  */
-class SymbolSetSymbol : public std::acceptor<SymbolSetSymbol, VisitableSymbolBase, std::acceptor<SymbolSetSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class SymbolSetSymbol : public SymbolBase {
 protected:
 	std::set<Symbol> symbol;
 
diff --git a/alib2data/src/alphabet/UniqueSymbol.h b/alib2data/src/alphabet/UniqueSymbol.h
index c4038a69be..28354a3bfe 100644
--- a/alib2data/src/alphabet/UniqueSymbol.h
+++ b/alib2data/src/alphabet/UniqueSymbol.h
@@ -16,7 +16,7 @@ namespace alphabet {
 /**
  * Represents symbol in an alphabet.
  */
-class UniqueSymbol : public std::acceptor<UniqueSymbol, VisitableSymbolBase, std::acceptor<UniqueSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class UniqueSymbol : public SymbolBase {
 protected:
 	Symbol symbol;
 	primitive::Integer id;
diff --git a/alib2data/src/alphabet/VariablesBarSymbol.h b/alib2data/src/alphabet/VariablesBarSymbol.h
index 1378cc297a..8407df33aa 100644
--- a/alib2data/src/alphabet/VariablesBarSymbol.h
+++ b/alib2data/src/alphabet/VariablesBarSymbol.h
@@ -15,7 +15,7 @@ namespace alphabet {
 /**
  * Represents bar symbol for tree linearization.
  */
-class VariablesBarSymbol : public std::acceptor<VariablesBarSymbol, VisitableSymbolBase, std::acceptor<VariablesBarSymbol, alib::VisitableObjectBase, SymbolBase> > {
+class VariablesBarSymbol : public SymbolBase {
 public:
 	/**
 	 * Creates a bar symbol.
diff --git a/alib2data/src/automaton/AutomatonBase.h b/alib2data/src/automaton/AutomatonBase.h
index 26cd383e85..ea29128a01 100644
--- a/alib2data/src/automaton/AutomatonBase.h
+++ b/alib2data/src/automaton/AutomatonBase.h
@@ -13,222 +13,15 @@
 
 namespace automaton {
 
-class AutomatonBase;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-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;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
 /**
  * Represents symbol in an alphabet.
  */
-class AutomatonBase : public alib::ObjectBase, public VisitableAutomatonBase {
+class AutomatonBase : public alib::ObjectBase {
 public:
-	using VisitableAutomatonBase::Accept;
-	using alib::VisitableObjectBase::Accept;
-
 	virtual AutomatonBase* clone() const = 0;
 	virtual AutomatonBase* plunder() && = 0;
 };
 
-class VisitableConstFSMBase : public VisitableAutomatonBase::const_visitor_type {
-public:
-	using VisitableAutomatonBase::const_visitor_type::Visit;
-
-	void Visit(void*, const NFTA&) const {
-		throw exception::AlibException("Unsupported automaton type NFTA");
-	}
-
-	void Visit(void*, const DFTA&) const {
-		throw exception::AlibException("Unsupported automaton type DFTA");
-	}
-
-	void Visit(void*, const DPDA&) const {
-		throw exception::AlibException("Unsupported automaton type DPDA");
-	}
-
-	void Visit(void*, const SinglePopDPDA&) const {
-		throw exception::AlibException("Unsupported automaton type SinglePopDPDA");
-	}
-
-	void Visit(void*, const InputDrivenDPDA&) const {
-		throw exception::AlibException("Unsupported automaton type InputDrivenDPDA");
-	}
-
-	void Visit(void*, const InputDrivenNPDA&) const {
-		throw exception::AlibException("Unsupported automaton type InputDrivenNPDA");
-	}
-
-	void Visit(void*, const VisiblyPushdownDPDA&) const {
-		throw exception::AlibException("Unsupported automaton type VisiblyPushdownDPDA");
-	}
-
-	void Visit(void*, const VisiblyPushdownNPDA&) const {
-		throw exception::AlibException("Unsupported automaton type VisiblyPushdownNPDA");
-	}
-
-	void Visit(void*, const RealTimeHeightDeterministicDPDA&) const {
-		throw exception::AlibException("Unsupported automaton type RealTimeHeightDeterministicDPDA");
-	}
-
-	void Visit(void*, const RealTimeHeightDeterministicNPDA&) const {
-		throw exception::AlibException("Unsupported automaton type RealTimeHeightDeterministicNPDA");
-	}
-
-	void Visit(void*, const NPDA&) const {
-		throw exception::AlibException("Unsupported automaton type NPDA");
-	}
-
-	void Visit(void*, const SinglePopNPDA&) const {
-		throw exception::AlibException("Unsupported automaton type SinglePopNPDA");
-	}
-
-	void Visit(void*, const OneTapeDTM&) const {
-		throw exception::AlibException("Unsupported automaton type OneTapeDTM");
-	}
-};
-
-class VisitableConstPDABase : public VisitableAutomatonBase::const_visitor_type {
-public:
-	using VisitableAutomatonBase::const_visitor_type::Visit;
-
-	void Visit(void*, const NFTA&) const {
-		throw exception::AlibException("Unsupported automaton type NFTA");
-	}
-
-	void Visit(void*, const DFTA&) const {
-		throw exception::AlibException("Unsupported automaton type DFTA");
-	}
-
-	void Visit(void*, const EpsilonNFA&) const {
-		throw exception::AlibException("Unsupported automaton type EpsilonNFA");
-	}
-
-	void Visit(void*, const MultiInitialStateNFA&) const {
-		throw exception::AlibException("Unsupported automaton type MultiInitialStateNFA");
-	}
-
-	void Visit(void*, const NFA&) const {
-		throw exception::AlibException("Unsupported automaton type NFA");
-	}
-
-	void Visit(void*, const DFA&) const {
-		throw exception::AlibException("Unsupported automaton type DFA");
-	}
-
-	void Visit(void*, const ExtendedNFA&) const {
-		throw exception::AlibException("Unsupported automaton type ExtendedDFA");
-	}
-
-	void Visit(void*, const CompactNFA&) const {
-		throw exception::AlibException("Unsupported automaton type CompactNFA");
-	}
-
-	void Visit(void*, const OneTapeDTM&) const {
-		throw exception::AlibException("Unsupported automaton type OneTapeDTM");
-	}
-
-};
-
-class VisitableConstNondeterministicAutomatonBase : public VisitableAutomatonBase::const_visitor_type {
-public:
-	using VisitableAutomatonBase::const_visitor_type::Visit;
-
-	void Visit(void*, const DFTA&) const {
-		throw exception::AlibException("Unsupported automaton type DFTA");
-	}
-
-	void Visit(void*, const DFA&) const {
-		throw exception::AlibException("Unsupported automaton type DFA");
-	}
-
-	void Visit(void*, const DPDA&) const {
-		throw exception::AlibException("Unsupported automaton type DPDA");
-	}
-
-	void Visit(void*, const SinglePopDPDA&) const {
-		throw exception::AlibException("Unsupported automaton type SinglePopDPDA");
-	}
-
-	void Visit(void*, const InputDrivenDPDA&) const {
-		throw exception::AlibException("Unsupported automaton type InputDrivenDPDA");
-	}
-
-	void Visit(void*, const VisiblyPushdownDPDA&) const {
-		throw exception::AlibException("Unsupported automaton type VisiblyPushdownDPDA");
-	}
-
-	void Visit(void*, const RealTimeHeightDeterministicDPDA&) const {
-		throw exception::AlibException("Unsupported automaton type RealTimeHeightDeterministicDPDA");
-	}
-
-	void Visit(void*, const OneTapeDTM&) const {
-		throw exception::AlibException("Unsupported automaton type OneTapeDTM");
-	}
-};
-
-class VisitableConstDeterministicAutomatonBase : public VisitableAutomatonBase::const_visitor_type {
-public:
-	using VisitableAutomatonBase::const_visitor_type::Visit;
-
-	void Visit(void*, const NFTA&) const {
-		throw exception::AlibException("Unsupported automaton type NFTA");
-	}
-
-	void Visit(void*, const EpsilonNFA&) const {
-		throw exception::AlibException("Unsupported automaton type EpsilonNFA");
-	}
-
-	void Visit(void*, const MultiInitialStateNFA&) const {
-		throw exception::AlibException("Unsupported automaton type MultiInitialStateNFA");
-	}
-
-	void Visit(void*, const NFA&) const {
-		throw exception::AlibException("Unsupported automaton type NFA");
-	}
-
-	void Visit(void*, const ExtendedNFA&) const {
-		throw exception::AlibException("Unsupported automaton type ExtendedDFA");
-	}
-
-	void Visit(void*, const CompactNFA&) const {
-		throw exception::AlibException("Unsupported automaton type CompactNFA");
-	}
-
-	void Visit(void*, const InputDrivenNPDA&) const {
-		throw exception::AlibException("Unsupported automaton type InputDrivenNPDA");
-	}
-
-	void Visit(void*, const VisiblyPushdownNPDA&) const {
-		throw exception::AlibException("Unsupported automaton type VisiblyPushdownNPDA");
-	}
-
-	void Visit(void*, const RealTimeHeightDeterministicNPDA&) const {
-		throw exception::AlibException("Unsupported automaton type RealTimeHeightDeterministicNPDA");
-	}
-
-	void Visit(void*, const NPDA&) const {
-		throw exception::AlibException("Unsupported automaton type NPDA");
-	}
-
-	void Visit(void*, const SinglePopNPDA&) const {
-		throw exception::AlibException("Unsupported automaton type SinglePopNPDA");
-	}
-};
-
 } /* namespace automaton */
 
 namespace std {
diff --git a/alib2data/src/automaton/FSM/CompactNFA.h b/alib2data/src/automaton/FSM/CompactNFA.h
index a3cb9b232b..926b005b0c 100644
--- a/alib2data/src/automaton/FSM/CompactNFA.h
+++ b/alib2data/src/automaton/FSM/CompactNFA.h
@@ -24,7 +24,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class CompactNFA : public std::acceptor<CompactNFA, VisitableAutomatonBase, std::acceptor<CompactNFA, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialState, public InputAlphabet {
+class CompactNFA : public AutomatonBase, public SingleInitialState, public InputAlphabet {
 protected:
 	std::map<std::pair<State, string::LinearString>, std::set<State> > transitions;
 public:
diff --git a/alib2data/src/automaton/FSM/DFA.h b/alib2data/src/automaton/FSM/DFA.h
index 9e44df348e..2945d99ffd 100644
--- a/alib2data/src/automaton/FSM/DFA.h
+++ b/alib2data/src/automaton/FSM/DFA.h
@@ -20,7 +20,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class DFA : public std::acceptor<DFA, VisitableAutomatonBase, std::acceptor<DFA, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialState, public InputAlphabet {
+class DFA : public AutomatonBase, public SingleInitialState, public InputAlphabet {
 protected:
 	std::map<std::pair<State, alphabet::Symbol>, State> transitions;
 public:
diff --git a/alib2data/src/automaton/FSM/EpsilonNFA.h b/alib2data/src/automaton/FSM/EpsilonNFA.h
index ce0ba13859..f029a69a3c 100644
--- a/alib2data/src/automaton/FSM/EpsilonNFA.h
+++ b/alib2data/src/automaton/FSM/EpsilonNFA.h
@@ -25,7 +25,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton with epsilon transitions.
  */
-class EpsilonNFA : public std::acceptor<EpsilonNFA, VisitableAutomatonBase, std::acceptor<EpsilonNFA, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialState, public InputAlphabet {
+class EpsilonNFA : public AutomatonBase, public SingleInitialState, public InputAlphabet {
 protected:
 	std::map<std::pair<State, std::variant<string::Epsilon, alphabet::Symbol> >, std::set<State> > transitions;
 public:
diff --git a/alib2data/src/automaton/FSM/ExtendedNFA.h b/alib2data/src/automaton/FSM/ExtendedNFA.h
index e71d84e05e..42a7f65bdd 100644
--- a/alib2data/src/automaton/FSM/ExtendedNFA.h
+++ b/alib2data/src/automaton/FSM/ExtendedNFA.h
@@ -25,7 +25,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class ExtendedNFA : public std::acceptor<ExtendedNFA, VisitableAutomatonBase, std::acceptor<ExtendedNFA, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialState, public InputAlphabet {
+class ExtendedNFA : public AutomatonBase, public SingleInitialState, public InputAlphabet {
 protected:
 	std::map<std::pair<State, regexp::RegExp>, std::set<State> > transitions;
 public:
diff --git a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h
index fb3c3f4b6f..f4cb5568c5 100644
--- a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h
+++ b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h
@@ -22,7 +22,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class MultiInitialStateNFA : public std::acceptor<MultiInitialStateNFA, VisitableAutomatonBase, std::acceptor<MultiInitialStateNFA, alib::VisitableObjectBase, AutomatonBase> >, public MultiInitialStates, public InputAlphabet {
+class MultiInitialStateNFA : public AutomatonBase, public MultiInitialStates, public InputAlphabet {
 protected:
 	std::map<std::pair<State, alphabet::Symbol>, std::set<State> > transitions;
 public:
diff --git a/alib2data/src/automaton/FSM/NFA.h b/alib2data/src/automaton/FSM/NFA.h
index 2af963925f..8b6db5f9ae 100644
--- a/alib2data/src/automaton/FSM/NFA.h
+++ b/alib2data/src/automaton/FSM/NFA.h
@@ -22,7 +22,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class NFA : public std::acceptor<NFA, VisitableAutomatonBase, std::acceptor<NFA, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialState, public InputAlphabet {
+class NFA : public AutomatonBase, public SingleInitialState, public InputAlphabet {
 protected:
 	std::map<std::pair<State, alphabet::Symbol>, std::set<State> > transitions;
 public:
diff --git a/alib2data/src/automaton/PDA/DPDA.h b/alib2data/src/automaton/PDA/DPDA.h
index b752f42bc8..ebd2b29c15 100644
--- a/alib2data/src/automaton/PDA/DPDA.h
+++ b/alib2data/src/automaton/PDA/DPDA.h
@@ -28,7 +28,7 @@ namespace automaton {
  * if $\delta (q, a, \alpha) \neq \emptyset$, $\delta (q, a, \beta) \neq \emptyset$ and $\alpha \neq \beta$, then $\alpha$ is not suffix of $\beta$ and $\beta$ is not suffix of $\alpha$ (formally $\gamma \alpha \neq \beta and \alpha \neq \gamma \beta$).
  * if $\delta(q, a, \alpha) \neq \emptyset$, $\delta (q, \varepsilon, \beta) \neq \emptyset$, then $\alpha$ is not suffix of $\beta$ and $\beta$ is not suffix of $\alpha$ (fornally $\gamma \alpha \neq \beta and \alpha \neq \gamma \beta$).
  */
-class DPDA : public std::acceptor<DPDA, VisitableAutomatonBase, std::acceptor<DPDA, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
+class DPDA : public AutomatonBase, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
 protected:
 	std::map<std::tuple<State, std::variant<string::Epsilon, alphabet::Symbol>, std::vector<alphabet::Symbol> >, std::pair<State, std::vector<alphabet::Symbol> > > transitions;
 public:
diff --git a/alib2data/src/automaton/PDA/InputDrivenDPDA.h b/alib2data/src/automaton/PDA/InputDrivenDPDA.h
index df271582a4..6ee217375d 100644
--- a/alib2data/src/automaton/PDA/InputDrivenDPDA.h
+++ b/alib2data/src/automaton/PDA/InputDrivenDPDA.h
@@ -22,7 +22,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class InputDrivenDPDA : public std::acceptor<InputDrivenDPDA, VisitableAutomatonBase, std::acceptor<InputDrivenDPDA, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
+class InputDrivenDPDA : public AutomatonBase, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
 protected:
 	std::map<std::pair<State, alphabet::Symbol>, State> transitions;
 	std::map<alphabet::Symbol, std::pair<std::vector<alphabet::Symbol>, std::vector<alphabet::Symbol>>> inputSymbolToPushdownStoreOperation;
diff --git a/alib2data/src/automaton/PDA/InputDrivenNPDA.h b/alib2data/src/automaton/PDA/InputDrivenNPDA.h
index 8c43c4e394..535eaf125a 100644
--- a/alib2data/src/automaton/PDA/InputDrivenNPDA.h
+++ b/alib2data/src/automaton/PDA/InputDrivenNPDA.h
@@ -22,7 +22,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class InputDrivenNPDA : public std::acceptor<InputDrivenNPDA, VisitableAutomatonBase, std::acceptor<InputDrivenNPDA, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
+class InputDrivenNPDA : public AutomatonBase, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
 protected:
 	std::map<std::pair<State, alphabet::Symbol>, std::set<State> > transitions;
 	std::map<alphabet::Symbol, std::pair<std::vector<alphabet::Symbol>, std::vector<alphabet::Symbol>>> inputSymbolToPushdownStoreOperation;
diff --git a/alib2data/src/automaton/PDA/NPDA.h b/alib2data/src/automaton/PDA/NPDA.h
index 7244662dcd..d9f0b7be56 100644
--- a/alib2data/src/automaton/PDA/NPDA.h
+++ b/alib2data/src/automaton/PDA/NPDA.h
@@ -24,7 +24,7 @@ namespace automaton {
 /**
  * Push Down Automaton
  */
-class NPDA : public std::acceptor<NPDA, VisitableAutomatonBase, std::acceptor<NPDA, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
+class NPDA : public AutomatonBase, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
 protected:
 	std::map<std::tuple<State, std::variant<string::Epsilon, alphabet::Symbol>, std::vector<alphabet::Symbol> >, std::set<std::pair<State, std::vector<alphabet::Symbol> > > > transitions;
 public:
diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
index 49b2e433cc..b5b9da828c 100644
--- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
+++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
@@ -24,7 +24,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class RealTimeHeightDeterministicDPDA : public std::acceptor<RealTimeHeightDeterministicDPDA, VisitableAutomatonBase, std::acceptor<RealTimeHeightDeterministicDPDA, alib::VisitableObjectBase, AutomatonBase> >, public InputAlphabet, public SingleInitialState, public BottomOfTheStackSymbolPushdownStoreAlphabet {
+class RealTimeHeightDeterministicDPDA : public AutomatonBase, public InputAlphabet, public SingleInitialState, public BottomOfTheStackSymbolPushdownStoreAlphabet {
 protected:
 	std::map<std::pair<State, std::variant<string::Epsilon, alphabet::Symbol>>, std::pair<State, alphabet::Symbol> > callTransitions;
 	std::map<std::tuple<State, std::variant<string::Epsilon, alphabet::Symbol>, alphabet::Symbol>, State> returnTransitions;
diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h
index d15453710c..cb24b8f09b 100644
--- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h
+++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h
@@ -24,7 +24,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class RealTimeHeightDeterministicNPDA : public std::acceptor<RealTimeHeightDeterministicNPDA, VisitableAutomatonBase, std::acceptor<RealTimeHeightDeterministicNPDA, alib::VisitableObjectBase, AutomatonBase> >, public BottomOfTheStackSymbolPushdownStoreAlphabet, public MultiInitialStates, public InputAlphabet {
+class RealTimeHeightDeterministicNPDA : public AutomatonBase, public BottomOfTheStackSymbolPushdownStoreAlphabet, public MultiInitialStates, public InputAlphabet {
 protected:
 	std::map<std::pair<State, std::variant<string::Epsilon, alphabet::Symbol>>, std::set<std::pair<State, alphabet::Symbol> > > callTransitions;
 	std::map<std::tuple<State, std::variant<string::Epsilon, alphabet::Symbol>, alphabet::Symbol>, std::set<State> > returnTransitions;
diff --git a/alib2data/src/automaton/PDA/SinglePopDPDA.h b/alib2data/src/automaton/PDA/SinglePopDPDA.h
index 5358873005..ee81912b41 100644
--- a/alib2data/src/automaton/PDA/SinglePopDPDA.h
+++ b/alib2data/src/automaton/PDA/SinglePopDPDA.h
@@ -28,7 +28,7 @@ namespace automaton {
  * if $\delta (q, a, r) \neq \emptyset$, $\delta (q, a, s) \neq \emptyset$ then $r \neq s$.
  * if $\delta(q, a, r) \neq \emptyset$, $\delta (q, \varepsilon, s) \neq \emptyset$, then $r \neq s$.
  */
-class SinglePopDPDA: public std::acceptor<SinglePopDPDA, VisitableAutomatonBase, std::acceptor<SinglePopDPDA, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
+class SinglePopDPDA: public AutomatonBase, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
 protected:
 	std::map<std::tuple<State, std::variant<string::Epsilon, alphabet::Symbol>, alphabet::Symbol>, std::pair<State, std::vector<alphabet::Symbol> > > transitions;
 public:
diff --git a/alib2data/src/automaton/PDA/SinglePopNPDA.h b/alib2data/src/automaton/PDA/SinglePopNPDA.h
index 9fd14422df..9be2fce8e4 100644
--- a/alib2data/src/automaton/PDA/SinglePopNPDA.h
+++ b/alib2data/src/automaton/PDA/SinglePopNPDA.h
@@ -24,7 +24,7 @@ namespace automaton {
 /**
  * Push Down Automaton
  */
-class SinglePopNPDA: public std::acceptor<SinglePopNPDA, VisitableAutomatonBase, std::acceptor<SinglePopNPDA, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
+class SinglePopNPDA: public AutomatonBase, public SingleInitialSymbolPushdownStoreAlphabet, public SingleInitialState, public InputAlphabet {
 protected:
 	std::map<std::tuple<State, std::variant<string::Epsilon, alphabet::Symbol>, alphabet::Symbol>, std::set<std::pair<State, std::vector<alphabet::Symbol> > > > transitions;
 public:
diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
index 808cd906fc..0c5c76289f 100644
--- a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
+++ b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
@@ -22,7 +22,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class VisiblyPushdownDPDA : public std::acceptor<VisiblyPushdownDPDA, VisitableAutomatonBase, std::acceptor<VisiblyPushdownDPDA, alib::VisitableObjectBase, AutomatonBase> >, public CallReturnLocalInputAlphabet, public SingleInitialState, public BottomOfTheStackSymbolPushdownStoreAlphabet {
+class VisiblyPushdownDPDA : public AutomatonBase, public CallReturnLocalInputAlphabet, public SingleInitialState, public BottomOfTheStackSymbolPushdownStoreAlphabet {
 protected:
 	std::map<std::pair<State, alphabet::Symbol>, std::pair<State, alphabet::Symbol> > callTransitions;
 	std::map<std::tuple<State, alphabet::Symbol, alphabet::Symbol>, State > returnTransitions;
diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h
index 6f3d61ff6d..8e9f2e3c18 100644
--- a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h
+++ b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h
@@ -22,7 +22,7 @@ namespace automaton {
  * Represents Finite Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class VisiblyPushdownNPDA : public std::acceptor<VisiblyPushdownNPDA, VisitableAutomatonBase, std::acceptor<VisiblyPushdownNPDA, alib::VisitableObjectBase, AutomatonBase> >, public BottomOfTheStackSymbolPushdownStoreAlphabet, public MultiInitialStates, public CallReturnLocalInputAlphabet {
+class VisiblyPushdownNPDA : public AutomatonBase, public BottomOfTheStackSymbolPushdownStoreAlphabet, public MultiInitialStates, public CallReturnLocalInputAlphabet {
 protected:
 	std::map<std::pair<State, alphabet::Symbol>, std::set<std::pair<State, alphabet::Symbol> > > callTransitions;
 	std::map<std::tuple<State, alphabet::Symbol, alphabet::Symbol>, std::set<State> > returnTransitions;
diff --git a/alib2data/src/automaton/TA/DFTA.h b/alib2data/src/automaton/TA/DFTA.h
index 5edae22dc6..1e798a9ad8 100644
--- a/alib2data/src/automaton/TA/DFTA.h
+++ b/alib2data/src/automaton/TA/DFTA.h
@@ -21,7 +21,7 @@ namespace automaton {
  * Represents Finite Tree Automaton.
  * Can store nondeterministic finite automaton without epsilon transitions.
  */
-class DFTA : public std::acceptor<DFTA, VisitableAutomatonBase, std::acceptor<DFTA, alib::VisitableObjectBase, AutomatonBase> >, public States {
+class DFTA : public AutomatonBase, public States {
 protected:
 	std::set<alphabet::RankedSymbol> inputAlphabet;
 	std::map<std::pair<alphabet::RankedSymbol, std::vector<State> >, State > transitions;
diff --git a/alib2data/src/automaton/TA/NFTA.h b/alib2data/src/automaton/TA/NFTA.h
index ff7f41dea2..8dc1649931 100644
--- a/alib2data/src/automaton/TA/NFTA.h
+++ b/alib2data/src/automaton/TA/NFTA.h
@@ -23,7 +23,7 @@ namespace automaton {
  * Represents Finite Tree Automaton.
  * Can store nondeterministic finite tree automaton without epsilon transitions.
  */
-class NFTA : public std::acceptor<NFTA, VisitableAutomatonBase, std::acceptor<NFTA, alib::VisitableObjectBase, AutomatonBase> >, public States {
+class NFTA : public AutomatonBase, public States {
 protected:
 	std::set<alphabet::RankedSymbol> inputAlphabet;
 	std::map<std::pair<alphabet::RankedSymbol, std::vector<State> >, std::set<State> > transitions;
diff --git a/alib2data/src/automaton/TM/OneTapeDTM.h b/alib2data/src/automaton/TM/OneTapeDTM.h
index 66d508b3c1..a48e2bedb5 100644
--- a/alib2data/src/automaton/TM/OneTapeDTM.h
+++ b/alib2data/src/automaton/TM/OneTapeDTM.h
@@ -22,7 +22,7 @@ namespace automaton {
 /**
  * One tape turing machine
  */
-class OneTapeDTM : public std::acceptor<OneTapeDTM, VisitableAutomatonBase, std::acceptor<OneTapeDTM, alib::VisitableObjectBase, AutomatonBase> >, public SingleInitialState, public BlankSymbolInputTapeAlphabet {
+class OneTapeDTM : public AutomatonBase, public SingleInitialState, public BlankSymbolInputTapeAlphabet {
 protected:
 	std::map<std::pair<State, alphabet::Symbol>, std::tuple<State, alphabet::Symbol, Shift> > transitions;
 
diff --git a/alib2data/src/automaton/common/AutomatonFromXMLParser.h b/alib2data/src/automaton/common/AutomatonFromXMLParser.h
index 59e8d63af6..d7aa71f74a 100644
--- a/alib2data/src/automaton/common/AutomatonFromXMLParser.h
+++ b/alib2data/src/automaton/common/AutomatonFromXMLParser.h
@@ -17,6 +17,7 @@
 #include "../../regexp/RegExpFeatures.h"
 #include "../../alphabet/SymbolFeatures.h"
 #include "../../string/StringFeatures.h"
+#include "Shift.h"
 
 namespace automaton {
 
diff --git a/alib2data/src/container/ContainerBase.h b/alib2data/src/container/ContainerBase.h
index 1da3921ddc..cbfa54bd74 100644
--- a/alib2data/src/container/ContainerBase.h
+++ b/alib2data/src/container/ContainerBase.h
@@ -12,33 +12,11 @@
 
 namespace container {
 
-class ContainerBase;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-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 symbol in an alphabet.
  */
-class ContainerBase : public alib::ObjectBase, public VisitableContainerBase {
+class ContainerBase : public alib::ObjectBase {
 public:
-	using VisitableContainerBase::Accept;
-	using alib::VisitableObjectBase::Accept;
-
 	virtual ContainerBase* clone() const = 0;
 	virtual ContainerBase* plunder() && = 0;
 
diff --git a/alib2data/src/container/ObjectsMap.h b/alib2data/src/container/ObjectsMap.h
index e7ba63b26e..85dbb16e3a 100644
--- a/alib2data/src/container/ObjectsMap.h
+++ b/alib2data/src/container/ObjectsMap.h
@@ -23,7 +23,7 @@ namespace container {
  * Basic container from which are derived all other containers.
  * Contains reason why the container occured.
  */
-class ObjectsMap : public std::map<alib::Object, alib::Object>, public std::acceptor<ObjectsMap, VisitableContainerBase, std::acceptor<ObjectsMap, alib::VisitableObjectBase, ContainerBase> > {
+class ObjectsMap : public std::map<alib::Object, alib::Object>, public ContainerBase {
 public:
 	explicit ObjectsMap(std::map<alib::Object, alib::Object>);
 	explicit ObjectsMap();
diff --git a/alib2data/src/container/ObjectsPair.h b/alib2data/src/container/ObjectsPair.h
index 2c4365be89..d6eef9a0c2 100644
--- a/alib2data/src/container/ObjectsPair.h
+++ b/alib2data/src/container/ObjectsPair.h
@@ -22,7 +22,7 @@ namespace container {
  * Basic container from which are derived all other containers.
  * Contains reason why the container occured.
  */
-class ObjectsPair : public std::pair<alib::Object, alib::Object>, public std::acceptor<ObjectsPair, VisitableContainerBase, std::acceptor<ObjectsPair, alib::VisitableObjectBase, ContainerBase> > {
+class ObjectsPair : public std::pair<alib::Object, alib::Object>, public ContainerBase {
 public:
 	explicit ObjectsPair(alib::Object first, alib::Object second);
 	explicit ObjectsPair(std::pair<alib::Object, alib::Object>);
diff --git a/alib2data/src/container/ObjectsSet.h b/alib2data/src/container/ObjectsSet.h
index b84cca2ddc..b9f813742a 100644
--- a/alib2data/src/container/ObjectsSet.h
+++ b/alib2data/src/container/ObjectsSet.h
@@ -22,7 +22,7 @@ namespace container {
  * Basic container from which are derived all other containers.
  * Contains reason why the container occured.
  */
-class ObjectsSet : public std::set<alib::Object>, public std::acceptor<ObjectsSet, VisitableContainerBase, std::acceptor<ObjectsSet, alib::VisitableObjectBase, ContainerBase> > {
+class ObjectsSet : public std::set<alib::Object>, public ContainerBase {
 public:
 	explicit ObjectsSet(std::set<alib::Object>);
 	explicit ObjectsSet();
diff --git a/alib2data/src/container/ObjectsVector.h b/alib2data/src/container/ObjectsVector.h
index 33c091c127..3420a04644 100644
--- a/alib2data/src/container/ObjectsVector.h
+++ b/alib2data/src/container/ObjectsVector.h
@@ -22,7 +22,7 @@ namespace container {
  * Basic container from which are derived all other containers.
  * Contains reason why the container occured.
  */
-class ObjectsVector : public std::vector<alib::Object>, public std::acceptor<ObjectsVector, VisitableContainerBase, std::acceptor<ObjectsVector, alib::VisitableObjectBase, ContainerBase> > {
+class ObjectsVector : public std::vector<alib::Object>, public ContainerBase {
 public:
 	explicit ObjectsVector(std::vector<alib::Object>);
 	explicit ObjectsVector();
diff --git a/alib2data/src/exception/AlibException.h b/alib2data/src/exception/AlibException.h
index c7c4f248ad..3f17e24135 100644
--- a/alib2data/src/exception/AlibException.h
+++ b/alib2data/src/exception/AlibException.h
@@ -21,7 +21,7 @@ namespace exception {
  * Basic exception from which are derived all other exceptions.
  * Contains reason why the exception occured.
  */
-class AlibException : public std::exception, public std::acceptor<AlibException, alib::VisitableObjectBase, alib::ObjectBase> {
+class AlibException : public std::exception, public alib::ObjectBase {
 protected:
 	std::string cause;
 	std::string backtrace;
diff --git a/alib2data/src/grammar/ContextFree/CFG.h b/alib2data/src/grammar/ContextFree/CFG.h
index 52e74bcf8a..a638b22444 100644
--- a/alib2data/src/grammar/ContextFree/CFG.h
+++ b/alib2data/src/grammar/ContextFree/CFG.h
@@ -18,7 +18,7 @@ namespace grammar {
 /**
  * Context free grammar. Type 2 in Chomsky hierarchy. Produces context free language.
  */
-class CFG : public std::acceptor<CFG, VisitableGrammarBase, std::acceptor<CFG, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class CFG : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	std::map<alphabet::Symbol, std::set<std::vector<alphabet::Symbol>>> rules;
 
 public:
diff --git a/alib2data/src/grammar/ContextFree/CNF.h b/alib2data/src/grammar/ContextFree/CNF.h
index 9b1db2a4b0..e2344bd081 100644
--- a/alib2data/src/grammar/ContextFree/CNF.h
+++ b/alib2data/src/grammar/ContextFree/CNF.h
@@ -19,7 +19,7 @@ namespace grammar {
 /**
  * Context free grammar in chomsky normal form. Type 2 in Chomsky hierarchy. Produces context free languages.
  */
-class CNF : public std::acceptor<CNF, VisitableGrammarBase, std::acceptor<CNF, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class CNF : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	std::map<alphabet::Symbol, std::set<std::variant<alphabet::Symbol, std::pair<alphabet::Symbol, alphabet::Symbol>>>> rules;
 	bool generatesEpsilon;
 
diff --git a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
index b7c2066648..b868a0dd87 100644
--- a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
+++ b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h
@@ -18,7 +18,7 @@ namespace grammar {
 /**
  * Epsilon free context free grammar. Type 2 in Chomsky hierarchy. Produces context free languages.
  */
-class EpsilonFreeCFG : public std::acceptor<EpsilonFreeCFG, VisitableGrammarBase, std::acceptor<EpsilonFreeCFG, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class EpsilonFreeCFG : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	std::map<alphabet::Symbol, std::set<std::vector<alphabet::Symbol>>> rules;
 	bool generatesEpsilon;
 
diff --git a/alib2data/src/grammar/ContextFree/GNF.h b/alib2data/src/grammar/ContextFree/GNF.h
index d35ef82672..ca190d077e 100644
--- a/alib2data/src/grammar/ContextFree/GNF.h
+++ b/alib2data/src/grammar/ContextFree/GNF.h
@@ -18,7 +18,7 @@ namespace grammar {
 /**
  * Context free grammar in greibach normal form. Type 2 in Chomsky hierarchy. Produces context free languages.
  */
-class GNF : public std::acceptor<GNF, VisitableGrammarBase, std::acceptor<GNF, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class GNF : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	std::map<alphabet::Symbol, std::set<std::pair<alphabet::Symbol, std::vector<alphabet::Symbol> >> > rules;
 	bool generatesEpsilon;
 public:
diff --git a/alib2data/src/grammar/ContextFree/LG.h b/alib2data/src/grammar/ContextFree/LG.h
index 502a23ab95..395c94026c 100644
--- a/alib2data/src/grammar/ContextFree/LG.h
+++ b/alib2data/src/grammar/ContextFree/LG.h
@@ -20,7 +20,7 @@ namespace grammar {
 /**
  * Linear grammar in chomsky normal form. Type 3 in Chomsky hierarchy. Produces regular languages.
  */
-class LG : public std::acceptor<LG, VisitableGrammarBase, std::acceptor<LG, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class LG : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	std::map<alphabet::Symbol, std::set<std::variant<std::vector<alphabet::Symbol>, std::tuple<std::vector<alphabet::Symbol>, alphabet::Symbol, std::vector<alphabet::Symbol>> >> > rules;
 public:
 	explicit LG(alphabet::Symbol initialSymbol);
diff --git a/alib2data/src/grammar/ContextSensitive/CSG.h b/alib2data/src/grammar/ContextSensitive/CSG.h
index 7a56b8a81b..b0c85e09e0 100644
--- a/alib2data/src/grammar/ContextSensitive/CSG.h
+++ b/alib2data/src/grammar/ContextSensitive/CSG.h
@@ -18,7 +18,7 @@ namespace grammar {
 /**
  * Epsilon free context free grammar. Type 2 in Chomsky hierarchy. Produces context free languages.
  */
-class CSG : public std::acceptor<CSG, VisitableGrammarBase, std::acceptor<CSG, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class CSG : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	std::map<std::tuple<std::vector<alphabet::Symbol>, alphabet::Symbol, std::vector<alphabet::Symbol>>, std::set<std::vector<alphabet::Symbol>>> rules;
 	bool generatesEpsilon;
 
diff --git a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
index b9b029e240..c868985553 100644
--- a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
+++ b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h
@@ -18,7 +18,7 @@ namespace grammar {
 /**
  * Non contracting grammar. Type 1 in Chomsky hierarchy. Produces context sensitive language.
  */
-class NonContractingGrammar : public std::acceptor<NonContractingGrammar, VisitableGrammarBase, std::acceptor<NonContractingGrammar, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class NonContractingGrammar : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	std::map<std::vector<alphabet::Symbol>, std::set<std::vector<alphabet::Symbol>>> rules;
 	bool generatesEpsilon;
 
diff --git a/alib2data/src/grammar/GrammarBase.h b/alib2data/src/grammar/GrammarBase.h
index ff18bb2760..7e9bd58504 100644
--- a/alib2data/src/grammar/GrammarBase.h
+++ b/alib2data/src/grammar/GrammarBase.h
@@ -13,88 +13,15 @@
 
 namespace grammar {
 
-class GrammarBase;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-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;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
 /**
  * Represents symbol in an alphabet.
  */
-class GrammarBase : public alib::ObjectBase, public VisitableGrammarBase {
+class GrammarBase : public alib::ObjectBase {
 public:
-	using VisitableGrammarBase::Accept;
-	using alib::VisitableObjectBase::Accept;
-
 	virtual GrammarBase* clone() const = 0;
 	virtual GrammarBase* plunder() && = 0;
 };
 
-class VisitableConstRGBase : public VisitableGrammarBase::const_visitor_type {
-public:
-	using VisitableGrammarBase::const_visitor_type::Visit;
-
-	void Visit(void*, const grammar::ContextPreservingUnrestrictedGrammar&) const
-	{
-	    throw exception::AlibException("Unsupported grammar type ContextPreservingUnrestrictedGrammar");
-	}
-
-	void Visit(void*, const grammar::UnrestrictedGrammar&) const
-	{
-	    throw exception::AlibException("Unsupported grammar type UnrestrictedGrammar");
-	}
-
-	void Visit(void*, const grammar::CSG&) const
-	{
-	    throw exception::AlibException("Unsupported grammar type CSG");
-	}
-
-	void Visit(void*, const grammar::NonContractingGrammar&) const
-	{
-	    throw exception::AlibException("Unsupported grammar type NonContractingGrammar");
-	}
-
-	void Visit(void*, const grammar::CNF&) const
-	{
-	    throw exception::AlibException("Unsupported grammar type CNF");
-	}
-
-	void Visit(void*, const grammar::CFG&) const
-	{
-	    throw exception::AlibException("Unsupported grammar type CFG");
-	}
-
-	void Visit(void*, const grammar::EpsilonFreeCFG&) const
-	{
-	    throw exception::AlibException("Unsupported grammar type EpsilonFreeCFG");
-	}
-
-	void Visit(void*, const grammar::GNF&) const
-	{
-	    throw exception::AlibException("Unsupported grammar type GNF");
-	}
-
-	void Visit(void*, const grammar::LG&) const
-	{
-	    throw exception::AlibException("Unsupported grammar type LG");
-	}
-
-};
-
 } /* namespace grammar */
 
 namespace std {
diff --git a/alib2data/src/grammar/Regular/LeftLG.h b/alib2data/src/grammar/Regular/LeftLG.h
index 8173b08dc9..f88b385f6e 100644
--- a/alib2data/src/grammar/Regular/LeftLG.h
+++ b/alib2data/src/grammar/Regular/LeftLG.h
@@ -19,7 +19,7 @@ namespace grammar {
 /**
  * Left linear grammar in chomsky normal form. Type 3 in Chomsky hierarchy. Produces regular languages.
  */
-class LeftLG : public std::acceptor<LeftLG, VisitableGrammarBase, std::acceptor<LeftLG, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class LeftLG : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	std::map<alphabet::Symbol, std::set<std::variant<std::vector<alphabet::Symbol>, std::pair<alphabet::Symbol, std::vector<alphabet::Symbol>> >> > rules;
 
 public:
diff --git a/alib2data/src/grammar/Regular/LeftRG.h b/alib2data/src/grammar/Regular/LeftRG.h
index c7e50cdd3c..4980e6797a 100644
--- a/alib2data/src/grammar/Regular/LeftRG.h
+++ b/alib2data/src/grammar/Regular/LeftRG.h
@@ -28,7 +28,7 @@ namespace grammar {
  *
  * This definition has simplier handling of empty string generation and it is compatible with common definitions where the transformation from this definition to the common definition and backwards is trivial
  */
-class LeftRG : public std::acceptor<LeftRG, VisitableGrammarBase, std::acceptor<LeftRG, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class LeftRG : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	/**
 	 * Transition function as mapping from nonterminal symbol on the left hand side to set of either terminal symbols or doublets of terminal symbol and nonterminal symbol
 	 */
diff --git a/alib2data/src/grammar/Regular/RightLG.h b/alib2data/src/grammar/Regular/RightLG.h
index 7b38851e68..4db7497946 100644
--- a/alib2data/src/grammar/Regular/RightLG.h
+++ b/alib2data/src/grammar/Regular/RightLG.h
@@ -19,7 +19,7 @@ namespace grammar {
 /**
  * Right linear grammar in chomsky normal form. Type 3 in Chomsky hierarchy. Produces regular languages.
  */
-class RightLG : public std::acceptor<RightLG, VisitableGrammarBase, std::acceptor<RightLG, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class RightLG : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	std::map<alphabet::Symbol, std::set<std::variant<std::vector<alphabet::Symbol>, std::pair<std::vector<alphabet::Symbol>, alphabet::Symbol> >> > rules;
 
 public:
diff --git a/alib2data/src/grammar/Regular/RightRG.h b/alib2data/src/grammar/Regular/RightRG.h
index 4aa8f00a01..332fbf1fc6 100644
--- a/alib2data/src/grammar/Regular/RightRG.h
+++ b/alib2data/src/grammar/Regular/RightRG.h
@@ -28,7 +28,7 @@ namespace grammar {
  *
  * This definition has simplier handling of empty string generation and it is compatible with common definitions where the transformation from this definition to the common definition and backwards is trivial
  */
-class RightRG : public std::acceptor<RightRG, VisitableGrammarBase, std::acceptor<RightRG, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class RightRG : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	/**
 	 * Transition function as mapping from nonterminal symbol on the left hand side to set of either terminal symbols or doublets of terminal symbol and nonterminal symbol
 	 */
diff --git a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
index b1c172a786..6eb85a1b20 100644
--- a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
+++ b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h
@@ -18,7 +18,7 @@ namespace grammar {
 /**
  * Epsilon free context free grammar. Type 2 in Chomsky hierarchy. Produces context free languages.
  */
-class ContextPreservingUnrestrictedGrammar : public std::acceptor<ContextPreservingUnrestrictedGrammar, VisitableGrammarBase, std::acceptor<ContextPreservingUnrestrictedGrammar, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class ContextPreservingUnrestrictedGrammar : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	std::map<std::tuple<std::vector<alphabet::Symbol>, alphabet::Symbol, std::vector<alphabet::Symbol>>, std::set<std::vector<alphabet::Symbol>>> rules;
 
 public:
diff --git a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
index f89958197a..9655bb1441 100644
--- a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
+++ b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h
@@ -18,7 +18,7 @@ namespace grammar {
 /**
  * Unrestricted grammar. Type 0 in Chomsky hierarchy. Produces recursively enumerable language.
  */
-class UnrestrictedGrammar : public std::acceptor<UnrestrictedGrammar, VisitableGrammarBase, std::acceptor<UnrestrictedGrammar, alib::VisitableObjectBase, GrammarBase> >, public TerminalNonterminalAlphabetInitialSymbol {
+class UnrestrictedGrammar : public GrammarBase, public TerminalNonterminalAlphabetInitialSymbol {
 	std::map<std::vector<alphabet::Symbol>, std::set<std::vector<alphabet::Symbol>>> rules;
 
 public:
diff --git a/alib2data/src/graph/GraphBase.h b/alib2data/src/graph/GraphBase.h
index c14e716ffa..595ffd9f98 100644
--- a/alib2data/src/graph/GraphBase.h
+++ b/alib2data/src/graph/GraphBase.h
@@ -13,33 +13,11 @@
 
 namespace graph {
 
-class GraphBase;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-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 {
+class GraphBase : public alib::ObjectBase {
 public:
-	using VisitableGraphBase::Accept;
-	using alib::VisitableObjectBase::Accept;
-
 	virtual GraphBase* clone() const = 0;
 	virtual GraphBase* plunder() && = 0;
 };
diff --git a/alib2data/src/graph/directed/DirectedGraph.h b/alib2data/src/graph/directed/DirectedGraph.h
index 6acc1ae04d..ed7428d241 100644
--- a/alib2data/src/graph/directed/DirectedGraph.h
+++ b/alib2data/src/graph/directed/DirectedGraph.h
@@ -21,8 +21,7 @@ namespace graph {
 
 class IDirectedGraph;
 
-class DirectedGraph : public std::acceptor<DirectedGraph, VisitableGraphBase, std::acceptor<DirectedGraph, alib::VisitableObjectBase, GraphBase>>
-{
+class DirectedGraph : public GraphBase {
 public:
 	explicit DirectedGraph(REPRESENTATION representation = REPRESENTATION::ADJACENCY_LIST);
 	~DirectedGraph() noexcept;
diff --git a/alib2data/src/graph/undirected/UndirectedGraph.h b/alib2data/src/graph/undirected/UndirectedGraph.h
index 8f2cf2e789..c7a803a186 100644
--- a/alib2data/src/graph/undirected/UndirectedGraph.h
+++ b/alib2data/src/graph/undirected/UndirectedGraph.h
@@ -21,8 +21,7 @@ namespace graph {
 
 class IUndirectedGraph;
 
-class UndirectedGraph : public std::acceptor<UndirectedGraph, VisitableGraphBase, std::acceptor<UndirectedGraph, alib::VisitableObjectBase, GraphBase>>
-{
+class UndirectedGraph : public GraphBase {
 public:
 	explicit UndirectedGraph(REPRESENTATION representation = REPRESENTATION::ADJACENCY_LIST);
 	~UndirectedGraph() noexcept;
diff --git a/alib2data/src/label/HexavigesimalLabel.h b/alib2data/src/label/HexavigesimalLabel.h
index cb47a20ff5..4f84514721 100644
--- a/alib2data/src/label/HexavigesimalLabel.h
+++ b/alib2data/src/label/HexavigesimalLabel.h
@@ -17,7 +17,7 @@ namespace label {
 /**
  * Represents symbol in an alphabet.
  */
-class HexavigesimalLabel : public std::acceptor<HexavigesimalLabel, VisitableLabelBase, std::acceptor<HexavigesimalLabel, alib::VisitableObjectBase, LabelBase> > {
+class HexavigesimalLabel : public LabelBase {
 protected:
 	int hexavigesimal;
 
diff --git a/alib2data/src/label/LabelBase.h b/alib2data/src/label/LabelBase.h
index 0f06d2cec1..88e4b9d9f6 100644
--- a/alib2data/src/label/LabelBase.h
+++ b/alib2data/src/label/LabelBase.h
@@ -12,33 +12,11 @@
 
 namespace label {
 
-class LabelBase;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-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;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
 /**
  * Represents symbol in an alphabet.
  */
-class LabelBase : public alib::ObjectBase, public VisitableLabelBase {
+class LabelBase : public alib::ObjectBase {
 public:
-	using VisitableLabelBase::Accept;
-	using alib::VisitableObjectBase::Accept;
-
 	virtual LabelBase* clone() const = 0;
 	virtual LabelBase* plunder() && = 0;
 
diff --git a/alib2data/src/label/LabelPairLabel.h b/alib2data/src/label/LabelPairLabel.h
index ce96645b61..cbace15664 100644
--- a/alib2data/src/label/LabelPairLabel.h
+++ b/alib2data/src/label/LabelPairLabel.h
@@ -16,7 +16,7 @@ namespace label {
 /**
  * Represents symbol in an alphabet.
  */
-class LabelPairLabel : public std::acceptor<LabelPairLabel, VisitableLabelBase, std::acceptor<LabelPairLabel, alib::VisitableObjectBase, LabelBase> > {
+class LabelPairLabel : public LabelBase {
 protected:
 	std::pair<Label, Label> label;
 
diff --git a/alib2data/src/label/LabelSetLabel.h b/alib2data/src/label/LabelSetLabel.h
index 663bc97965..9f1ebed6ee 100644
--- a/alib2data/src/label/LabelSetLabel.h
+++ b/alib2data/src/label/LabelSetLabel.h
@@ -16,7 +16,7 @@ namespace label {
 /**
  * Represents symbol in an alphabet.
  */
-class LabelSetLabel : public std::acceptor<LabelSetLabel, VisitableLabelBase, std::acceptor<LabelSetLabel, alib::VisitableObjectBase, LabelBase> > {
+class LabelSetLabel : public LabelBase {
 protected:
 	std::set<Label> label;
 
diff --git a/alib2data/src/label/ObjectLabel.h b/alib2data/src/label/ObjectLabel.h
index 9339583765..daccedf3b3 100644
--- a/alib2data/src/label/ObjectLabel.h
+++ b/alib2data/src/label/ObjectLabel.h
@@ -17,7 +17,7 @@ namespace label {
 /**
  * Represents symbol in an alphabet.
  */
-class ObjectLabel : public std::acceptor<ObjectLabel, VisitableLabelBase, std::acceptor<ObjectLabel, alib::VisitableObjectBase, LabelBase> > {
+class ObjectLabel : public LabelBase {
 protected:
 	alib::Object label;
 
diff --git a/alib2data/src/label/PrimitiveLabel.h b/alib2data/src/label/PrimitiveLabel.h
index 9e4e52410e..63ab2adf92 100644
--- a/alib2data/src/label/PrimitiveLabel.h
+++ b/alib2data/src/label/PrimitiveLabel.h
@@ -17,7 +17,7 @@ namespace label {
 /**
  * Represents symbol in an alphabet.
  */
-class PrimitiveLabel : public std::acceptor<PrimitiveLabel, VisitableLabelBase, std::acceptor<PrimitiveLabel, alib::VisitableObjectBase, LabelBase> > {
+class PrimitiveLabel : public LabelBase {
 protected:
 	primitive::Primitive primitive;
 
diff --git a/alib2data/src/label/UniqueLabel.h b/alib2data/src/label/UniqueLabel.h
index d7af480152..c1382e5df4 100644
--- a/alib2data/src/label/UniqueLabel.h
+++ b/alib2data/src/label/UniqueLabel.h
@@ -16,7 +16,7 @@ namespace label {
 /**
  * Represents symbol in an alphabet.
  */
-class UniqueLabel : public std::acceptor<UniqueLabel, VisitableLabelBase, std::acceptor<UniqueLabel, alib::VisitableObjectBase, LabelBase> > {
+class UniqueLabel : public LabelBase {
 protected:
 	Label label;
 	primitive::Integer id;
diff --git a/alib2data/src/object/ObjectBase.h b/alib2data/src/object/ObjectBase.h
index 5a8f68ec75..84bd572006 100644
--- a/alib2data/src/object/ObjectBase.h
+++ b/alib2data/src/object/ObjectBase.h
@@ -8,101 +8,15 @@
 #ifndef OBJECT_BASE_H_
 #define OBJECT_BASE_H_
 
-#include "../common/visitor.hpp"
 #include <compare>
 #include <memory>
 #include <deque>
 #include "../common/base.hpp"
 #include "../sax/Token.h"
 
-
-#include "ObjectFeatures.h"
-#include "../exception/ExceptionFeatures.h"
-#include "../automaton/AutomatonFeatures.h"
-#include "../grammar/GrammarFeatures.h"
-#include "../graph/GraphFeatures.h"
-#include "../label/LabelFeatures.h"
-#include "../regexp/RegExpFeatures.h"
-#include "../string/StringFeatures.h"
-#include "../alphabet/SymbolFeatures.h"
-#include "../container/ContainerFeatures.h"
-#include "../primitive/PrimitiveFeatures.h"
-#include "../tree/TreeFeatures.h"
-
 namespace alib {
 
-// ----------------------------------------------------------------------------------------------------------------------
-
-typedef std::tuple< tree::RankedTree, tree::RankedPattern, tree::PrefixRankedTree, tree::PrefixRankedBarTree, tree::PrefixRankedPattern, tree::PrefixRankedBarPattern, tree::UnrankedTree, tree::UnrankedPattern
-	> 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::VariablesBarSymbol, 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;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-class ObjectBase;
-
-template<typename T>
-class acceptor_base_helper {
-};
-
-template<typename ... Ts>
-class acceptor_base_helper< std::tuple< Ts ... > > :
-	public std::acceptor_base<
-			ObjectBase, Ts ...
-	> {
-};
-
-typedef acceptor_base_helper< Types > VisitableObjectBase;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-class ObjectBase : public alib::base<ObjectBase>, public VisitableObjectBase, public std::cow_shared_ptr_base {
+class ObjectBase : public alib::base<ObjectBase>, public std::cow_shared_ptr_base {
 public:
 	virtual void compose(std::deque<sax::Token>& out) const = 0;
 };
diff --git a/alib2data/src/object/Void.h b/alib2data/src/object/Void.h
index 6b0356fa0f..4979d3f0cf 100644
--- a/alib2data/src/object/Void.h
+++ b/alib2data/src/object/Void.h
@@ -17,7 +17,7 @@ namespace alib {
 /**
  * Represents void.
  */
-class Void : public std::acceptor<Void, VisitableObjectBase, ObjectBase> {
+class Void : public ObjectBase {
 public:
 	/**
 	 * Creates a blank symbol.
diff --git a/alib2data/src/primitive/Bool.h b/alib2data/src/primitive/Bool.h
index f6327aeaa6..966a021152 100644
--- a/alib2data/src/primitive/Bool.h
+++ b/alib2data/src/primitive/Bool.h
@@ -16,7 +16,7 @@ namespace primitive {
 /**
  * Represents symbol in an alphabet.
  */
-class Bool : public std::acceptor<Bool, VisitablePrimitiveBase, std::acceptor<Bool, alib::VisitableObjectBase, PrimitiveBase> > {
+class Bool : public PrimitiveBase {
 protected:
 	bool data;
 
diff --git a/alib2data/src/primitive/Character.h b/alib2data/src/primitive/Character.h
index 86793544ab..2966b10d85 100644
--- a/alib2data/src/primitive/Character.h
+++ b/alib2data/src/primitive/Character.h
@@ -16,7 +16,7 @@ namespace primitive {
 /**
  * Represents symbol in an alphabet.
  */
-class Character : public std::acceptor<Character, VisitablePrimitiveBase, std::acceptor<Character, alib::VisitableObjectBase, PrimitiveBase> > {
+class Character : public PrimitiveBase {
 protected:
 	char data;
 
diff --git a/alib2data/src/primitive/Integer.h b/alib2data/src/primitive/Integer.h
index d3e96631fc..8f9ce18bf7 100644
--- a/alib2data/src/primitive/Integer.h
+++ b/alib2data/src/primitive/Integer.h
@@ -16,7 +16,7 @@ namespace primitive {
 /**
  * Represents symbol in an alphabet.
  */
-class Integer : public std::acceptor<Integer, VisitablePrimitiveBase, std::acceptor<Integer, alib::VisitableObjectBase, PrimitiveBase> > {
+class Integer : public PrimitiveBase {
 protected:
 	int data;
 
diff --git a/alib2data/src/primitive/PrimitiveBase.h b/alib2data/src/primitive/PrimitiveBase.h
index aa0c3df9f2..f2529e99b0 100644
--- a/alib2data/src/primitive/PrimitiveBase.h
+++ b/alib2data/src/primitive/PrimitiveBase.h
@@ -14,33 +14,11 @@
 
 namespace primitive {
 
-class PrimitiveBase;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-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;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
 /**
  * Represents symbol in an alphabet.
  */
-class PrimitiveBase : public alib::ObjectBase, public VisitablePrimitiveBase {
+class PrimitiveBase : public alib::ObjectBase {
 public:
-	using VisitablePrimitiveBase::Accept;
-	using alib::VisitableObjectBase::Accept;
-
 	virtual PrimitiveBase* clone() const = 0;
 	virtual PrimitiveBase* plunder() && = 0;
 
diff --git a/alib2data/src/primitive/String.h b/alib2data/src/primitive/String.h
index 668103f180..d9b02f7e44 100644
--- a/alib2data/src/primitive/String.h
+++ b/alib2data/src/primitive/String.h
@@ -17,7 +17,7 @@ namespace primitive {
 /**
  * Represents symbol in an alphabet.
  */
-class String : public std::acceptor<String, VisitablePrimitiveBase, std::acceptor<String, alib::VisitableObjectBase, PrimitiveBase> > {
+class String : public PrimitiveBase {
 protected:
 	std::string data;
 
diff --git a/alib2data/src/primitive/Unsigned.h b/alib2data/src/primitive/Unsigned.h
index 5b280ed7ae..27d4ffd6c6 100644
--- a/alib2data/src/primitive/Unsigned.h
+++ b/alib2data/src/primitive/Unsigned.h
@@ -16,7 +16,7 @@ namespace primitive {
 /**
  * Represents symbol in an alphabet.
  */
-class Unsigned : public std::acceptor<Unsigned, VisitablePrimitiveBase, std::acceptor<Unsigned, alib::VisitableObjectBase, PrimitiveBase> > {
+class Unsigned : public PrimitiveBase {
 protected:
 	unsigned data;
 
diff --git a/alib2data/src/regexp/RegExpBase.h b/alib2data/src/regexp/RegExpBase.h
index d9c4eff8da..412b7ca4c9 100644
--- a/alib2data/src/regexp/RegExpBase.h
+++ b/alib2data/src/regexp/RegExpBase.h
@@ -10,36 +10,15 @@
 
 #include "../object/ObjectBase.h"
 #include <set>
+#include "../alphabet/Symbol.h"
 
 namespace regexp {
 
-class RegExpBase;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-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;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
 /**
  * Represents symbol in an alphabet.
  */
-class RegExpBase : public alib::ObjectBase, public VisitableRegExpBase {
+class RegExpBase : public alib::ObjectBase {
 public:
-	using VisitableRegExpBase::Accept;
-	using alib::VisitableObjectBase::Accept;
-
 	virtual RegExpBase* clone() const = 0;
 	virtual RegExpBase* plunder() && = 0;
 
diff --git a/alib2data/src/regexp/formal/FormalRegExp.h b/alib2data/src/regexp/formal/FormalRegExp.h
index fcc1e706cf..617e12cd70 100644
--- a/alib2data/src/regexp/formal/FormalRegExp.h
+++ b/alib2data/src/regexp/formal/FormalRegExp.h
@@ -19,12 +19,13 @@
 namespace regexp {
 
 class FormalRegExpElement;
+class UnboundedRegExp;
 
 /**
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a tree of RegExpElement.
  */
-class FormalRegExp : public std::acceptor<FormalRegExp, VisitableRegExpBase, std::acceptor<FormalRegExp, alib::VisitableObjectBase, RegExpBase> >, public RegExpAlphabet {
+class FormalRegExp : public RegExpBase, public RegExpAlphabet {
 protected:
 	FormalRegExpElement* regExp;
 
diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExp.h b/alib2data/src/regexp/unbounded/UnboundedRegExp.h
index c8406cf7e1..4b005b4fce 100644
--- a/alib2data/src/regexp/unbounded/UnboundedRegExp.h
+++ b/alib2data/src/regexp/unbounded/UnboundedRegExp.h
@@ -19,12 +19,13 @@
 namespace regexp {
 
 class UnboundedRegExpElement;
+class FormalRegExp;
 
 /**
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a tree of RegExpElement.
  */
-class UnboundedRegExp : public std::acceptor<UnboundedRegExp, VisitableRegExpBase, std::acceptor<UnboundedRegExp, alib::VisitableObjectBase, RegExpBase> >, public RegExpAlphabet {
+class UnboundedRegExp : public RegExpBase, public RegExpAlphabet {
 protected:
 	UnboundedRegExpElement* regExp;
 
diff --git a/alib2data/src/string/CyclicString.h b/alib2data/src/string/CyclicString.h
index 87b5183eaa..a491125a3c 100644
--- a/alib2data/src/string/CyclicString.h
+++ b/alib2data/src/string/CyclicString.h
@@ -23,7 +23,7 @@ namespace string {
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a tree of CyclicStringElement.
  */
-class CyclicString : public std::acceptor<CyclicString, VisitableStringBase, std::acceptor<CyclicString, alib::VisitableObjectBase, StringBase> >, public StringAlphabet {
+class CyclicString : public StringBase, public StringAlphabet {
 	std::vector<alphabet::Symbol> m_Data;
 public:
 	explicit CyclicString();
diff --git a/alib2data/src/string/Epsilon.h b/alib2data/src/string/Epsilon.h
index 5d39ffa901..9ed52e012d 100644
--- a/alib2data/src/string/Epsilon.h
+++ b/alib2data/src/string/Epsilon.h
@@ -22,7 +22,7 @@ namespace string {
  * Represents epsilon. Regular expression is stored
  * as a tree of EpsilonElement.
  */
-class Epsilon : public std::acceptor<Epsilon, VisitableStringBase, std::acceptor<Epsilon, alib::VisitableObjectBase, StringBase> >, public StringAlphabet {
+class Epsilon : public StringBase, public StringAlphabet {
 public:
 	Epsilon();
 
diff --git a/alib2data/src/string/LinearString.h b/alib2data/src/string/LinearString.h
index 8d68d418ff..2c1e6a4da7 100644
--- a/alib2data/src/string/LinearString.h
+++ b/alib2data/src/string/LinearString.h
@@ -25,7 +25,7 @@ namespace string {
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a tree of LinearStringElement.
  */
-class LinearString : public std::acceptor<LinearString, VisitableStringBase, std::acceptor<LinearString, alib::VisitableObjectBase, StringBase> >, public StringAlphabet {
+class LinearString : public StringBase, public StringAlphabet {
 	std::vector<alphabet::Symbol> m_Data;
 
 public:
diff --git a/alib2data/src/string/StringBase.h b/alib2data/src/string/StringBase.h
index 4f13ec4119..861f2f82d1 100644
--- a/alib2data/src/string/StringBase.h
+++ b/alib2data/src/string/StringBase.h
@@ -14,33 +14,11 @@
 
 namespace string {
 
-class StringBase;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-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 symbol in an alphabet.
  */
-class StringBase : public alib::ObjectBase, public VisitableStringBase {
+class StringBase : public alib::ObjectBase {
 public:
-	using VisitableStringBase::Accept;
-	using alib::VisitableObjectBase::Accept;
-
 	virtual StringBase* clone() const = 0;
 	virtual StringBase* plunder() && = 0;
 
diff --git a/alib2data/src/tree/TreeBase.h b/alib2data/src/tree/TreeBase.h
index 0dc1cd5222..110507cf4b 100644
--- a/alib2data/src/tree/TreeBase.h
+++ b/alib2data/src/tree/TreeBase.h
@@ -12,33 +12,11 @@
 
 namespace tree {
 
-class TreeBase;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
-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;
-
-// ----------------------------------------------------------------------------------------------------------------------
-
 /**
  * Represents symbol in an alphabet.
  */
-class TreeBase : public alib::ObjectBase, public VisitableTreeBase {
+class TreeBase : public alib::ObjectBase {
 public:
-	using VisitableTreeBase::Accept;
-	using alib::VisitableObjectBase::Accept;
-
 	virtual TreeBase* clone() const = 0;
 	virtual TreeBase* plunder() && = 0;
 };
diff --git a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h
index 920b6cd641..65edc24798 100644
--- a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h
+++ b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h
@@ -18,11 +18,13 @@
 
 namespace tree {
 
+class RankedPattern;
+
 /**
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a tree of LinearStringElement.
  */
-class PrefixRankedBarPattern : public std::acceptor<PrefixRankedBarPattern, VisitableTreeBase, std::acceptor<PrefixRankedBarPattern, alib::VisitableObjectBase, TreeBase> >, public RankedPatternAlphabet {
+class PrefixRankedBarPattern : public TreeBase, public RankedPatternAlphabet {
 	std::vector<alphabet::RankedSymbol> m_Data;
 
 	alphabet::Symbol bar;
diff --git a/alib2data/src/tree/ranked/PrefixRankedBarTree.h b/alib2data/src/tree/ranked/PrefixRankedBarTree.h
index b3b1e4d9ec..c8b5891a64 100644
--- a/alib2data/src/tree/ranked/PrefixRankedBarTree.h
+++ b/alib2data/src/tree/ranked/PrefixRankedBarTree.h
@@ -18,11 +18,13 @@
 
 namespace tree {
 
+class RankedTree;
+
 /**
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a tree of LinearStringElement.
  */
-class PrefixRankedBarTree : public std::acceptor<PrefixRankedBarTree, VisitableTreeBase, std::acceptor<PrefixRankedBarTree, alib::VisitableObjectBase, TreeBase> >, public RankedAlphabet {
+class PrefixRankedBarTree : public TreeBase, public RankedAlphabet {
 	std::vector<alphabet::RankedSymbol> m_Data;
 
 	alphabet::Symbol bar;
diff --git a/alib2data/src/tree/ranked/PrefixRankedPattern.h b/alib2data/src/tree/ranked/PrefixRankedPattern.h
index 7cb25ff45a..969bb9edd1 100644
--- a/alib2data/src/tree/ranked/PrefixRankedPattern.h
+++ b/alib2data/src/tree/ranked/PrefixRankedPattern.h
@@ -17,11 +17,13 @@
 
 namespace tree {
 
+class RankedPattern;
+
 /**
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a tree of LinearStringElement.
  */
-class PrefixRankedPattern : public std::acceptor<PrefixRankedPattern, VisitableTreeBase, std::acceptor<PrefixRankedPattern, alib::VisitableObjectBase, TreeBase> >, public RankedPatternAlphabet {
+class PrefixRankedPattern : public TreeBase, public RankedPatternAlphabet {
 	std::vector<alphabet::RankedSymbol> m_Data;
 
 public:
diff --git a/alib2data/src/tree/ranked/PrefixRankedTree.h b/alib2data/src/tree/ranked/PrefixRankedTree.h
index bc6c8aa986..461bca8fe0 100644
--- a/alib2data/src/tree/ranked/PrefixRankedTree.h
+++ b/alib2data/src/tree/ranked/PrefixRankedTree.h
@@ -17,11 +17,13 @@
 
 namespace tree {
 
+class RankedTree;
+
 /**
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a tree of LinearStringElement.
  */
-class PrefixRankedTree : public std::acceptor<PrefixRankedTree, VisitableTreeBase, std::acceptor<PrefixRankedTree, alib::VisitableObjectBase, TreeBase> >, public RankedAlphabet {
+class PrefixRankedTree : public TreeBase, public RankedAlphabet {
 	std::vector<alphabet::RankedSymbol> m_Data;
 
 public:
diff --git a/alib2data/src/tree/ranked/RankedPattern.h b/alib2data/src/tree/ranked/RankedPattern.h
index 34168327d5..d19277b855 100644
--- a/alib2data/src/tree/ranked/RankedPattern.h
+++ b/alib2data/src/tree/ranked/RankedPattern.h
@@ -19,12 +19,13 @@
 namespace tree {
 
 class RankedNode;
+class UnrankedPattern;
 
 /**
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a pattern of RegExpElement.
  */
-class RankedPattern : public std::acceptor<RankedPattern, VisitableTreeBase, std::acceptor<RankedPattern, alib::VisitableObjectBase, TreeBase> >, public RankedPatternAlphabet {
+class RankedPattern : public TreeBase, public RankedPatternAlphabet {
 protected:
 	RankedNode* pattern;
 
diff --git a/alib2data/src/tree/ranked/RankedTree.h b/alib2data/src/tree/ranked/RankedTree.h
index 6142570765..9c9eeedece 100644
--- a/alib2data/src/tree/ranked/RankedTree.h
+++ b/alib2data/src/tree/ranked/RankedTree.h
@@ -19,12 +19,13 @@
 namespace tree {
 
 class RankedNode;
+class UnrankedTree;
 
 /**
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a tree of RegExpElement.
  */
-class RankedTree : public std::acceptor<RankedTree, VisitableTreeBase, std::acceptor<RankedTree, alib::VisitableObjectBase, TreeBase> >, public RankedAlphabet {
+class RankedTree : public TreeBase, public RankedAlphabet {
 protected:
 	RankedNode* tree;
 
diff --git a/alib2data/src/tree/unranked/UnrankedPattern.h b/alib2data/src/tree/unranked/UnrankedPattern.h
index 9f43ddcc43..bcfea83bf5 100644
--- a/alib2data/src/tree/unranked/UnrankedPattern.h
+++ b/alib2data/src/tree/unranked/UnrankedPattern.h
@@ -19,12 +19,13 @@
 namespace tree {
 
 class UnrankedNode;
+class RankedPattern;
 
 /**
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a pattern of RegExpElement.
  */
-class UnrankedPattern : public std::acceptor<UnrankedPattern, VisitableTreeBase, std::acceptor<UnrankedPattern, alib::VisitableObjectBase, TreeBase> >, public UnrankedPatternAlphabet {
+class UnrankedPattern : public TreeBase, public UnrankedPatternAlphabet {
 protected:
 	UnrankedNode* pattern;
 
diff --git a/alib2data/src/tree/unranked/UnrankedTree.h b/alib2data/src/tree/unranked/UnrankedTree.h
index 2c14c8da75..732abc1dda 100644
--- a/alib2data/src/tree/unranked/UnrankedTree.h
+++ b/alib2data/src/tree/unranked/UnrankedTree.h
@@ -19,12 +19,13 @@
 namespace tree {
 
 class UnrankedNode;
+class RankedTree;
 
 /**
  * Represents regular expression parsed from the XML. Regular expression is stored
  * as a tree of RegExpElement.
  */
-class UnrankedTree : public std::acceptor<UnrankedTree, VisitableTreeBase, std::acceptor<UnrankedTree, alib::VisitableObjectBase, TreeBase> >, public UnrankedAlphabet {
+class UnrankedTree : public TreeBase, public UnrankedAlphabet {
 protected:
 	UnrankedNode* tree;
 
-- 
GitLab