Index: trunk/compiler/cppAst/ast/expressions/AccessExpression.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/AccessExpression.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/AccessExpression.hpp	(revision 2)
@@ -0,0 +1,52 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/BinaryOperator.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class AccessExpression final
+	: public BinaryOperator
+{
+protected:
+	AccessExpression():
+		BinaryOperator(ExpressionKind::Access)
+	{};
+	AccessExpression(const AccessExpression &toCopy):
+		BinaryOperator(toCopy)
+	{};
+
+	static AccessExpression* create(ExpressionKind){return new AccessExpression();}
+	static AccessExpression* createCopy(const AccessExpression& toCopy){return new AccessExpression(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/expressions/ListConstructor.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/ListConstructor.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/ListConstructor.hpp	(revision 2)
@@ -0,0 +1,105 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/TypeConstructionExpression.hpp>
+#include <ast/IScope.hpp>
+#include <deque>
+#include <ast/SymbolTable.hpp>
+#include <base/Exceptions.hpp>
+#include <string>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class ListConstructor final
+	: public TypeConstructionExpression
+	, public IScope
+{
+protected:
+	ExpressionList m_elements;
+	IScope* m_parentScope;
+	SymbolTable* m_comprehensionVars;
+	Expression* m_comprehension;
+	bool m_hasComprehension;
+
+	ListConstructor():
+		TypeConstructionExpression(ExpressionKind::ListConstr),
+		m_elements(),
+		m_parentScope(nullptr),
+		m_comprehensionVars(nullptr),
+		m_comprehension(nullptr),
+		m_hasComprehension(false)
+	{};
+	ListConstructor(const ListConstructor &toCopy):
+		TypeConstructionExpression(toCopy),
+		m_elements(toCopy.m_elements),
+		m_parentScope(toCopy.m_parentScope),
+		m_comprehensionVars(toCopy.m_comprehensionVars),
+		m_comprehension(toCopy.m_comprehension),
+		m_hasComprehension(toCopy.m_hasComprehension)
+	{};
+
+	static ListConstructor* create(ExpressionKind){return new ListConstructor();}
+	static ListConstructor* createCopy(const ListConstructor& toCopy){return new ListConstructor(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef, SymbolTable* symbTabRef,
+			ExpressionList* exprList, SymbolTable *symTab, IScope* parentScope,
+			Expression* comprehension, bool hasComprehension)
+	{
+		TypeConstructionExpression::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef);
+		m_elements = std::move(*exprList);
+		m_parentScope = parentScope;
+		m_comprehensionVars = symTab;
+		m_comprehension = comprehension;
+		m_hasComprehension = hasComprehension;
+	}
+
+
+	ExpressionList& elements() {return m_elements;};
+	Expression* comprehension() {return m_comprehension;};
+	bool hasComprehension() {return m_hasComprehension;};
+	SymbolTable* comprehensionVariables() {return m_comprehensionVars;};
+
+	void addElement(Expression* anElement) {m_elements.push_back(anElement);};
+	void setComprehension(Expression* comprehension) {m_comprehension = comprehension;};
+	void setHasComprehension(bool flag) {m_hasComprehension = flag;};
+
+	Identifier* resolveIdentifier(const std::string& aName) const override { return m_comprehensionVars->get(aName); };
+	IScope* getParentScope() const override {return m_parentScope;};
+	std::string getScopeName() const override {return "";}
+	void setParentScope(IScope* parentScope) override {m_parentScope = parentScope;};
+	void addIdentifier(Identifier* anIdentifier, void* ) override {m_comprehensionVars->addIdentifier(anIdentifier);};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+//	void setElements(std::deque<Expression*>& newElements) {};
+
+	IScope* asScope() final {return (IScope*) this;}
+};
+}
Index: trunk/compiler/LICENSE
===================================================================
--- trunk/compiler/LICENSE	(nonexistent)
+++ trunk/compiler/LICENSE	(revision 2)
@@ -0,0 +1,14 @@
+This is the BSD 3-Clause License.
+
+Copyright (c) 2015, AIT Austrian Institute of Technology, and Graz University of Technology
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+3. Neither the names of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: trunk/compiler/cppAst/ast/expressions/CallExpression.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/CallExpression.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/CallExpression.hpp	(revision 2)
@@ -0,0 +1,73 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/UnaryOperator.hpp>
+#include <ast/IAstVisitor.hpp>
+#include <deque>
+#include <ast/IScope.hpp>
+
+namespace Ast {
+
+class CallExpression final
+	: public UnaryOperator
+{
+private:
+	ExpressionList m_arguments;
+	IScope* m_callScope;
+
+	CallExpression():
+		UnaryOperator(ExpressionKind::Call),
+		m_arguments (),
+		m_callScope (nullptr)
+	{};
+	CallExpression(const CallExpression &toCopy):
+		UnaryOperator(toCopy),
+		m_arguments (toCopy.m_arguments),
+		m_callScope (toCopy.m_callScope)
+	{};
+
+	static CallExpression* create(ExpressionKind) {return new CallExpression();}
+	static CallExpression* createCopy(const CallExpression& toCopy) {return new CallExpression(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef, SymbolTable* symbTabRef,
+			Expression* child, ExpressionList* argumentList, IScope* scopeRef)
+	{
+		UnaryOperator::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef,child);
+		m_arguments = std::move(*argumentList);
+		m_callScope = scopeRef;
+	}
+
+	ExpressionList& arguments() {return m_arguments;};
+	IScope* scope() {return m_callScope;};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+	//void setArguments(ExpressionList& newArgs) {m_arguments = newArgs;};
+};
+}
Index: trunk/compiler/README
===================================================================
--- trunk/compiler/README	(nonexistent)
+++ trunk/compiler/README	(revision 2)
@@ -0,0 +1,40 @@
+
+              Object-Oriented Action System (OOAS) Compiler
+              =============================================
+
+This directory contains the source code to the OOAS-Compiler that is used in
+MoMuT::UML/OOAS. The compiler was originally written in C# at Graz University
+of Technology and has subsequently been ported to Java at the AIT Austrian In-
+stitute of Technology. See the LICENSE file for the exact terms the source is
+distributed under.
+
+Folder "licenses"
+~~~~~~~~~~~~~~~~~~~~~
+    This folder contains information about the licenses of other open source
+    software the OOAS Compiler builds on.
+
+Folder "ooasCompiler"
+~~~~~~~~~~~~~~~~~~~~~
+    This folder contains the up-to-date version of the OOAS compiler as used in
+    MoMuT::UML/OOAS. It is a full Eclipse Kepler (Java) project, ready to im-
+    port.
+
+Folder "ooasCompiler_tests"
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    This folder contains a small JUnit project and a few OOAS models to test.
+
+Folder "cppAst"
+~~~~~~~~~~~~~~~
+    This folder contains a C++ version of the AST classes including code to
+    de-serialize a serialized version of the AST. The de-/serialization code
+    relies on the Google Protocol Buffers library, see also the "serialization"
+    folder.
+    Please note that no self-compiling project is provided.
+
+Folder "serialization"
+~~~~~~~~~~~~~~~~~~~~~~
+    This folder contains the .proto files, which serve as input to the Google
+    Protocol Buffer Compiler.
+
+
+Vienna, Graz, 30th March 2015
Index: trunk/compiler/cppAst/ast/expressions/Expression.cpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/Expression.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/Expression.cpp	(revision 2)
@@ -0,0 +1,212 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#include "Expression.hpp"
+#include <ast/expressions/TernaryOperator.hpp>
+#include <ast/expressions/BinaryOperator.hpp>
+#include <ast/expressions/UnaryOperator.hpp>
+#include <ast/expressions/ForallQuantifier.hpp>
+#include <ast/expressions/ExistsQuantifier.hpp>
+#include <ast/expressions/ListConstructor.hpp>
+#include <ast/expressions/TupleConstructor.hpp>
+#include <ast/expressions/ObjectConstructor.hpp>
+#include <ast/expressions/IdentifierExpression.hpp>
+#include <ast/expressions/TypeExpression.hpp>
+#include <ast/expressions/TupleMapAccessExpression.hpp>
+#include <ast/expressions/CallExpression.hpp>
+#include <ast/expressions/AccessExpression.hpp>
+#include <ast/expressions/ValueExpression.hpp>
+#include <ast/expressions/SetConstructor.hpp>
+#include <ast/expressions/TupleMapAccessExpression.hpp>
+#include <ast/expressions/CallExpression.hpp>
+#include <ast/expressions/AccessExpression.hpp>
+
+namespace Ast {
+
+
+static void abstractError(ExpressionKind ) {
+	throw new Base::NotImplementedException();
+}
+
+
+
+Base::FuncPtr Expression::s_exprVmt [2][EXPRESSIONKIND_NR_ITEMS] =
+{
+		{
+			/* conditional = 0, */                 (Base::FuncPtr) &TernaryOperator::create,
+			/* domresby = 1, */                    (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* domresto = 2, */                    (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* rngresby = 3, */                    (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* rngresto = 4, */                    (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* munion = 5, */                      (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* conc = 6, */                        (Base::FuncPtr) &BinaryOperator::create,
+			/* diff = 7, */                        (Base::FuncPtr) &BinaryOperator::create,
+			/* inter = 8, */                       (Base::FuncPtr) &BinaryOperator::create,
+			/* elemin = 9, */                      (Base::FuncPtr) &BinaryOperator::create,
+			/* notelemin = 10, */                  (Base::FuncPtr) &BinaryOperator::create,
+			/* subset = 11, */                     (Base::FuncPtr) &BinaryOperator::create,
+			/* _union = 12, */                     (Base::FuncPtr) &BinaryOperator::create,
+			/* div = 13, */                        (Base::FuncPtr) &BinaryOperator::create,
+			/* greater = 14, */                    (Base::FuncPtr) &BinaryOperator::create,
+			/* greaterequal = 15, */               (Base::FuncPtr) &BinaryOperator::create,
+			/* idiv = 16, */                       (Base::FuncPtr) &BinaryOperator::create,
+			/* less = 17, */                       (Base::FuncPtr) &BinaryOperator::create,
+			/* lessequal = 18, */                  (Base::FuncPtr) &BinaryOperator::create,
+			/* minus = 19, */                      (Base::FuncPtr) &BinaryOperator::create,
+			/* mod = 20, */                        (Base::FuncPtr) &BinaryOperator::create,
+			/* pow = 21, */                        (Base::FuncPtr) &BinaryOperator::create,
+			/* prod = 22, */                       (Base::FuncPtr) &BinaryOperator::create,
+			/* sum = 23, */                        (Base::FuncPtr) &BinaryOperator::create,
+			/* _and = 24, */                       (Base::FuncPtr) &BinaryOperator::create,
+			/* biimplies = 25, */                  (Base::FuncPtr) &BinaryOperator::create,
+			/* implies = 26, */                    (Base::FuncPtr) &BinaryOperator::create,
+			/* _or = 27, */                        (Base::FuncPtr) &BinaryOperator::create,
+			/* equal = 28, */                      (Base::FuncPtr) &BinaryOperator::create,
+			/* notequal = 29, */                   (Base::FuncPtr) &BinaryOperator::create,
+			/* seqmod_mapoverride = 30, */         (Base::FuncPtr) &abstractError,
+			/* dom = 31, */                        (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* range = 32, */                      (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* merge = 33, */                      (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* card = 34, */                       (Base::FuncPtr) &UnaryOperator::create,
+			/* dconc = 35, */                      (Base::FuncPtr) &UnaryOperator::create,
+			/* dinter = 36, */                     (Base::FuncPtr) &UnaryOperator::create,
+			/* dunion = 37, */                     (Base::FuncPtr) &UnaryOperator::create,
+			/* elems = 38, */                      (Base::FuncPtr) &UnaryOperator::create,
+			/* head = 39, */                       (Base::FuncPtr) &UnaryOperator::create,
+			/* inds = 40, */                       (Base::FuncPtr) &UnaryOperator::create,
+			/* len = 41, */                        (Base::FuncPtr) &UnaryOperator::create,
+			/* tail = 42, */                       (Base::FuncPtr) &UnaryOperator::create,
+			/* unminus = 43, */                    (Base::FuncPtr) &UnaryOperator::create,
+			/* unplus = 44, */                     (Base::FuncPtr) &UnaryOperator::create,
+			/* _not = 45, */                       (Base::FuncPtr) &UnaryOperator::create,
+			/* abs = 46, */                        (Base::FuncPtr) &UnaryOperator::create,
+			/* forall = 47, */                     (Base::FuncPtr) &ForallQuantifier::create,
+			/* exists = 48, */                     (Base::FuncPtr) &ExistsQuantifier::create,
+			/* ListConstr = 49, */                 (Base::FuncPtr) &ListConstructor::create,
+			/* SetConstr = 50, */                  (Base::FuncPtr) &SetConstructor::create,
+			/* MapConstr = 51, */                  (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* TupleConstr = 52, */                (Base::FuncPtr) &TupleConstructor::create,
+			/* ObjectConstr = 53, */               (Base::FuncPtr) &ObjectConstructor::create,
+			/* QValConstr = 54, */                 (Base::FuncPtr) &abstractError,
+			/* Identifier = 55, */                 (Base::FuncPtr) &IdentifierExpression::create,
+			/* UnresolvedIdentifier = 56, */       (Base::FuncPtr) &abstractError,
+			/* Type = 57, */                       (Base::FuncPtr) &TypeExpression::create,
+			/* TupleMapAccess = 58, */             (Base::FuncPtr) &TupleMapAccessExpression::create,
+			/* Call = 59, */                       (Base::FuncPtr) &CallExpression::create,
+			/* Access = 60, */                     (Base::FuncPtr) &AccessExpression::create,
+			/* Primed = 61, */                     (Base::FuncPtr) &abstractError,
+			/* Cast = 62, */                       (Base::FuncPtr) &UnaryOperator::create,
+			/* foldLR = 63, */                     (Base::FuncPtr) &TernaryOperator::create,
+			/* foldRL = 64, */                     (Base::FuncPtr) &abstractError,
+			/* Value_Integer = 65, */              (Base::FuncPtr) &IntValueExpression::create,
+			/* Value_Bool = 66, */                 (Base::FuncPtr) &BoolValueExpression::create,
+			/* Value_Reference = 67, */            (Base::FuncPtr) &RefValueExpression::create
+		},
+		{
+			/* conditional = 0, */                 (Base::FuncPtr) &TernaryOperator::createCopy,
+			/* domresby = 1, */                    (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* domresto = 2, */                    (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* rngresby = 3, */                    (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* rngresto = 4, */                    (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* munion = 5, */                      (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* conc = 6, */                        (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* diff = 7, */                        (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* inter = 8, */                       (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* elemin = 9, */                      (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* notelemin = 10, */                  (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* subset = 11, */                     (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* _union = 12, */                     (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* div = 13, */                        (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* greater = 14, */                    (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* greaterequal = 15, */               (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* idiv = 16, */                       (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* less = 17, */                       (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* lessequal = 18, */                  (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* minus = 19, */                      (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* mod = 20, */                        (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* pow = 21, */                        (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* prod = 22, */                       (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* sum = 23, */                        (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* _and = 24, */                       (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* biimplies = 25, */                  (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* implies = 26, */                    (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* _or = 27, */                        (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* equal = 28, */                      (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* notequal = 29, */                   (Base::FuncPtr) &BinaryOperator::createCopy,
+			/* seqmod_mapoverride = 30, */         (Base::FuncPtr) &abstractError,
+			/* dom = 31, */                        (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* range = 32, */                      (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* merge = 33, */                      (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* card = 34, */                       (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* dconc = 35, */                      (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* dinter = 36, */                     (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* dunion = 37, */                     (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* elems = 38, */                      (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* head = 39, */                       (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* inds = 40, */                       (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* len = 41, */                        (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* tail = 42, */                       (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* unminus = 43, */                    (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* unplus = 44, */                     (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* _not = 45, */                       (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* abs = 46, */                        (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* forall = 47, */                     (Base::FuncPtr) &ForallQuantifier::createCopy,
+			/* exists = 48, */                     (Base::FuncPtr) &ExistsQuantifier::createCopy,
+			/* ListConstr = 49, */                 (Base::FuncPtr) &ListConstructor::createCopy,
+			/* SetConstr = 50, */                  (Base::FuncPtr) &SetConstructor::createCopy,
+			/* MapConstr = 51, */                  (Base::FuncPtr) &abstractError,  // ops on maps not supported
+			/* TupleConstr = 52, */                (Base::FuncPtr) &TupleConstructor::createCopy,
+			/* ObjectConstr = 53, */               (Base::FuncPtr) &ObjectConstructor::createCopy,
+			/* QValConstr = 54, */                 (Base::FuncPtr) &abstractError,
+			/* Identifier = 55, */                 (Base::FuncPtr) &IdentifierExpression::createCopy,
+			/* UnresolvedIdentifier = 56, */       (Base::FuncPtr) &abstractError,
+			/* Type = 57, */                       (Base::FuncPtr) &TypeExpression::createCopy,
+			/* TupleMapAccess = 58, */             (Base::FuncPtr) &TupleMapAccessExpression::createCopy,
+			/* Call = 59, */                       (Base::FuncPtr) &CallExpression::createCopy,
+			/* Access = 60, */                     (Base::FuncPtr) &AccessExpression::createCopy,
+			/* Primed = 61, */                     (Base::FuncPtr) &abstractError,
+			/* Cast = 62, */                       (Base::FuncPtr) &UnaryOperator::createCopy,
+			/* foldLR = 63, */                     (Base::FuncPtr) &TernaryOperator::createCopy,
+			/* foldRL = 64, */                     (Base::FuncPtr) &abstractError,
+			/* Value_Integer = 65, */              (Base::FuncPtr) &IntValueExpression::createCopy,
+			/* Value_Bool = 66, */                 (Base::FuncPtr) &BoolValueExpression::createCopy,
+			/* Value_Reference = 67, */            (Base::FuncPtr) &RefValueExpression::createCopy
+		}
+};
+
+
+Expression* Expression::createVirtual(ExpressionKind k) {
+	return (std::uint8_t)k < EXPRESSIONKIND_NR_ITEMS ? ((ConstrPtr)s_exprVmt[0][(std::uint8_t)k])(k) : nullptr;
+}
+
+Expression* Expression::createVirtual(const Expression& toCopy) {
+	std::uint8_t kind ((std::uint8_t)toCopy.kind());
+	return ((CopyConstrPtr)s_exprVmt[1][kind])(toCopy);
+}
+
+void Expression::accept(IAstVisitor& ) {
+	throw new Base::NotImplementedException();
+};
+
+}
Index: trunk/compiler/cppAst/ast/expressions/SetConstructor.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/SetConstructor.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/SetConstructor.hpp	(revision 2)
@@ -0,0 +1,107 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/TypeConstructionExpression.hpp>
+#include <ast/IScope.hpp>
+#include <ast/expressions/Expression.hpp>
+#include <ast/IAstVisitor.hpp>
+#include <ast/SymbolTable.hpp>
+#include <base/Exceptions.hpp>
+#include <ast/identifiers/Identifier.hpp>
+#include <deque>
+
+namespace Ast {
+
+class SetConstructor final
+	: public TypeConstructionExpression
+	, public IScope
+{
+protected:
+	ExpressionList m_items;
+	SymbolTable* m_comprehensionVars;
+	IScope* m_parentScope;
+	Expression* m_comprehension;
+	bool m_hasComprehension;
+
+	SetConstructor():
+		TypeConstructionExpression(ExpressionKind::SetConstr),
+		m_items (),
+		m_comprehensionVars (nullptr),
+		m_parentScope (nullptr),
+		m_comprehension (nullptr),
+		m_hasComprehension (false)
+	{};
+	SetConstructor(const SetConstructor &toCopy):
+		TypeConstructionExpression(toCopy),
+		m_items (toCopy.m_items),
+		m_comprehensionVars (toCopy.m_comprehensionVars),
+		m_parentScope (toCopy.m_parentScope),
+		m_comprehension (toCopy.m_comprehension),
+		m_hasComprehension (toCopy.m_hasComprehension)
+	{};
+
+	static SetConstructor* create(ExpressionKind) {return new SetConstructor();}
+	static SetConstructor* createCopy(const SetConstructor& toCopy) {return new SetConstructor(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef, SymbolTable* symbTabRef,
+			ExpressionList* exprList, SymbolTable *symTab, IScope* parentScope,
+			Expression* comprehension, bool hasComprehension)
+	{
+		TypeConstructionExpression::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef);
+		m_items = std::move(*exprList);
+		m_parentScope = parentScope;
+		m_comprehensionVars = symTab;
+		m_comprehension = comprehension;
+		m_hasComprehension = hasComprehension;
+	}
+
+
+
+	ExpressionList& items() {return m_items;}
+	Expression* comprehension() {return m_comprehension;}
+	bool hasComprehension() const {return m_hasComprehension;};
+	SymbolTable* comprehensionVariables() {return m_comprehensionVars;};
+
+	void addItem(Expression* anItem) {m_items.push_back(anItem);};
+	void setComprehension(Expression* anExpr) {m_comprehension = anExpr;};
+	void setHasComprehension(bool flag) {m_hasComprehension = flag;};
+	Identifier* resolveIdentifier(const string& aName) const override {return m_comprehensionVars->get(aName);};
+	IScope* getParentScope() const override {return m_parentScope;};
+	std::string getScopeName() const override {return "";}
+	void setParentScope(IScope* parentScope) override {m_parentScope = parentScope;};
+	void addIdentifier(Identifier* anIdentifier, void* ) override {m_comprehensionVars->addIdentifier(anIdentifier);};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+	//void setItems(ExpressionList& newItems) {m_items = newItems;};
+
+	IScope* asScope() final {return (IScope*) this;}
+};
+
+}
Index: trunk/compiler/cppAst/ast/Ast.cpp
===================================================================
--- trunk/compiler/cppAst/ast/Ast.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/Ast.cpp	(revision 2)
@@ -0,0 +1,234 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+/*
+ * Ast.cpp
+ *
+ *  Created on: Jan 27, 2014
+ *      Author: willibald
+ */
+
+#include "Ast.hpp"
+
+#include <ast/identifiers/TypeIdentifier.hpp>
+#include <ast/identifiers/EnumIdentifier.hpp>
+#include <ast/identifiers/AttributeIdentifier.hpp>
+#include <ast/identifiers/LocalVariableIdentifier.hpp>
+#include <ast/identifiers/ParameterIdentifier.hpp>
+#include <ast/identifiers/ExpressionVariableIdentifier.hpp>
+#include <ast/identifiers/MethodIdentifier.hpp>
+#include <ast/identifiers/NamedActionIdentifier.hpp>
+#include <ast/identifiers/Module.hpp>
+#include <ast/identifiers/ConstantIdentifier.hpp>
+#include <ast/types/IntType.hpp>
+#include <ast/types/BoolType.hpp>
+#include <ast/types/EnumType.hpp>
+#include <ast/types/ValuedEnumType.hpp>
+#include <ast/types/ListType.hpp>
+#include <ast/types/TupleType.hpp>
+#include <ast/types/NullType.hpp>
+#include <ast/types/FunctionType.hpp>
+#include <ast/types/ActionSystemType.hpp>
+#include <ast/statements/GuardedCommand.hpp>
+#include <ast/statements/Call.hpp>
+#include <ast/statements/Assignment.hpp>
+#include <ast/statements/SeqBlock.hpp>
+#include <ast/statements/NondetBlock.hpp>
+#include <ast/statements/PrioBlock.hpp>
+#include <ast/statements/Skip.hpp>
+#include <ast/statements/Abort.hpp>
+#include <ast/expressions/TernaryOperator.hpp>
+#include <ast/expressions/BinaryOperator.hpp>
+#include <ast/expressions/UnaryOperator.hpp>
+#include <ast/expressions/ExistsQuantifier.hpp>
+#include <ast/expressions/ForallQuantifier.hpp>
+#include <ast/expressions/ListConstructor.hpp>
+#include <ast/expressions/SetConstructor.hpp>
+#include <ast/expressions/TupleConstructor.hpp>
+#include <ast/expressions/ObjectConstructor.hpp>
+#include <ast/expressions/IdentifierExpression.hpp>
+#include <ast/expressions/ValueExpression.hpp>
+#include <ast/expressions/TypeExpression.hpp>
+#include <ast/expressions/TupleMapAccessExpression.hpp>
+#include <ast/expressions/CallExpression.hpp>
+#include <ast/expressions/AccessExpression.hpp>
+#include <ast/identifiers/IdentifierBlock.hpp>
+#include <ast/identifiers/MainModule.hpp>
+#include <ast/types/PointerType.hpp>
+#include "DeepCloneVisitor.hpp"
+#include <CallContext.hpp>
+#include <base/CdtFixes.hpp>
+#include <cassert>
+
+
+namespace Ast {
+
+Base::TiresiasObject* Ast::takeOwnership(Base::TiresiasObject* obj) {
+	m_allocatedAstObjects.push_back(obj);
+	return obj;
+}
+
+
+
+SymbolTable* Ast::createSymbolTable() {
+	return (SymbolTable*) takeOwnership(new SymbolTable());
+}
+SymbolTable* Ast::createSymbolTable(const SymbolTable& toCopy) {
+	return (SymbolTable*) takeOwnership(new SymbolTable(toCopy));
+}
+
+
+// Identifiers
+Identifier* Ast::createIdentifier(IdentifierKind t) {
+	Identifier* result = (Identifier*) takeOwnership(Identifier::createVirtual(t));
+	assert(result == nullptr || result->kind() == t);
+	return result;
+}
+Identifier* Ast::createIdentifier(const Identifier& toCopy) {
+	Identifier* result = (Identifier*) takeOwnership(Identifier::createVirtual(toCopy));
+	assert(result == nullptr || result->kind() == toCopy.kind());
+	return result;
+}
+
+
+ActionSystemInstance* Ast::createActionSystemInstance(){
+	return (ActionSystemInstance*) takeOwnership(new ActionSystemInstance());
+}
+ActionSystemInstance* Ast::createActionSystemInstance(const ActionSystemInstance& toCopy) {
+	return (ActionSystemInstance*) takeOwnership(new ActionSystemInstance(toCopy));
+}
+
+
+IdentifierList* Ast::createIdentifierList() {
+	return (IdentifierList*) takeOwnership(new IdentifierList());
+};
+IdentifierList* Ast::createIdentifierList(const IdentifierList& toCopy) {
+	return (IdentifierList*) takeOwnership(new IdentifierList(toCopy));
+}
+
+
+ParameterList* Ast::createParameterList() {
+	return (ParameterList*) takeOwnership(new ParameterList());
+}
+ParameterList* Ast::createParameterList(const ParameterList& toCopy) {
+	return (ParameterList*) takeOwnership(new ParameterList(toCopy));
+}
+
+
+ActionSystemInstanceList* Ast::createActionSystemInstanceList() {
+	return (ActionSystemInstanceList*) takeOwnership(new ActionSystemInstanceList());
+}
+ActionSystemInstanceList* Ast::createActionSystemInstanceList(const ActionSystemInstanceList& toCopy) {
+	return (ActionSystemInstanceList*) takeOwnership(new ActionSystemInstanceList(toCopy));
+}
+
+
+// Types
+Type* Ast::createType(TypeKind t) {
+	Type* result = (Type*)takeOwnership(Type::createVirtual(t));
+	assert(result == nullptr || result->kind() == t);
+	return result;
+}
+Type* Ast::createType(const Type& toCopy) {
+	Type* result = (Type*)takeOwnership(Type::createVirtual(toCopy));
+	assert(result == nullptr || result->kind() == toCopy.kind());
+	return result;
+}
+
+
+TypeList* Ast::createTypeList() {
+	return (TypeList*) takeOwnership(new TypeList());
+}
+TypeList* Ast::createTypeList(const TypeList& toCopy) {
+	return (TypeList*) takeOwnership(new TypeList(toCopy));
+}
+
+
+// Statements
+Statement* Ast::createStatement(StatementKind t) {
+	Statement* result = (Statement*) takeOwnership(Statement::createVirtual(t));
+	assert(result == nullptr || result->kind() == t);
+	return result;
+}
+Statement* Ast::createStatement(const Statement& toCopy) {
+	Statement* result = (Statement*) takeOwnership(Statement::createVirtual(toCopy));
+	assert(result == nullptr || result->kind() == toCopy.kind());
+	return result;
+}
+
+Statement* Ast::deepCopyStatement(Statement* toCopy) {
+	Statement* result = createStatement(*toCopy);
+	DeepCloneVisitor cloner (m_context, this);
+	result->accept(cloner);
+	return result;
+}
+
+
+StatementList* Ast::createStatementList() {
+	return (StatementList*) takeOwnership( new StatementList());
+};
+StatementList* Ast::createStatementList(const StatementList& toCopy) {
+	return (StatementList*) takeOwnership( new StatementList(toCopy));
+}
+
+
+
+// Expressions
+Expression* Ast::createExpression(ExpressionKind t) {
+	Expression* result = (Expression*) takeOwnership(Expression::createVirtual(t));
+	assert(result == nullptr || result->kind() == t);
+	return result;
+}
+Expression* Ast::createExpression(const Expression& toCopy) {
+	Expression* result = (Expression*) takeOwnership(Expression::createVirtual(toCopy));
+	assert(result == nullptr || result->kind() == toCopy.kind());
+	return result;
+}
+
+Expression* Ast::deepCopyExpression(Expression* toCopy) {
+	Expression* result = createExpression(*toCopy);
+	DeepCloneVisitor cloner (m_context, this);
+	result->accept(cloner);
+	return result;
+}
+
+
+ExpressionList* Ast::createExpressionList(){
+	return (ExpressionList*) takeOwnership(new ExpressionList());
+};
+ExpressionList* Ast::createExpressionList(const ExpressionList& toCopy) {
+	return (ExpressionList*) takeOwnership(new ExpressionList(toCopy));
+}
+
+Ast::Ast(CallContext* context):
+		m_context (context),
+		m_allocatedAstObjects()
+{}
+
+Ast::~Ast() {
+	for (auto& o: m_allocatedAstObjects)
+		delete o;
+}
+
+} /* namespace Ast */
Index: trunk/compiler/cppAst/ast/expressions/ForallQuantifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/ForallQuantifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/ForallQuantifier.hpp	(revision 2)
@@ -0,0 +1,52 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/Quantifier.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class ForallQuantifier final
+	: public Quantifier
+{
+protected:
+	ForallQuantifier():
+		Quantifier(ExpressionKind::forall)
+	{};
+	ForallQuantifier(const ForallQuantifier& toCopy):
+		Quantifier(toCopy)
+	{};
+
+	static ForallQuantifier* create(ExpressionKind) {return new ForallQuantifier();};
+	static ForallQuantifier* createCopy(const ForallQuantifier& toCopy) {return new ForallQuantifier(toCopy);};
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/expressions/TupleMapAccessExpression.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/TupleMapAccessExpression.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/TupleMapAccessExpression.hpp	(revision 2)
@@ -0,0 +1,67 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/UnaryOperator.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class TupleMapAccessExpression final
+	: public UnaryOperator
+{
+protected:
+	Expression* m_argument;
+
+	TupleMapAccessExpression():
+		UnaryOperator(ExpressionKind::TupleMapAccess),
+		m_argument (nullptr)
+	{};
+	TupleMapAccessExpression(const TupleMapAccessExpression &toCopy):
+		UnaryOperator(toCopy),
+		m_argument (toCopy.m_argument)
+	{};
+
+	static TupleMapAccessExpression* create(ExpressionKind){return new TupleMapAccessExpression();}
+	static TupleMapAccessExpression* createCopy(const TupleMapAccessExpression& toCopy){return new TupleMapAccessExpression(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef, SymbolTable* symbTabRef,
+			Expression* child, Expression* arg)
+	{
+		UnaryOperator::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef,child);
+		m_argument = arg;
+	}
+
+
+	Expression* argument() {return m_argument;};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+	void setArgument(Expression* newarg) {m_argument = newarg;};
+};
+}
Index: trunk/compiler/cppAst/ast/expressions/LeafExpression.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/LeafExpression.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/LeafExpression.hpp	(revision 2)
@@ -0,0 +1,64 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/Expression.hpp>
+
+namespace Ast {
+
+enum class LeafTypeEnum {
+	unset = 0,
+	_bool = 1,
+	integer  = 2,
+	real  = 3,
+	chr  = 4,
+	qval = 5,
+	reference = 6,
+	identifier = 7,
+	type = 8,
+	complex = 9
+};
+
+class LeafExpression
+	: public Expression
+{
+protected:
+	LeafTypeEnum m_valueType;
+
+	LeafExpression(LeafTypeEnum lt, ExpressionKind kind):
+		Expression(kind),
+		m_valueType (lt)
+	{};
+	LeafExpression(const LeafExpression &toCopy):
+		Expression(toCopy),
+		m_valueType (toCopy.m_valueType)
+	{};
+public:
+	~LeafExpression() override {};
+
+	LeafTypeEnum valueType() const {return m_valueType;};
+};
+}
Index: trunk/compiler/cppAst/ast/Ast.hpp
===================================================================
--- trunk/compiler/cppAst/ast/Ast.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/Ast.hpp	(revision 2)
@@ -0,0 +1,168 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <cstdint>
+#include <deque>
+#include <base/TiresiasObject.hpp>
+
+class CallContext;
+
+namespace Ast {
+
+/**
+ * Forward declarations of the AST classes
+ */
+class TypeIdentifier;
+class EnumIdentifier;
+//class ValuedEnumIdentifier;
+class AttributeIdentifier;
+class LocalVariableIdentifier;
+class ParameterIdentifier;
+class ExpressionVariableIdentifier;
+class MethodIdentifier;
+class NamedActionIdentifier;
+class Module;
+class ConstantIdentifier;
+class IntType;
+class BoolType;
+class EnumType;
+class ListType;
+class TupleType;
+class NullType;
+class FunctionType;
+class ActionSystemType;
+class GuardedCommand;
+class Call;
+class Assignment;
+class SeqBlock;
+class NondetBlock;
+class PrioBlock;
+class Skip;
+class Break;
+class Abort;
+class TernaryOperator;
+class BinaryOperator;
+class UnaryOperator;
+class ExistsQuantifier;
+class ForallQuantifier;
+class ListConstructor;
+class SetConstructor;
+class TupleConstructor;
+class ObjectConstructor;
+class IdentifierExpression;
+class BoolValueExpression;
+class IntValueExpression;
+class RefValueExpression;
+class TypeExpression;
+class TupleMapAccessExpression;
+class CallExpression;
+class AccessExpression;
+class UnspecIdentifierBlock;
+class SeqIdentifierBlock;
+class NondetIdentifierBlock;
+class PrioIdentifierBlock;
+class MainModule;
+class PointerType;
+class ActionSystemInstance;
+class ValuedEnumType;
+
+
+class ExpressionList;
+class StatementList;
+class IdentifierList;
+class ParameterList;
+class TypeList;
+class ActionSystemInstanceList;
+
+enum class ExpressionKind: std::uint8_t;
+enum class TypeKind : std::uint8_t;
+enum class StatementKind: std::uint8_t;
+enum class IdentifierKind: std::uint8_t;
+
+class SymbolTable;
+class Type;
+class Statement;
+class Identifier;
+class Expression;
+/**
+ * Facade
+ */
+class Ast final {
+private:
+	CallContext* m_context;
+	/* List of owned AST objects */
+	std::deque<Base::TiresiasObject*> m_allocatedAstObjects;
+
+	Base::TiresiasObject* takeOwnership(Base::TiresiasObject* obj);
+public:
+	Ast(CallContext* context);
+	~Ast();
+
+	// Constructors: All the objects created are owned by this AST. IOW once
+	// this object is gone, all the created elements as well.
+	// ALL the copy constructors will do a shallow copy. Use the clone visitor to get a deep clone.
+
+	Type* createType(TypeKind t);
+	Type* createType(const Type& toCopy);
+
+	Statement* createStatement(StatementKind t);            // new, empty statement
+	Statement* createStatement(const Statement& toCopy);    // shallow copy statement
+	Statement* deepCopyStatement(Statement* toCopy);        // deep copy statement
+
+	Identifier* createIdentifier(IdentifierKind t);
+	Identifier* createIdentifier(const Identifier& toCopy);
+
+	Expression* createExpression(ExpressionKind t);         // new, empty expression
+	Expression* createExpression(const Expression& toCopy); // shallow copy expression
+	Expression* deepCopyExpression(Expression* toCopy);     // deep copy expression
+
+	ActionSystemInstance* createActionSystemInstance();
+	ActionSystemInstance* createActionSystemInstance(const ActionSystemInstance& toCopy);
+
+	ExpressionList* createExpressionList();
+	ExpressionList* createExpressionList(const ExpressionList& toCopy);
+
+	IdentifierList* createIdentifierList();
+	IdentifierList* createIdentifierList(const IdentifierList& toCopy);
+
+	StatementList* createStatementList();
+	StatementList* createStatementList(const StatementList& toCopy);
+
+	ParameterList* createParameterList();
+	ParameterList* createParameterList(const ParameterList& toCopy);
+
+	TypeList* createTypeList();
+	TypeList* createTypeList(const TypeList& toCopy);
+
+	ActionSystemInstanceList* createActionSystemInstanceList();
+	ActionSystemInstanceList* createActionSystemInstanceList(const ActionSystemInstanceList& toCopy);
+
+	SymbolTable* createSymbolTable();
+	SymbolTable* createSymbolTable(const SymbolTable& toCopy);
+};
+
+}
Index: trunk/compiler/cppAst/ast/expressions/UnaryOperator.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/UnaryOperator.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/UnaryOperator.hpp	(revision 2)
@@ -0,0 +1,66 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/Expression.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class UnaryOperator
+	: public Expression
+{
+protected:
+	Expression* m_child;
+
+	UnaryOperator(ExpressionKind kind):
+		Expression(kind),
+		m_child(nullptr)
+	{};
+	UnaryOperator(const UnaryOperator& toCopy):
+		Expression(toCopy),
+		m_child(toCopy.m_child)
+	{};
+
+	static UnaryOperator* create(ExpressionKind k) {return new UnaryOperator(k);}
+	static UnaryOperator* createCopy(const UnaryOperator& toCopy) {return new UnaryOperator(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef,
+				SymbolTable* symbTabRef, Expression* child)
+	{
+		Expression::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef);
+		m_child = child;
+	}
+
+	Expression* child() {return m_child;};
+	void setChild(Expression* child) {m_child = child;};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/expressions/Quantifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/Quantifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/Quantifier.hpp	(revision 2)
@@ -0,0 +1,74 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/UnaryOperator.hpp>
+#include <ast/IScope.hpp>
+#include <ast/SymbolTable.hpp>
+#include <base/Exceptions.hpp>
+#include <string>
+#include <ast/identifiers/Identifier.hpp>
+
+namespace Ast {
+
+class Quantifier
+	: public UnaryOperator
+	, public IScope
+{
+protected:
+	SymbolTable* m_symbols;
+	IScope* m_parentScope;
+
+	Quantifier(ExpressionKind kind):
+		UnaryOperator(kind),
+		m_symbols (nullptr),
+		m_parentScope (nullptr)
+	{}
+	Quantifier(const Quantifier &toCopy):
+		UnaryOperator(toCopy),
+		m_symbols (toCopy.m_symbols),
+		m_parentScope (toCopy.m_parentScope)
+	{}
+public:
+	~Quantifier() override {}
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef, SymbolTable* symbTabRef,
+			Expression* child, SymbolTable* symTabRef, IScope* scopeRef)
+	{
+		UnaryOperator::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef,child);
+		m_symbols = symTabRef;
+		m_parentScope = scopeRef;
+	}
+
+	SymbolTable* symbols() {return m_symbols;};
+	Identifier* resolveIdentifier(const std::string& aName) const override { return m_symbols->get(aName); };
+	IScope* getParentScope() const override {return m_parentScope;};
+	std::string getScopeName() const override {return "";}
+	void setParentScope(IScope* parentScope) override {m_parentScope = parentScope;};
+	void addIdentifier(Identifier* anIdentifier, void* ) override {m_symbols->addIdentifier(anIdentifier);};
+};
+}
Index: trunk/compiler/cppAst/ast/AstAnnotation.hpp
===================================================================
--- trunk/compiler/cppAst/ast/AstAnnotation.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/AstAnnotation.hpp	(revision 2)
@@ -0,0 +1,71 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#pragma once
+
+#include <deque>
+
+namespace Ast {
+
+class AstElement; // forward
+
+enum class AstAnnotationEnum: std::uint8_t {
+	mutation,  // one mutation
+	list       // list of annotations
+};
+
+class AstAnnotation {
+protected:
+	const AstAnnotationEnum m_annotationType;
+
+	AstAnnotation(AstAnnotationEnum annotationType):
+		m_annotationType(annotationType)
+	{}
+public:
+	virtual ~AstAnnotation(){}
+	AstAnnotationEnum getAnnotationType() {return m_annotationType;}
+};
+
+class AstAnnotationList final: public AstAnnotation {
+public:
+	std::deque<AstAnnotation> m_annotationList;
+	AstAnnotationList():
+		AstAnnotation(AstAnnotationEnum::list),
+		m_annotationList()
+	{}
+};
+
+
+class MutationAnnotation final: public AstAnnotation {
+public:
+	const std::uint32_t m_mutationID;  // all mutation annotations with the same number form one mutant-AST
+	const AstElement* m_replacement;   // replacement AST, NOT owned
+	MutationAnnotation(std::uint32_t mutationID, AstElement* mutatedElement) :
+		AstAnnotation(AstAnnotationEnum::mutation),
+		m_mutationID (mutationID),
+		m_replacement(mutatedElement)
+	{}
+};
+
+} // namespace
Index: trunk/compiler/cppAst/ast/identifiers/Identifier.cpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/Identifier.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/Identifier.cpp	(revision 2)
@@ -0,0 +1,156 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#include <string>
+
+#include <ast/IScope.hpp>
+#include <ast/identifiers/Identifier.hpp>
+#include <base/Exceptions.hpp>
+#include <ast/identifiers/TypeIdentifier.hpp>
+#include <ast/identifiers/EnumIdentifier.hpp>
+#include <ast/identifiers/AttributeIdentifier.hpp>
+#include <ast/identifiers/LocalVariableIdentifier.hpp>
+#include <ast/identifiers/ParameterIdentifier.hpp>
+#include <ast/identifiers/ExpressionVariableIdentifier.hpp>
+#include <ast/identifiers/MethodIdentifier.hpp>
+#include <ast/identifiers/NamedActionIdentifier.hpp>
+#include <ast/identifiers/Module.hpp>
+#include <ast/identifiers/IdentifierBlock.hpp>
+#include <ast/identifiers/ConstantIdentifier.hpp>
+#include <ast/identifiers/MainModule.hpp>
+
+using namespace Ast;
+
+
+static void abstractError() {
+	throw new Base::NotImplementedException();
+}
+
+
+Base::FuncPtr Identifier::s_idVmt [2][IDENTIFIERKIND_NR_ITEMS] =
+{
+		{
+			/* TypeIdentifier = 0,               */ (Base::FuncPtr) &TypeIdentifier::create,
+			/* EnumIdentifier = 1,               */ (Base::FuncPtr) &EnumIdentifier::create,
+			/* LandmarkIdentifier = 2,           */ &abstractError,
+			/* AttributeIdentifier = 3,          */ (Base::FuncPtr) &AttributeIdentifier::create,
+			/* LocalVariableIdentifier = 4,      */ (Base::FuncPtr) &LocalVariableIdentifier::create,
+			/* ParameterIdentifier = 5,          */ (Base::FuncPtr) &ParameterIdentifier::create,
+			/* ExpressionVariableIdentifier = 6, */ (Base::FuncPtr) &ExpressionVariableIdentifier::create,
+			/* MethodIdentifier = 7,             */ (Base::FuncPtr) &MethodIdentifier::create,
+			/* NamedActionIdentifier = 8,        */ (Base::FuncPtr) &NamedActionIdentifier::create,
+			/* Module = 9,                       */ (Base::FuncPtr) &Module::create,
+			/* List_Normal = 10,                 */ (Base::FuncPtr) &UnspecIdentifierBlock::create,
+			/* Constant = 11,                    */ (Base::FuncPtr) &ConstantIdentifier::create,
+			/* MainModule = 12,                  */ (Base::FuncPtr) &MainModule::create,
+			/* List_Nondeterministic = 13,       */ (Base::FuncPtr) &NondetIdentifierBlock::create,
+			/* List_Seqential = 14,              */ (Base::FuncPtr) &SeqIdentifierBlock::create,
+			/* List_Prioritized = 15,            */ (Base::FuncPtr) &PrioIdentifierBlock::create
+		},
+		{
+			/* TypeIdentifier = 0,               */ (Base::FuncPtr) &TypeIdentifier::createCopy,
+			/* EnumIdentifier = 1,               */ (Base::FuncPtr) &EnumIdentifier::createCopy,
+			/* LandmarkIdentifier = 2,           */ &abstractError,
+			/* AttributeIdentifier = 3,          */ (Base::FuncPtr) &AttributeIdentifier::createCopy,
+			/* LocalVariableIdentifier = 4,      */ (Base::FuncPtr) &LocalVariableIdentifier::createCopy,
+			/* ParameterIdentifier = 5,          */ (Base::FuncPtr) &ParameterIdentifier::createCopy,
+			/* ExpressionVariableIdentifier = 6, */ (Base::FuncPtr) &ExpressionVariableIdentifier::createCopy,
+			/* MethodIdentifier = 7,             */ (Base::FuncPtr) &MethodIdentifier::createCopy,
+			/* NamedActionIdentifier = 8,        */ (Base::FuncPtr) &NamedActionIdentifier::createCopy,
+			/* Module = 9,                       */ (Base::FuncPtr) &Module::create,
+			/* List_Normal = 10,                 */ (Base::FuncPtr) &UnspecIdentifierBlock::createCopy,
+			/* Constant = 11,                    */ (Base::FuncPtr) &ConstantIdentifier::createCopy,
+			/* MainModule = 12,                  */ (Base::FuncPtr) &MainModule::createCopy,
+			/* List_Nondeterministic = 13,       */ (Base::FuncPtr) &NondetIdentifierBlock::createCopy,
+			/* List_Seqential = 14,              */ (Base::FuncPtr) &SeqIdentifierBlock::createCopy,
+			/* List_Prioritized = 15,            */ (Base::FuncPtr) &PrioIdentifierBlock::createCopy
+		}
+};
+
+Identifier* Identifier::createVirtual(IdentifierKind aType) {
+	return (std::uint8_t)aType < IDENTIFIERKIND_NR_ITEMS ? ((ConstrPtr)s_idVmt[0][(std::uint8_t)aType])() : nullptr;
+}
+
+Identifier* Identifier::createVirtual(const Identifier& toCopy) {
+	std::uint8_t aType ((std::uint8_t)toCopy.kind());
+	return ((CopyConstrPtr)s_idVmt[1][aType])(toCopy);
+}
+
+
+Identifier::Identifier(IdentifierKind identifierKind) :
+	AstElement(AstNodeTypeEnum::identifier),
+	m_tokenText (""),
+	m_line      (-1),
+	m_column    (-1),
+	m_definingScope (nullptr),
+	m_identifierKind(identifierKind),
+	m_type (nullptr)
+{}
+
+
+Identifier::Identifier(const Identifier& toCopy) :
+	AstElement(AstNodeTypeEnum::identifier),
+	m_tokenText (toCopy.m_tokenText),
+	m_line      (toCopy.m_line),
+	m_column    (toCopy.m_column),
+	m_definingScope (toCopy.m_definingScope),
+	m_identifierKind(toCopy.m_identifierKind),
+	m_type (nullptr)
+{}
+
+Identifier::~Identifier()
+{}
+
+Identifier* Identifier::clone() const
+{
+	throw new Base::NotImplementedException();
+}
+
+void Identifier::accept(IAstVisitor& )
+{
+	throw new Base::NotImplementedException();
+}
+
+string Identifier::fullyQualifiedName() const {
+	string result = tokenText();
+	IScope* parent = definingScope();
+	while (parent != nullptr) {
+		std::string scopeName = parent->getScopeName();
+		if (!scopeName.empty())
+			result = scopeName + "::" + result;
+		parent = parent->getParentScope();
+	}
+	return result;
+}
+
+
+
+//int32_t Identifier::compareTo(Identifier* obj)
+//{
+//	throw new Base::NotImplementedException();
+	//return npc(tokenText())->compareTo(npc(obj)->toString());
+//}
+
+
Index: trunk/compiler/cppAst/ast/expressions/TupleConstructor.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/TupleConstructor.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/TupleConstructor.hpp	(revision 2)
@@ -0,0 +1,80 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/TypeConstructionExpression.hpp>
+#include <ast/IAstVisitor.hpp>
+#include <ast/identifiers/Identifier.hpp>
+#include <deque>
+
+namespace Ast {
+
+class TupleConstructor final
+	: public TypeConstructionExpression
+{
+protected:
+	ExpressionList m_values;
+	Identifier* m_tupleType;
+	bool m_matcher;
+
+	TupleConstructor():
+		TypeConstructionExpression(ExpressionKind::TupleConstr),
+		m_values(),
+		m_tupleType(nullptr),
+		m_matcher(false)
+	{};
+	TupleConstructor(const TupleConstructor &toCopy):
+		TypeConstructionExpression(toCopy),
+		m_values(toCopy.m_values),
+		m_tupleType(toCopy.m_tupleType),
+		m_matcher(toCopy.m_matcher)
+	{};
+
+	static TupleConstructor* create(ExpressionKind) {return new TupleConstructor();}
+	static TupleConstructor* createCopy(const TupleConstructor& toCopy) {return new TupleConstructor(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef, SymbolTable* symbTabRef,
+			ExpressionList* exprList, Identifier* tupleTypeId, bool isMatcher)
+	{
+		TypeConstructionExpression::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef);
+		m_values = std::move(*exprList);
+		m_tupleType = tupleTypeId,
+		m_matcher = isMatcher;
+	}
+
+	ExpressionList& values() {return m_values;}
+	Identifier* tupleType() {return m_tupleType;};
+	bool isMatcher() {return m_matcher;}
+
+	void setIsMatcher(bool newVal) {m_matcher = newVal;};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+	//void setTupleValues(ExpressionList& values) {m_values = values;};
+};
+}
Index: trunk/compiler/cppAst/ast/identifiers/ConstantIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/ConstantIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/ConstantIdentifier.hpp	(revision 2)
@@ -0,0 +1,66 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/ValueIdentifier.hpp>
+#include <ast/expressions/Expression.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace  Ast {
+
+class ConstantIdentifier final
+	: public ValueIdentifier
+{
+protected:
+	Expression* m_value;
+
+	ConstantIdentifier():
+		ValueIdentifier(IdentifierKind::Constant),
+		m_value (nullptr)
+	{}
+	ConstantIdentifier(const ConstantIdentifier& toCopy) :
+		ValueIdentifier(toCopy),
+		m_value (toCopy.m_value)
+	{}
+
+	static ConstantIdentifier* create() {return new ConstantIdentifier();}
+	static ConstantIdentifier* createCopy(const ConstantIdentifier& toCopy) {return new ConstantIdentifier(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void init (std::int32_t line, std::int32_t col, const char* text,
+			IScope* scopeRef, Type* typeRef, Expression* valueRef)
+	{
+		ValueIdentifier::init(line, col, text, scopeRef, typeRef);
+		m_value = valueRef;
+	}
+
+	Expression* value() const {return m_value;};
+	void setValue(Expression* aValue) {m_value = aValue;};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/AstElement.hpp
===================================================================
--- trunk/compiler/cppAst/ast/AstElement.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/AstElement.hpp	(revision 2)
@@ -0,0 +1,77 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#pragma once
+
+#include <base/TiresiasObject.hpp>
+#include <ast/Ast.hpp> // pull in Ast
+#include <ast/IAstVisitor.hpp>
+#include <ast/IScope.hpp>
+#include <ast/AstAnnotation.hpp>
+
+namespace Ast {
+
+enum class AstNodeTypeEnum : std::uint8_t {
+	type,
+	identifier,
+	expression,
+	statement
+};
+
+class AstElement:
+	public Base::TiresiasObject
+{
+protected:
+	const AstNodeTypeEnum m_astNodeType; // byte @ +1 byte
+	AstAnnotation*        m_astAnnotation;
+
+protected:
+	AstElement(AstNodeTypeEnum nodeType):
+		Base::TiresiasObject(),
+		m_astNodeType(nodeType),
+		m_astAnnotation(nullptr)
+	{}
+
+public:
+	~AstElement(){
+		delete m_astAnnotation;
+	};
+
+
+//	AstElement* Ast::internalCreate(std::uint8_t typeId) {
+//		AstElement* result = ((create)static_astVTable[0][typeId])();
+//		m_allocatedAstObjects.push_back(result);
+//		return result;
+//	}
+
+	AstAnnotation* getAnnotation() {return m_astAnnotation;}
+	void setAnnotation(AstAnnotation* annotation) {m_astAnnotation = annotation;}
+
+	AstNodeTypeEnum nodeType() const {return m_astNodeType;};
+
+	virtual IScope* asScope(){return nullptr;}
+	virtual void accept(IAstVisitor& visitor) = 0;
+};
+
+}
Index: trunk/compiler/cppAst/ast/identifiers/MainModule.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/MainModule.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/MainModule.hpp	(revision 2)
@@ -0,0 +1,74 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/Module.hpp>
+#include <ast/IAstVisitor.hpp>
+#include <ast/identifiers/IdentifierBlock.hpp>
+
+namespace Ast {
+
+class MainModule final
+	: public Module
+{
+protected:
+	IdentifierBlock*    m_systemDescription;   // this is what we get from the frontend
+	FunctionIdentifier* m_systemMainFunction;  // Avail after AstFinaliser has run
+
+	MainModule():
+		Module(IdentifierKind::MainModule),
+		m_systemDescription  (nullptr),
+		m_systemMainFunction (nullptr)
+	{}
+	MainModule(const MainModule &toCopy):
+		Module(toCopy),
+		m_systemDescription (toCopy.m_systemDescription),
+		m_systemMainFunction (toCopy.m_systemMainFunction)
+	{}
+
+	static MainModule* create() {return new MainModule();}
+	static MainModule* createCopy(const MainModule& toCopy) {return new MainModule(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void init(int line, int col, const char* text, IScope* scopeRef,
+			Type* typeRef, const char* prefix, SymbolTable* symTabRef, IdentifierBlock* list)
+	{
+		Module::init(line,col,text,scopeRef,typeRef,prefix,symTabRef);
+		m_systemDescription = list;
+	}
+
+
+	IdentifierBlock* systemDescription() {return m_systemDescription;};
+	void setSystemDescription(IdentifierBlock* aDescr) {m_systemDescription = aDescr;};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+
+	FunctionIdentifier* getMainFunction() {return m_systemMainFunction;}
+	void setMainFunction(FunctionIdentifier* mainFunction) {m_systemMainFunction = mainFunction;}
+	static std::string mainFunctionName() {return ".main";}
+};
+}
Index: trunk/compiler/cppAst/ast/expressions/TypeExpression.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/TypeExpression.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/TypeExpression.hpp	(revision 2)
@@ -0,0 +1,52 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/LeafExpression.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class TypeExpression
+	: public LeafExpression
+{
+protected:
+	TypeExpression():
+		LeafExpression(LeafTypeEnum::type, ExpressionKind::Type)
+	{};
+	TypeExpression(const TypeExpression &toCopy):
+		LeafExpression(toCopy)
+	{}
+
+	static TypeExpression* create(ExpressionKind) {return new TypeExpression();}
+	static TypeExpression* createCopy(const TypeExpression& toCopy) {return new TypeExpression(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/identifiers/FunctionIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/FunctionIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/FunctionIdentifier.hpp	(revision 2)
@@ -0,0 +1,73 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/Scope.hpp>
+#include <ast/statements/Block.hpp>
+#include <ast/identifiers/ParameterIdentifier.hpp>
+#include <deque>
+#include <ast/Containers.hpp>
+
+namespace Ast {
+
+class FunctionIdentifier
+	: public Scope
+{
+protected:
+	ParameterList m_parameter;
+	Statement* m_body;
+
+	FunctionIdentifier(IdentifierKind id):
+		Scope(id),
+		m_parameter(),
+		m_body (nullptr)
+	{};
+	FunctionIdentifier(const FunctionIdentifier& toCopy):
+		Scope(toCopy),
+		m_parameter (toCopy.m_parameter),
+		m_body      (toCopy.m_body)
+	{}
+public:
+
+	void init (std::int32_t line, std::int32_t col, const char* text,
+			IScope* scopeRef, Type* typeRef, const char* prefix,
+			ParameterList* parameterListRef, SymbolTable* symbolTableRef, Statement* bodyRef)
+	{
+		Scope::init(line,col,text,scopeRef,typeRef,prefix,symbolTableRef);
+		m_parameter = std::move(*parameterListRef);
+		m_body = bodyRef;
+	}
+
+	std::deque<ParameterIdentifier*>& parameter() {return m_parameter;}
+	const std::deque<ParameterIdentifier*>& parameter() const {return m_parameter;}
+	Statement* body() const {return m_body;};
+	size_t parameterCount() const {return m_parameter.size(); }
+
+	void setBody(Statement* body) {m_body = body;};
+	void addParameter(ParameterIdentifier* aParameter) {m_parameter.push_back(aParameter);};
+	std::string getScopeName() const override {return toString();}
+};
+}
Index: trunk/compiler/cppAst/ast/AstFactory.cpp
===================================================================
--- trunk/compiler/cppAst/ast/AstFactory.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/AstFactory.cpp	(revision 2)
@@ -0,0 +1,560 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+/*
+ * AstFactory.cpp
+ *
+ *  Created on: Dec 23, 2013
+ *      Author: willibald
+ */
+
+#include "AstFactory.hpp"
+#include "Ast.hpp"
+#include <base/Debug.hpp>
+#include <base/Exceptions.hpp>
+#include <ast/identifiers/Identifier.hpp>
+#include <ast/identifiers/TypeIdentifier.hpp>
+#include <ast/identifiers/EnumIdentifier.hpp>
+#include <ast/identifiers/AttributeIdentifier.hpp>
+#include <ast/identifiers/LocalVariableIdentifier.hpp>
+#include <ast/identifiers/ParameterIdentifier.hpp>
+#include <ast/identifiers/ExpressionVariableIdentifier.hpp>
+#include <ast/identifiers/MethodIdentifier.hpp>
+#include <ast/identifiers/NamedActionIdentifier.hpp>
+#include <ast/identifiers/Module.hpp>
+#include <ast/identifiers/IdentifierBlock.hpp>
+#include <ast/identifiers/ConstantIdentifier.hpp>
+#include <ast/types/IntType.hpp>
+#include <ast/types/BoolType.hpp>
+#include <ast/types/EnumType.hpp>
+#include <ast/types/ValuedEnumType.hpp>
+#include <ast/types/ListType.hpp>
+#include <ast/types/TupleType.hpp>
+#include <ast/types/NullType.hpp> // not sure we need this one
+#include <ast/types/FunctionType.hpp>
+#include <ast/types/ActionSystemType.hpp>
+#include <ast/types/PointerType.hpp>
+#include <ast/statements/GuardedCommand.hpp>
+#include <ast/statements/Call.hpp>
+#include <ast/statements/Assignment.hpp>
+#include <ast/statements/SeqBlock.hpp>
+#include <ast/statements/NondetBlock.hpp>
+#include <ast/statements/PrioBlock.hpp>
+#include <ast/statements/Skip.hpp>
+#include <ast/statements/Break.hpp>
+#include <ast/statements/Abort.hpp>
+#include <ast/expressions/TernaryOperator.hpp>
+#include <ast/expressions/BinaryOperator.hpp>
+#include <ast/expressions/UnaryOperator.hpp>
+#include <ast/expressions/ForallQuantifier.hpp>
+#include <ast/expressions/ExistsQuantifier.hpp>
+#include <ast/expressions/ListConstructor.hpp>
+#include <ast/expressions/SetConstructor.hpp>
+#include <ast/expressions/TupleConstructor.hpp>
+#include <ast/expressions/ObjectConstructor.hpp>
+#include <ast/expressions/ValueExpression.hpp>
+#include <ast/expressions/IdentifierExpression.hpp>
+#include <ast/expressions/TypeExpression.hpp>
+#include <ast/expressions/TupleMapAccessExpression.hpp>
+#include <ast/expressions/CallExpression.hpp>
+#include <ast/expressions/AccessExpression.hpp>
+#include <ast/identifiers/MainModule.hpp>
+
+
+namespace Ast {
+namespace Factory {
+
+ActionSystemInstance* createActionSystemInstance(CallContext &context) {
+	return context.m_ast->createActionSystemInstance();
+}
+
+ExpressionList* createExpressionList(CallContext &context) {
+	return context.m_ast->createExpressionList();
+}
+
+IdentifierList* createIdentifierList(CallContext &context) {
+	return context.m_ast->createIdentifierList();
+}
+
+StatementList* createStatementList(CallContext &context) {
+	return context.m_ast->createStatementList();
+}
+
+
+Type* createType(CallContext &context, TypeKind t) {
+	return context.m_ast->createType(t);
+}
+
+Statement* createStatement(CallContext &context, StatementKind t) {
+	return context.m_ast->createStatement(t);
+}
+
+Identifier* createIdentifier(CallContext &context, IdentifierKind t) {
+	return context.m_ast->createIdentifier(t);
+}
+
+Expression* createExpression(CallContext &context, ExpressionKind t) {
+	return context.m_ast->createExpression(t);
+}
+
+
+/**
+ * Creates and registers a symbol table object
+ */
+SymbolTable* createSymbolTable(CallContext &context) {
+	return context.m_ast->createSymbolTable();
+}
+
+/**
+ * Creates and registers a parameter list object
+ */
+ParameterList* createParameterList(CallContext &context) {
+	return context.m_ast->createParameterList();
+}
+
+TypeList* createTypeList(CallContext &context) {
+	return context.m_ast->createTypeList();
+}
+
+ActionSystemInstanceList* createActionSystemInstanceList(CallContext &context) {
+	return context.m_ast->createActionSystemInstanceList();
+}
+
+bool addSymbolToTable(void* symbolTable, void* identifier) {
+	SymbolTable* table = (SymbolTable*) symbolTable;
+	Identifier* id = (Identifier*) identifier;
+	return table->addIdentifier(id);
+}
+
+bool addParameterToList(void* parameterList, void* parameterIdentifier) {
+	((ParameterList*)parameterList)->push_back((ParameterIdentifier*)parameterIdentifier);
+	return true;
+}
+
+bool addTypeToList(void* typeList, void* type) {
+	((TypeList*)typeList)->push_back((Type*)type);
+	return true;
+}
+
+bool addActionSystemInstanceToList(void* objectsList, void* instanceRef) {
+	((ActionSystemInstanceList*)objectsList)->push_back((ActionSystemInstance*)instanceRef);
+	return true;
+}
+
+bool addIdentifierToBlock(void* idBlock, void* idRef){
+	((IdentifierBlock*)idBlock)->addElement((Identifier*)idRef);
+	return true;
+}
+
+bool addIdentifierToList(void* idList, void* idRef) {
+	((IdentifierList*)idList) -> push_back((Identifier*)idRef);
+	return true;
+}
+
+bool addExpressionToList(void* exprList, void* exprRef) {
+	((ExpressionList*)exprList) -> push_back((Expression*)exprRef);
+	return true;
+}
+
+bool addStatementToList(void* stmtList, void* stmtRef) {
+	((StatementList*)stmtList) -> push_back((Statement*)stmtRef);
+	return true;
+}
+
+
+/**
+ * Initializers for Identifiers
+ */
+bool initIdentifier(void* id, std::int32_t line, std::int32_t col, const char* text,
+	void* scopeRef, void* typeRef)
+{
+	((Identifier*)id)->init(line,col,text,(IScope*)scopeRef,(Type*)typeRef);
+	return true;
+}
+bool initEnumIdentifier(void* enumId, std::int32_t line, std::int32_t col, const char* text,
+		void* scopeRef, void* typeRef, bool haveValue, std::int32_t value)
+{
+	((EnumIdentifier*)enumId) -> init(line, col, text, (IScope*) scopeRef, (Type*) typeRef, haveValue, value);
+	return true;
+}
+bool initConstIdentifier(void* constId, std::int32_t line, std::int32_t col, const char* text,
+	void* scopeRef, void* typeRef, void* valueRef)
+{
+	((ConstantIdentifier*)constId) -> init(line,col,text,(IScope*)scopeRef, (Type*)typeRef, (Expression*)valueRef);
+	return true;
+}
+bool initAttrIdentifier(void* attrId, std::int32_t line, std::int32_t col, const char* text,
+	void* scopeRef, void* typeRef, void* initRef,bool isStatic, bool isControllable, bool isObservable)
+{
+	((AttributeIdentifier*)attrId) -> init(line, col, text, (IScope*) scopeRef, (Type*)typeRef,
+			(Expression*) initRef, isStatic, isControllable, isObservable);
+	return true;
+}
+bool initExprVarIdentifier(void* exprVarId, std::int32_t line, std::int32_t col, const char* text,
+	void* scopeRef, void* typeRef, bool initialized)
+{
+	((ExpressionVariableIdentifier*) exprVarId) -> init(line, col, text, (IScope*)scopeRef,
+			(Type*)typeRef, initialized);
+	return true;
+}
+bool initTypeIdentifier(void* typeId, std::int32_t line, std::int32_t col, const char* text,
+	void* scopeRef, void* typeRef, const char* prefix)
+{
+	((TypeIdentifier*)typeId)->init(line,col,text,(IScope*)scopeRef,(Type*)typeRef,prefix);
+	return true;
+}
+bool initMethodIdentifier(void* methodId, std::int32_t line, std::int32_t col, const char* text,
+	void* scopeRef, void* typeRef, const char* prefix, void* parameterListRef, void* symbolTableRef,
+	void* bodyRef)
+{
+	((MethodIdentifier*)methodId) -> init(line,col,text,(IScope*)scopeRef, (Type*)typeRef,
+		prefix, (ParameterList*) parameterListRef, (SymbolTable*) symbolTableRef, (Block*) bodyRef);
+	return true;
+}
+
+bool initModule(void* moduleId, int line, int col, const char* text, void* scopeRef,
+	void* typeRef, const char* prefix, void* symTabRef)
+{
+	((Module*)moduleId) ->init(line, col, text, (IScope*)scopeRef,
+			(Type*) typeRef, prefix, (SymbolTable*)symTabRef);
+	return true;
+}
+
+bool initMainModule(void* moduleId, int line, int col, const char* text, void* scopeRef,
+	void* typeRef, const char* prefix, void* symTabRef, void* idListRef)
+{
+	((MainModule*)moduleId) ->init(line, col, text, (IScope*)scopeRef,
+			(Type*) typeRef, prefix, (SymbolTable*)symTabRef, (IdentifierBlock*) idListRef);
+	return true;
+}
+
+
+/**
+ * Initializers for Types
+ */
+bool initIntType(void* typeId, void* identifierRef, bool anonymousType, std::int32_t low,
+	std::int32_t high)
+{
+	((IntType*)typeId) -> init( (TypeIdentifier*) identifierRef, anonymousType, low, high);
+	return true;
+}
+bool initBoolType(void* typeId, void* identifierRef, bool anonymousType)
+{
+	((BoolType*)typeId) -> init( (TypeIdentifier*) identifierRef, anonymousType);
+	return true;
+}
+bool initValuedEnumType(void* typeId, void* identifierRef, bool anonymousType, void* symTabRef,
+	void* intTypeRef)
+{
+	((ValuedEnumType*)typeId) -> init( (TypeIdentifier*) identifierRef, anonymousType,
+			(SymbolTable*) symTabRef, (IntType*) intTypeRef);
+	return true;
+}
+bool initEnumType(void* typeId,void* identifierRef, bool anonymousType, void* symTabRef)
+{
+	((EnumType*)typeId) -> init( (TypeIdentifier*) identifierRef, anonymousType,
+			(SymbolTable*) symTabRef);
+	return true;
+}
+bool initListType(void* typeId, void* identifierRef, bool anonymousType, void* innerTypeRef,
+	std::uint32_t maxNumberOfElements)
+{
+	((ListType*)typeId) -> init( (TypeIdentifier*) identifierRef, anonymousType,
+			(Type*) innerTypeRef, maxNumberOfElements);
+	return true;
+}
+bool initTupleType(void* typeId, void* identifierRef, bool anonymousType, void* typeListRef)
+{
+	((TupleType*)typeId) -> init( (TypeIdentifier*) identifierRef, anonymousType,
+			(TypeList*) typeListRef);
+	return true;
+}
+bool initFunctionType(void* typeId, void* identifierRef, bool anonymousType, void* paramTypeListRef,
+	void* returnTypeRef, std::int32_t functionKind, bool isPure)
+{
+	((FunctionType*)typeId) -> init( (TypeIdentifier*) identifierRef, anonymousType,
+			(TypeList*) paramTypeListRef, (Type*)returnTypeRef, (FunctionKind) functionKind, isPure);
+	return true;
+}
+bool initActionSystemInstance(void* instance, void* typeRef, const char* name,
+	std::int32_t numOfCreatedObjs, void* parentInstanceRef)
+{
+	((ActionSystemInstance*)instance) -> init( (ActionSystemType*) typeRef, name,
+			numOfCreatedObjs,  (ActionSystemInstance*) parentInstanceRef);
+	return true;
+}
+bool initActionSystemType(void* typeId, void* identifierRef, bool anonymousType, void* baseTypeRef,
+	void* parentScopeRef, void* doOdBlockRef, void* symTab, void* objectsListRef,
+	void* derivedObjectsListRef, bool autoConstruction, bool isInSystemDescription)
+{
+	((ActionSystemType*)typeId) -> init( (TypeIdentifier*) identifierRef, anonymousType,
+			(ActionSystemType*) baseTypeRef, (IScope*) parentScopeRef, (Block*) doOdBlockRef,
+			(SymbolTable*) symTab, (ActionSystemInstanceList*) objectsListRef,
+			(ActionSystemInstanceList*) derivedObjectsListRef, autoConstruction, isInSystemDescription);
+	return true;
+}
+bool initNullType(void* typeId, void* identifierRef, bool anonymousType)
+{
+	((NullType*)typeId) -> init( (TypeIdentifier*) identifierRef, anonymousType);
+	return true;
+}
+
+bool initSkip(void* stmnt, std::int32_t line, std::int32_t col)
+{
+	((Skip*)stmnt) -> init(line, col);
+	return true;
+}
+
+bool initBreak(void* stmnt, std::int32_t line, std::int32_t col)
+{
+	((Break*)stmnt) -> init(line, col);
+	return true;
+}
+
+bool initAbort(void* stmnt, std::int32_t line, std::int32_t col)
+{
+	((Abort*)stmnt) -> init(line, col);
+	return true;
+}
+
+bool initNondetBlock(void* block, std::int32_t line, std::int32_t col,
+		void* symTabRef, void* stmtListRef, void* scopeRef)
+{
+	((NondetBlock*)block) -> init(line, col, (SymbolTable*) symTabRef,
+			(StatementList*) stmtListRef, (IScope*)scopeRef);
+	return true;
+}
+
+bool initSeqBlock(void* block, std::int32_t line, std::int32_t col,
+		void* symTabRef, void* stmtListRef, void* scopeRef, void* filterExprRef)
+{
+	((SeqBlock*)block) -> init(line, col, (SymbolTable*) symTabRef,
+			(StatementList*) stmtListRef, (IScope*)scopeRef, (Expression*) filterExprRef);
+	return true;
+}
+
+bool initPrioBlock(void* block, std::int32_t line, std::int32_t col,
+		void* symTabRef, void* stmtListRef, void* scopeRef)
+{
+	((PrioBlock*)block) -> init(line, col, (SymbolTable*) symTabRef,
+			(StatementList*) stmtListRef, (IScope*)scopeRef);
+	return true;
+}
+
+bool initGuardedCommand(void* stmt,std::int32_t line,std::int32_t pos,
+		void* scopeRef,void* guardExprRef,void* bodyRef)
+{
+	((GuardedCommand*)stmt) -> init(line, pos, (IScope*) scopeRef, (Expression*) guardExprRef,
+			(Block*)bodyRef);
+	return true;
+}
+
+bool initAssignment(void* stmt,std::int32_t line,std::int32_t pos,void* scopeRef,
+		void* nonDetExprRef, void* placeExprListRef, void* valueExprListRef, void* symTabRef)
+{
+	((Assignment*)stmt) -> init(line, pos, (IScope*) scopeRef,
+			(Expression*) nonDetExprRef, (ExpressionList*) placeExprListRef,
+			(ExpressionList*) valueExprListRef, (SymbolTable*)symTabRef);
+	return true;
+}
+
+bool initCall(void* stmt,std::int32_t line,std::int32_t pos,void* callExprRef)
+{
+	((Call*)stmt) -> init(line,pos, (Expression*) callExprRef);
+	return true;
+}
+
+
+
+bool initTypeExpression(void* expr, std::int32_t line, std::int32_t pos,
+		void* typeRef, void* callTargetsIdentifierListRef, void* symbTabRef)
+{
+	((TypeExpression*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef);
+	return true;
+}
+
+bool initIdentifierExpression(void* expr, std::int32_t line, std::int32_t pos,
+		void* typeRef, void* callTargetsIdentifierListRef, void* symbTabRef, void* identifierRef,
+		bool isSelf)
+{
+	((IdentifierExpression*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, (Identifier*) identifierRef, isSelf);
+	return true;
+}
+
+bool initUnaryExpression(void* expr, std::int32_t line, std::int32_t pos,
+		void* typeRef, void* callTargetsIdentifierListRef, void* symbTabRef,
+		void* child)
+{
+	((UnaryOperator*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, (Expression*) child);
+	return true;
+}
+
+bool initBinaryExpression(void* expr, std::int32_t line, std::int32_t pos,
+		void* typeRef, void* callTargetsIdentifierListRef, void* symbTabRef,
+		void* left, void* right)
+{
+	((BinaryOperator*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, (Expression*) left, (Expression*)right);
+	return true;
+}
+
+bool initTernaryExpression(void* expr, std::int32_t line, std::int32_t pos,
+		void* typeRef, void* callTargetsIdentifierListRef, void* symbTabRef,
+		void* left, void* mid, void* right, void* defScopeRef)
+{
+	((TernaryOperator*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, (Expression*) left,
+			(Expression*)mid, (Expression*)right, (Scope*) defScopeRef);
+	return true;
+}
+
+bool initIntValueExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+		void* callTargetsIdentifierListRef, void* symbTabRef, std::int32_t value)
+{
+	((IntValueExpression*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, value);
+	return true;
+}
+
+bool initBoolValueExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+		void* callTargetsIdentifierListRef, void* symbTabRef,bool value)
+{
+	((BoolValueExpression*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, value);
+	return true;
+}
+
+bool initRefValueExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+		void* callTargetsIdentifierListRef, void* symbTabRef, void* value)
+{
+	((RefValueExpression*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, value);
+	return true;
+}
+
+
+bool initListConstructor(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+		void* callTargetsIdentifierListRef, void* symbTabRef,
+		void* exprList, void* symTab, void* parentScope,
+		void* comprehension, bool hasComprehension)
+{
+	((ListConstructor*)expr) ->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, (ExpressionList*) exprList,
+			(SymbolTable*)symTab, (IScope*) parentScope,
+			(Expression*) comprehension, hasComprehension);
+	return true;
+}
+
+bool initSetConstructor(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+		void* callTargetsIdentifierListRef, void* symbTabRef,
+		void* exprList, void* symTab, void* parentScope,
+		void* comprehension, bool hasComprehension)
+{
+	((SetConstructor*)expr) ->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, (ExpressionList*) exprList,
+			(SymbolTable*)symTab, (IScope*) parentScope,
+			(Expression*) comprehension, hasComprehension);
+	return true;
+}
+
+bool initTupleConstructor(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+		void* callTargetsIdentifierListRef, void* symbTabRef,
+		void* exprList, void* tupleTypeId, bool isMatcher)
+{
+	((TupleConstructor*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, (ExpressionList*) exprList,
+			(Identifier*) tupleTypeId, isMatcher);
+	return true;
+}
+
+bool initAccessExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+		void* callTargetsIdentifierListRef, void* symbTabRef,
+		void* left, void* right)
+{
+	((AccessExpression*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, (Expression*) left, (Expression*) right);
+	return true;
+}
+
+bool initTupleMapAccessExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+		void* callTargetsIdentifierListRef, void* symbTabRef,
+		void* child, void* argument)
+{
+	((TupleMapAccessExpression*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, (Expression*) child, (Expression*) argument);
+	return true;
+}
+
+bool initCallExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+		void* callTargetsIdentifierListRef, void* symbTabRef,
+		void* child, void* argumentList, void* scopeRef)
+{
+	((CallExpression*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, (Expression*) child, (ExpressionList*) argumentList,
+			(IScope*)scopeRef);
+	return true;
+}
+
+bool initQuantifierExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+		void* callTargetsIdentifierListRef, void* symbTabRef,
+		void* child, void* symTabRef, void* scopeRef)
+{
+	((Quantifier*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef, (Expression*) child,
+			(SymbolTable*) symTabRef, (IScope*) scopeRef);
+	return true;
+}
+
+bool initObjectConstructor(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+		void* callTargetsIdentifierListRef, void* symbTabRef,
+		void* instanceList, std::uint32_t currentInstance, const char* name)
+{
+	((ObjectConstructor*)expr)->init(line,pos,(Type*)typeRef,
+			(IdentifierList*)callTargetsIdentifierListRef,
+			(SymbolTable*)symbTabRef,(ActionSystemInstanceList*) instanceList,
+			currentInstance, name);
+
+	return true;
+}
+
+
+}} // namespaces
Index: trunk/compiler/cppAst/ast/identifiers/AttributeIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/AttributeIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/AttributeIdentifier.hpp	(revision 2)
@@ -0,0 +1,84 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/ValueReferenceIdentifier.hpp>
+#include <ast/expressions/Expression.hpp>
+
+namespace Ast {
+
+class AttributeIdentifier final
+	: public ValueReferenceIdentifier
+{
+protected:
+	bool m_isStatic;
+	bool m_isObservable;
+	bool m_isControllable;
+	Expression* m_initializer;
+
+	AttributeIdentifier():
+		ValueReferenceIdentifier(IdentifierKind::AttributeIdentifier),
+		m_isStatic    (false),
+		m_isObservable (false),
+		m_isControllable (false),
+		m_initializer (nullptr)
+	{}
+
+	AttributeIdentifier(const AttributeIdentifier& toCopy) :
+		ValueReferenceIdentifier(toCopy),
+		m_isStatic    (toCopy.m_isStatic),
+		m_isObservable (toCopy.m_isObservable),
+		m_isControllable (toCopy.m_isControllable),
+		m_initializer (toCopy.m_initializer)
+	{}
+
+	static AttributeIdentifier* create() {return new AttributeIdentifier();}
+	static AttributeIdentifier* createCopy(const AttributeIdentifier& toCopy) {return new AttributeIdentifier(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void init (std::int32_t line, std::int32_t col, const char* text,
+			IScope* scopeRef, Type* typeRef, Expression* initRef,
+			bool isStatic, bool isControllable, bool isObservable)
+	{
+		ValueReferenceIdentifier::init(line,col,text,scopeRef,typeRef);
+		m_initializer = initRef;
+		m_isStatic = isStatic;
+		m_isControllable = isControllable;
+		m_isObservable = isObservable;
+	}
+
+	Expression* initializer() const { return m_initializer; };
+	bool isStatic() const { return m_isStatic; };
+	bool isObservable() const { return m_isObservable; };
+	bool isControllable() const { return m_isControllable; };
+
+	void accept(IAstVisitor& visitor) override { visitor.visit(this); };
+	void setInitializer(Expression* newExpr) { m_initializer = newExpr; };
+};
+
+}
Index: trunk/compiler/cppAst/ast/identifiers/ParameterIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/ParameterIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/ParameterIdentifier.hpp	(revision 2)
@@ -0,0 +1,48 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/LocalVariableIdentifier.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class ParameterIdentifier final
+	: public LocalVariableIdentifier
+{
+protected:
+	ParameterIdentifier(): LocalVariableIdentifier(IdentifierKind::ParameterIdentifier) {};
+	ParameterIdentifier(const ParameterIdentifier& toCopy): LocalVariableIdentifier(toCopy) {};
+
+	static ParameterIdentifier* create(){return new ParameterIdentifier();};
+	static ParameterIdentifier* createCopy(const ParameterIdentifier& toCopy){return new ParameterIdentifier(toCopy);};
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void accept(IAstVisitor& visitor) override { visitor.visit(this); };
+};
+}
Index: trunk/compiler/cppAst/ast/identifiers/LocalVariableIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/LocalVariableIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/LocalVariableIdentifier.hpp	(revision 2)
@@ -0,0 +1,55 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/ValueReferenceIdentifier.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class LocalVariableIdentifier
+	: public ValueReferenceIdentifier
+{
+protected:
+	LocalVariableIdentifier(IdentifierKind id):
+		ValueReferenceIdentifier(id)
+	{};
+	LocalVariableIdentifier():
+		ValueReferenceIdentifier(IdentifierKind::LocalVariableIdentifier)
+	{};
+	LocalVariableIdentifier(const LocalVariableIdentifier& toCopy):
+		ValueReferenceIdentifier(toCopy)
+	{};
+
+	static LocalVariableIdentifier* create() {return new LocalVariableIdentifier();}
+	static LocalVariableIdentifier* createCopy(const LocalVariableIdentifier& toCopy) {return new LocalVariableIdentifier(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void accept(IAstVisitor& visitor) override { visitor.visit(this); };
+};
+}
Index: trunk/compiler/cppAst/ast/AstFactory.hpp
===================================================================
--- trunk/compiler/cppAst/ast/AstFactory.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/AstFactory.hpp	(revision 2)
@@ -0,0 +1,180 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+/*
+ * AstFactory.hpp
+ *
+ *  Created on: Dec 22, 2013
+ *      Author: willibald
+ */
+
+
+#pragma once
+
+#include <string>
+#include <CallContext.hpp>
+#include <ast/identifiers/Identifier.hpp>
+#include <ast/types/Type.hpp>
+#include <ast/expressions/Expression.hpp>
+#include <ast/statements/Statement.hpp>
+#include <cstdint>
+#include <ast/Containers.hpp>
+
+/**
+ * The Ast::Factory namespace defines all functions the can be used to
+ * create new AST objects.
+ */
+
+namespace Ast{
+namespace Factory {
+
+	/** Creates an object and registers it with the context. */
+	ActionSystemInstance* createActionSystemInstance(CallContext &context);
+	SymbolTable* createSymbolTable(CallContext &context);
+	ParameterList* createParameterList(CallContext &context);
+	TypeList* createTypeList(CallContext &context);
+	ActionSystemInstanceList* createActionSystemInstanceList(CallContext &context);
+	ExpressionList* createExpressionList(CallContext &context);
+	IdentifierList* createIdentifierList(CallContext &context);
+	StatementList* createStatementList(CallContext &context);
+	Type* createType(CallContext &context, TypeKind t);
+	Statement* createStatement(CallContext &context, StatementKind t);
+	Identifier* createIdentifier(CallContext &context, IdentifierKind t);
+	Expression* createExpression(CallContext &context, ExpressionKind t);
+
+
+	bool addSymbolToTable(void* symbolTable, void* identifier);
+	bool addParameterToList(void* parameterList, void* parameterIdentifier);
+	bool addTypeToList(void* typeList, void* type);
+	bool addActionSystemInstanceToList(void* objectsList, void* instanceRef);
+	bool addIdentifierToBlock(void* idBlock, void* idRef);
+	bool addExpressionToList(void* exprList, void* exprRef);
+	bool addStatementToList(void* stmtList, void* stmtRef);
+	bool addIdentifierToList(void* idList, void* idRef);
+
+
+	/** Initializers.. */
+	bool initIdentifier(void* id, std::int32_t line, std::int32_t col, const char* text,
+		void* scopeRef, void* typeRef);
+	bool initEnumIdentifier(void* enumId, std::int32_t line, std::int32_t col, const char* text,
+			void* scopeRef, void* typeRef, bool haveValue, std::int32_t value);
+	bool initConstIdentifier(void* constId, std::int32_t line, std::int32_t col, const char* text,
+		void* scopeRef, void* typeRef, void* valueRef);
+	bool initAttrIdentifier(void* attrId, std::int32_t line, std::int32_t col, const char* text,
+		void* scopeRef, void* typeRef, void* initRef,bool isStatic, bool isControllable, bool isObservable);
+	bool initExprVarIdentifier(void* exprVarId, std::int32_t line, std::int32_t col, const char* text,
+		void* scopeRef, void* typeRef, bool initialized);
+	bool initTypeIdentifier(void* typeId, std::int32_t line, std::int32_t col, const char* text,
+		void* scopeRef, void* typeRef, const char* prefix);
+	bool initMethodIdentifier(void* methodId, std::int32_t line, std::int32_t col, const char* text,
+		void* scopeRef, void* typeRef, const char* prefix, void* parameterListRef, void* symbolTableRef,
+		void* bodyRef);
+	bool initModule(void* moduleId, int line, int col, const char* text, void* scopeRef,
+		void* typeRef, const char* prefix, void* symTabRef);
+	bool initMainModule(void* moduleId, int line, int col, const char* text, void* scopeRef,
+		void* typeRef, const char* prefix, void* symTabRef, void* idListRef);
+
+	bool initIntType(void* typeId, void* identifierRef, bool anonymousType, std::int32_t low,
+		std::int32_t high);
+	bool initBoolType(void* typeId, void* identifierRef, bool anonymousType);
+	bool initValuedEnumType(void* typeId, void* identifierRef, bool anonymousType, void* symTabRef,
+		void* intTypeRef);
+	bool initEnumType(void* typeId,void* identifierRef, bool anonymousType, void* symTabRef);
+	bool initListType(void* typeId, void* identifierRef, bool anonymousType, void* innerTypeRef,
+		std::uint32_t maxNumberOfElements);
+	bool initTupleType(void* typeId, void* identifierRef, bool anonymousType, void* typeListRef);
+	bool initFunctionType(void* typeId, void* identifierRef, bool anonymousType, void* paramTypeListRef,
+		void* returnTypeRef, std::int32_t functionKind, bool isPure);
+	bool initActionSystemInstance(void* instance, void* typeRef, const char* name,
+		std::int32_t numOfCreatedObjs, void* parentInstanceRef);
+	bool initActionSystemType(void* typeId, void* identifierRef, bool anonymousType, void* baseTypeRef,
+		void* parentScopeRef, void* doOdBlockRef, void* symTab, void* objectsListRef,
+		void* derivedObjectsListRef, bool autoConstruction, bool isInSystemDescription);
+	bool initNullType(void* typeId, void* identifierRef, bool anonymousType);
+
+	bool initSkip(void* stmnt, std::int32_t line, std::int32_t col);
+	bool initBreak(void* stmnt, std::int32_t line, std::int32_t col);
+	bool initAbort(void* stmnt, std::int32_t line, std::int32_t col);
+	bool initNondetBlock(void* block, std::int32_t line, std::int32_t col,
+			void* symTabRef, void* stmtListRef, void* scopeRef);
+	bool initSeqBlock(void* block, std::int32_t line, std::int32_t col,
+			void* symTabRef, void* stmtListRef, void* scopeRef, void* filterExprRef);
+	bool initPrioBlock(void* block, std::int32_t line, std::int32_t col,
+			void* symTabRef, void* stmtListRef, void* scopeRef);
+	bool initGuardedCommand(void* stmt,std::int32_t line,std::int32_t pos,
+			void* scopeRef,void* guardExprRef,void* bodyRef);
+	bool initAssignment(void* stmt,std::int32_t line,std::int32_t pos,void* scopeRef,
+			void* nonDetExprRef, void* placeExprListRef, void* valueExprListRef, void* symTabRef);
+	bool initCall(void* stmt,std::int32_t line,std::int32_t pos,void* callExprRef);
+
+	bool initTypeExpression(void* expr, std::int32_t line, std::int32_t pos,
+			void* typeRef, void* callTargetsIdentifierListRef, void* symbTabRef);
+	bool initIdentifierExpression(void* expr, std::int32_t line, std::int32_t pos,
+			void* typeRef, void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* identifierRef, bool isSelf);
+	bool initUnaryExpression(void* expr, std::int32_t line, std::int32_t pos,
+			void* typeRef, void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* child);
+	bool initBinaryExpression(void* expr, std::int32_t line, std::int32_t pos,
+			void* typeRef, void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* left, void* right);
+	bool initTernaryExpression(void* expr, std::int32_t line, std::int32_t pos,
+			void* typeRef, void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* left, void* mid, void* right, void* defScopeRef);
+	bool initIntValueExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+			void* callTargetsIdentifierListRef, void* symbTabRef, std::int32_t value);
+	bool initBoolValueExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+			void* callTargetsIdentifierListRef, void* symbTabRef,bool value);
+	bool initRefValueExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+			void* callTargetsIdentifierListRef, void* symbTabRef, void* value);
+	bool initListConstructor(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+			void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* exprList, void* symTab, void* parentScope,
+			void* comprehension, bool hasComprehension);
+	bool initSetConstructor(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+			void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* exprList, void* symTab, void* parentScope,
+			void* comprehension, bool hasComprehension);
+	bool initTupleConstructor(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+			void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* exprList, void* tupleTypeId, bool isMatcher);
+	bool initAccessExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+			void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* left, void* right);
+	bool initTupleMapAccessExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+			void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* child, void* argument);
+	bool initCallExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+			void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* child, void* argumentList, void* scopeRef);
+	bool initQuantifierExpression(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+			void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* child, void* symTabRef, void* scopeRef);
+	bool initObjectConstructor(void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+			void* callTargetsIdentifierListRef, void* symbTabRef,
+			void* instanceList, std::uint32_t currentInstance, const char* name);
+
+}
+}
+
Index: trunk/compiler/cppAst/ast/identifiers/ExpressionVariableIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/ExpressionVariableIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/ExpressionVariableIdentifier.hpp	(revision 2)
@@ -0,0 +1,66 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/LocalVariableIdentifier.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class ExpressionVariableIdentifier final
+	: public LocalVariableIdentifier
+{
+protected:
+	bool m_isInitialized;
+
+	ExpressionVariableIdentifier():
+		LocalVariableIdentifier(IdentifierKind::ExpressionVariableIdentifier),
+		m_isInitialized (false)
+	{}
+	ExpressionVariableIdentifier(const ExpressionVariableIdentifier& toCopy):
+		LocalVariableIdentifier(toCopy),
+		m_isInitialized (toCopy.m_isInitialized)
+	{}
+
+	static ExpressionVariableIdentifier* create() {return new ExpressionVariableIdentifier();}
+	static ExpressionVariableIdentifier* createCopy(const ExpressionVariableIdentifier& toCopy) {return new ExpressionVariableIdentifier(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void init (std::int32_t line, std::int32_t col, const char* text,
+			IScope* scopeRef, Type* typeRef, bool initialized)
+	{
+		LocalVariableIdentifier::init(line, col, text, scopeRef, typeRef);
+		m_isInitialized = initialized;
+	}
+
+	bool initialized() const {return m_isInitialized; };
+	void setInitialized(bool newValue) {m_isInitialized = newValue;};
+
+	void accept(IAstVisitor& visitor) override { visitor.visit(this); };
+};
+}
Index: trunk/compiler/cppAst/ast/identifiers/NamedActionIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/NamedActionIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/NamedActionIdentifier.hpp	(revision 2)
@@ -0,0 +1,52 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/FunctionIdentifier.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class NamedActionIdentifier final
+	: public FunctionIdentifier
+{
+protected:
+	NamedActionIdentifier():
+		FunctionIdentifier(IdentifierKind::NamedActionIdentifier)
+	{}
+	NamedActionIdentifier(const NamedActionIdentifier& toCopy):
+		FunctionIdentifier(toCopy)
+	{}
+
+	static NamedActionIdentifier* create() {return new NamedActionIdentifier();}
+	static NamedActionIdentifier* createCopy(const NamedActionIdentifier& toCopy) {return new NamedActionIdentifier(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/identifiers/ValueReferenceIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/ValueReferenceIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/ValueReferenceIdentifier.hpp	(revision 2)
@@ -0,0 +1,39 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/Identifier.hpp>
+
+namespace Ast {
+
+class ValueReferenceIdentifier
+	: public Identifier
+{
+protected:
+	ValueReferenceIdentifier(IdentifierKind id) : Identifier(id) {};
+	ValueReferenceIdentifier(const ValueReferenceIdentifier& toCopy) : Identifier(toCopy) {};
+};
+}
Index: trunk/compiler/cppAst/ast/CompleteAstTraversalVisitor.cpp
===================================================================
--- trunk/compiler/cppAst/ast/CompleteAstTraversalVisitor.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/CompleteAstTraversalVisitor.cpp	(revision 2)
@@ -0,0 +1,382 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+/*
+ * CompleteAstTraversalVisitor.cpp
+ *
+ *  Created on: Dec 28, 2013
+ *      Author: willibald
+ */
+
+#include "CompleteAstTraversalVisitor.hpp"
+#include <ast/identifiers/EnumIdentifier.hpp>
+#include <ast/identifiers/AttributeIdentifier.hpp>
+#include <ast/identifiers/ExpressionVariableIdentifier.hpp>
+#include <ast/identifiers/MethodIdentifier.hpp>
+#include <ast/identifiers/ConstantIdentifier.hpp>
+#include <ast/identifiers/NamedActionIdentifier.hpp>
+#include <ast/identifiers/MainModule.hpp>
+#include <ast/identifiers/IdentifierBlock.hpp>
+#include <ast/statements/NondetBlock.hpp>
+#include <ast/statements/PrioBlock.hpp>
+#include <ast/statements/SeqBlock.hpp>
+#include <ast/statements/Assignment.hpp>
+#include <ast/statements/GuardedCommand.hpp>
+#include <ast/statements/Call.hpp>
+#include <ast/expressions/IdentifierExpression.hpp>
+#include <ast/expressions/TypeExpression.hpp>
+#include <ast/expressions/ListConstructor.hpp>
+#include <ast/expressions/SetConstructor.hpp>
+#include <ast/expressions/TupleConstructor.hpp>
+#include <ast/expressions/AccessExpression.hpp>
+#include <ast/expressions/BinaryOperator.hpp>
+#include <ast/expressions/TernaryOperator.hpp>
+#include <ast/expressions/TupleMapAccessExpression.hpp>
+#include <ast/expressions/CallExpression.hpp>
+#include <ast/expressions/ForallQuantifier.hpp>
+#include <ast/expressions/ExistsQuantifier.hpp>
+#include <ast/expressions/UnaryOperator.hpp>
+#include <ast/types/EnumType.hpp>
+#include <ast/types/ListType.hpp>
+#include <ast/types/TupleType.hpp>
+#include <ast/types/FunctionType.hpp>
+#include <ast/types/ActionSystemType.hpp>
+#include <ast/expressions/ObjectConstructor.hpp>
+
+
+namespace Ast {
+
+CompleteAstTraversalVisitor::CompleteAstTraversalVisitor(CallContext* context, bool duplicateVisit):
+		m_visited(),
+		m_context(context),
+		m_DuplicateVisit(duplicateVisit)
+{}
+
+CompleteAstTraversalVisitor::~CompleteAstTraversalVisitor()
+{}
+
+
+void CompleteAstTraversalVisitor::visitSub(AstElement* subElement, AstElement* parent) {
+	if (subElement == nullptr)
+		return;
+	if (m_visited.count(subElement) > 0)
+		return;
+	if (!m_DuplicateVisit)
+		m_visited[subElement] = true;
+	visitAstElement(subElement, parent);
+}
+
+void CompleteAstTraversalVisitor::visitAstElement(AstElement* element, AstElement* parent){
+	switch (element->nodeType()) {
+	case AstNodeTypeEnum::type:
+		visitType(static_cast<Type*>(element), parent);
+		break;
+	case AstNodeTypeEnum::identifier:
+		visitIdentifier((Identifier*)element, parent);
+		break;
+	case AstNodeTypeEnum::expression:
+		visitExpression((Expression*)element, parent);
+		break;
+	case AstNodeTypeEnum::statement:
+		visitStatement((Statement*)element, parent);
+		break;
+	default:
+		m_context->logError("Internal error. Unknown AST type.");
+		abort();
+	}
+}
+
+
+void CompleteAstTraversalVisitor::visitType(Type* element, AstElement* ) {
+	element->accept(*this); // could be replaced by direct switch here..
+}
+
+void CompleteAstTraversalVisitor::visitIdentifier(Identifier* element, AstElement* ) {
+	element->accept(*this); // could be replaced by direct switch here..
+}
+
+void CompleteAstTraversalVisitor::visitExpression(Expression* element, AstElement* ) {
+	element->accept(*this); // could be replaced by direct switch here..
+}
+
+void CompleteAstTraversalVisitor::visitStatement(Statement* element, AstElement* ) {
+	element->accept(*this); // could be replaced by direct switch here..
+}
+
+void CompleteAstTraversalVisitor::visit(TypeIdentifier* typeIdentifier) {
+	visitSub(typeIdentifier->type(), typeIdentifier);
+};
+
+void CompleteAstTraversalVisitor::visit(EnumIdentifier* enumIdentifier) {
+	visitSub(enumIdentifier->type(), enumIdentifier);
+};
+
+//void CompleteAstTraversalVisitor::visit(ValuedEnumIdentifier* enumIdentifier) {};
+
+void CompleteAstTraversalVisitor::visit(AttributeIdentifier* attributeIdentifier) {
+	visitSub(attributeIdentifier->type(), attributeIdentifier);
+	visitSub(attributeIdentifier->initializer(), attributeIdentifier);
+};
+
+void CompleteAstTraversalVisitor::visit(LocalVariableIdentifier* localVariableIdentifier) {
+	visitSub(localVariableIdentifier->type(), localVariableIdentifier);
+};
+
+void CompleteAstTraversalVisitor::visit(ParameterIdentifier* parameterIdentifier) {
+	visitSub(parameterIdentifier->type(), parameterIdentifier);
+};
+
+void CompleteAstTraversalVisitor::visit(ExpressionVariableIdentifier* expressionVariableIdentifier) {
+	visitSub(expressionVariableIdentifier->type(), expressionVariableIdentifier);
+};
+
+void CompleteAstTraversalVisitor::visit(MethodIdentifier* methodIdentifier) {
+	visitSub(methodIdentifier->type(), methodIdentifier);
+	for (auto& sym: *(methodIdentifier->symbolTable()))
+		visitSub(sym.second, methodIdentifier);
+	for (auto& par: methodIdentifier->parameter())
+		visitSub(par, methodIdentifier);
+	visitSub(methodIdentifier->body(), methodIdentifier);
+};
+
+void CompleteAstTraversalVisitor::visit(NamedActionIdentifier* namedActionIdentifier) {
+	visitSub(namedActionIdentifier->type(), namedActionIdentifier);
+	for (auto& sym : *namedActionIdentifier->symbolTable())
+		visitSub(sym.second, namedActionIdentifier);
+	for (auto& par: namedActionIdentifier->parameter())
+		visitSub(par, namedActionIdentifier);
+	visitSub(namedActionIdentifier->body(), namedActionIdentifier);
+};
+
+void CompleteAstTraversalVisitor::visit(Module* module) {
+	for (auto& sym: *module->symbolTable())
+		visitSub(sym.second, module);
+};
+
+void CompleteAstTraversalVisitor::visit(ConstantIdentifier* constantIdentifier) {
+	visitSub(constantIdentifier->type(), constantIdentifier);
+	visitSub(constantIdentifier->value(), constantIdentifier);
+};
+
+void CompleteAstTraversalVisitor::visit(UnspecIdentifierBlock* unspecIdentifierList) {
+	for (auto& id: unspecIdentifierList->identifiers())
+		visitSub(id, unspecIdentifierList);
+};
+
+void CompleteAstTraversalVisitor::visit(SeqIdentifierBlock* seqIdentifierList) {
+	for (auto& id: seqIdentifierList->identifiers())
+		visitSub(id, seqIdentifierList);
+};
+
+void CompleteAstTraversalVisitor::visit(NondetIdentifierBlock* nondetIdentifierList) {
+	for (auto& id: nondetIdentifierList->identifiers())
+		visitSub(id, nondetIdentifierList);
+};
+
+void CompleteAstTraversalVisitor::visit(PrioIdentifierBlock* prioIdentifierList) {
+	for (auto& id: prioIdentifierList->identifiers())
+		visitSub(id, prioIdentifierList);
+};
+
+void CompleteAstTraversalVisitor::visit(MainModule* mainModule) {
+	for (auto& sym: *mainModule->symbolTable())
+		visitSub(sym.second, mainModule);
+	visitSub(mainModule->systemDescription(), mainModule);
+};
+
+void CompleteAstTraversalVisitor::visit(IntType* ) {};
+void CompleteAstTraversalVisitor::visit(BoolType* ) {};
+
+void CompleteAstTraversalVisitor::visit(EnumType* enumType) {
+	for (auto& sym: enumType->listOfEnumSymbols())
+		visitSub(sym, enumType);
+};
+
+void CompleteAstTraversalVisitor::visit(ListType* listType) {
+	visitSub(listType->innerType(), listType);
+};
+
+void CompleteAstTraversalVisitor::visit(TupleType* tupleType) {
+	for (auto& t: tupleType->innerTypes())
+		visitSub(t, tupleType);
+};
+
+void CompleteAstTraversalVisitor::visit(NullType* ) {};
+
+void CompleteAstTraversalVisitor::visit(FunctionType* functionType) {
+	for (auto& a: functionType->parameter())
+		visitSub(a, functionType);
+	visitSub(functionType->returnType(), functionType);
+};
+
+void CompleteAstTraversalVisitor::visit(ActionSystemType* actionSystemType) {
+	for (auto& s: *actionSystemType->symbols())
+		visitSub(s.second, actionSystemType);
+
+	visitSub(actionSystemType->doodBlock(), actionSystemType);
+};
+
+void CompleteAstTraversalVisitor::visit(GuardedCommand* guardedCommand) {
+	visitSub(guardedCommand->guard(), guardedCommand);
+	visitSub(guardedCommand->body(), guardedCommand);
+};
+
+void CompleteAstTraversalVisitor::visit(Call* call) {
+	visitSub(call->callExpression(), call);
+};
+
+void CompleteAstTraversalVisitor::visit(Assignment* assignment) {
+	for (auto& vexp: assignment->places())
+		visitSub(vexp, assignment);
+	for (auto& expr: assignment->values())
+		visitSub(expr, assignment);
+
+	visitSub(assignment->nondetExpression(), assignment);
+};
+
+void CompleteAstTraversalVisitor::visit(SeqBlock* seqBlock) {
+	for (auto& id: *seqBlock->symbols())
+		visitSub(id.second, seqBlock);
+
+	if (seqBlock->filter() != nullptr)
+		visitSub(seqBlock->filter(), seqBlock);
+
+	for (auto& stmnt: seqBlock->statements())
+		visitSub(stmnt, seqBlock);
+};
+
+void CompleteAstTraversalVisitor::visit(NondetBlock* nondetBlock) {
+	for (auto& id: *nondetBlock->symbols())
+		visitSub(id.second, nondetBlock);
+
+	for (auto& stmnt: nondetBlock->statements())
+		visitSub(stmnt, nondetBlock);
+};
+
+void CompleteAstTraversalVisitor::visit(PrioBlock* prioBlock) {
+	for (auto& id: *prioBlock->symbols())
+		visitSub(id.second, prioBlock);
+
+	for (auto& stmnt: prioBlock->statements())
+		visitSub(stmnt, prioBlock);
+};
+
+void CompleteAstTraversalVisitor::visit(Skip* ) {};
+void CompleteAstTraversalVisitor::visit(Break* ) {};
+void CompleteAstTraversalVisitor::visit(Abort* ) {};
+
+void CompleteAstTraversalVisitor::visit(TernaryOperator* ternaryOperator) {
+	visitSub(ternaryOperator->left(), ternaryOperator);
+	visitSub(ternaryOperator->mid(), ternaryOperator);
+	visitSub(ternaryOperator->right(), ternaryOperator);
+};
+
+void CompleteAstTraversalVisitor::visit(BinaryOperator* binaryOperator) {
+	visitSub(binaryOperator->left(), binaryOperator);
+	visitSub(binaryOperator->right(), binaryOperator);
+};
+
+void CompleteAstTraversalVisitor::visit(UnaryOperator* unaryOperator) {
+	visitSub(unaryOperator->child(), unaryOperator);
+	if (unaryOperator->kind() == ExpressionKind::Cast)
+		visitSub(unaryOperator->type(), unaryOperator);
+};
+
+void CompleteAstTraversalVisitor::visit(ExistsQuantifier* quantifier) {
+	for (auto& lvar: *quantifier->symbols())
+		visitSub(lvar.second, quantifier);
+
+	visitSub(quantifier->child(), quantifier);
+};
+
+void CompleteAstTraversalVisitor::visit(ForallQuantifier* quantifier) {
+	for (auto& lvar: *quantifier->symbols())
+		visitSub(lvar.second, quantifier);
+
+	visitSub(quantifier->child(), quantifier);
+};
+
+void CompleteAstTraversalVisitor::visit(ListConstructor* listConstructor) {
+	for (auto& lvar: *listConstructor->comprehensionVariables())
+		visitSub(lvar.second, listConstructor);
+
+	for (auto& elems: listConstructor->elements())
+		visitSub(elems, listConstructor);
+
+	visitSub(listConstructor->comprehension(), listConstructor);
+};
+
+void CompleteAstTraversalVisitor::visit(SetConstructor* setConstructor) {
+	for (auto& svar: *setConstructor->comprehensionVariables())
+		visitSub(svar.second, setConstructor);
+
+	for (auto& elems: setConstructor->items())
+		visitSub(elems, setConstructor);
+
+	visitSub(setConstructor->comprehension(), setConstructor);
+};
+
+void CompleteAstTraversalVisitor::visit(TupleConstructor* tupleConstructor) {
+	for (auto& elem: tupleConstructor->values())
+		visitSub(elem, tupleConstructor);
+};
+
+void CompleteAstTraversalVisitor::visit(ObjectConstructor* objectConstructor) {
+	visitSub(objectConstructor->type(), objectConstructor);
+};
+
+void CompleteAstTraversalVisitor::visit(BoolValueExpression* ) {};
+void CompleteAstTraversalVisitor::visit(IntValueExpression* ) {};
+void CompleteAstTraversalVisitor::visit(RefValueExpression* ) {};
+
+void CompleteAstTraversalVisitor::visit(IdentifierExpression* identifierExpression) {
+	visitSub(identifierExpression->type(), identifierExpression);
+	visitSub(identifierExpression->identifier(), identifierExpression);
+};
+
+void CompleteAstTraversalVisitor::visit(TypeExpression* typeExpression) {
+	visitSub(typeExpression->type(), typeExpression);
+};
+
+void CompleteAstTraversalVisitor::visit(TupleMapAccessExpression* tupleMapAccessExpression) {
+	visitSub(tupleMapAccessExpression->argument(), tupleMapAccessExpression);
+	visitSub(tupleMapAccessExpression->child(), tupleMapAccessExpression);
+};
+
+void CompleteAstTraversalVisitor::visit(CallExpression* callExpression) {
+	for (auto& arg: callExpression->arguments())
+		visitSub(arg, callExpression);
+	visitSub(callExpression->child(), callExpression);
+};
+
+void CompleteAstTraversalVisitor::visit(AccessExpression* accessExpression) {
+	visitSub(accessExpression->left(), accessExpression);
+	visitSub(accessExpression->right(), accessExpression);
+};
+
+void CompleteAstTraversalVisitor::visit(PointerType* ) {
+
+}
+
+} /* namespace Ast */
Index: trunk/compiler/cppAst/ast/identifiers/IdentifierBlock.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/IdentifierBlock.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/IdentifierBlock.hpp	(revision 2)
@@ -0,0 +1,140 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/Identifier.hpp>
+#include <deque>
+#include <ast/IAstVisitor.hpp>
+#include <ast/Containers.hpp>
+
+namespace Ast {
+
+enum class IdentifierBlockKind {
+	normal = 0,
+	nondeterministic = 1,
+	seqential = 2,
+	prioritized = 3
+};
+
+class IdentifierBlock
+	: public Identifier
+{
+protected:
+	IdentifierList m_list;
+
+	IdentifierBlock(IdentifierKind kind):
+		Identifier(kind),
+		m_list()
+	{}
+public:
+	IdentifierBlock(const IdentifierBlock &toCopy):
+		Identifier(toCopy),
+		m_list(toCopy.m_list)
+	{}
+
+
+	IdentifierList& identifiers() {return m_list;};
+	void addElement(Identifier* toAdd) {m_list.push_back(toAdd);};
+};
+
+class UnspecIdentifierBlock final
+	: public IdentifierBlock
+{
+	UnspecIdentifierBlock():
+		IdentifierBlock(IdentifierKind::List_Normal)
+	{}
+	UnspecIdentifierBlock(const UnspecIdentifierBlock &toCopy):
+		IdentifierBlock(toCopy)
+	{}
+
+	static UnspecIdentifierBlock* create() {return new UnspecIdentifierBlock();}
+	static UnspecIdentifierBlock* createCopy(const UnspecIdentifierBlock& toCopy) {return new UnspecIdentifierBlock(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+
+class SeqIdentifierBlock final
+	: public IdentifierBlock
+{
+protected:
+	SeqIdentifierBlock():
+		IdentifierBlock(IdentifierKind::List_Seqential)
+	{}
+	SeqIdentifierBlock(const SeqIdentifierBlock &toCopy):
+		IdentifierBlock(toCopy)
+	{}
+
+	static SeqIdentifierBlock* create() {return new SeqIdentifierBlock();}
+	static SeqIdentifierBlock* createCopy(const SeqIdentifierBlock& toCopy) {return new SeqIdentifierBlock(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+
+class NondetIdentifierBlock final
+	: public IdentifierBlock
+{
+protected:
+	NondetIdentifierBlock():
+		IdentifierBlock(IdentifierKind::List_Nondeterministic)
+	{}
+	NondetIdentifierBlock(const NondetIdentifierBlock &toCopy):
+		IdentifierBlock(toCopy)
+	{}
+
+	static NondetIdentifierBlock* create() {return new NondetIdentifierBlock();}
+	static NondetIdentifierBlock* createCopy(const NondetIdentifierBlock& toCopy) {return new NondetIdentifierBlock(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+
+class PrioIdentifierBlock final
+	: public IdentifierBlock
+{
+	PrioIdentifierBlock():
+		IdentifierBlock(IdentifierKind::List_Prioritized)
+	{}
+	PrioIdentifierBlock(const PrioIdentifierBlock &toCopy):
+		IdentifierBlock(toCopy)
+	{}
+
+	static PrioIdentifierBlock* create() {return new PrioIdentifierBlock();}
+	static PrioIdentifierBlock* createCopy(const PrioIdentifierBlock& toCopy) {return new PrioIdentifierBlock(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/serialize/gen/FunctionNames.pb.h
===================================================================
--- trunk/compiler/cppAst/ast/serialize/gen/FunctionNames.pb.h	(nonexistent)
+++ trunk/compiler/cppAst/ast/serialize/gen/FunctionNames.pb.h	(revision 2)
@@ -0,0 +1,253 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: FunctionNames.proto
+
+#ifndef PROTOBUF_FunctionNames_2eproto__INCLUDED
+#define PROTOBUF_FunctionNames_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+// @@protoc_insertion_point(includes)
+
+namespace serialize {
+
+// Internal implementation detail -- do not call these.
+void  protobuf_AddDesc_FunctionNames_2eproto();
+void protobuf_AssignDesc_FunctionNames_2eproto();
+void protobuf_ShutdownFile_FunctionNames_2eproto();
+
+
+enum PBAdd {
+  TIRESIAS_ADD_IDENTIFIERTOLIST = 0,
+  TIRESIAS_ADD_TYPETOLIST = 1,
+  TIRESIAS_ADD_STATEMENTTOLIST = 2,
+  TIRESIAS_ADD_EXPRESSIONTOLIST = 3,
+  TIRESIAS_ADD_IDTOSYMBTAB = 4,
+  TIRESIAS_ADD_PARAMTOLIST = 5,
+  TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST = 6,
+  TIRESIAS_ADD_IDENTIFIERTOBLOCK = 7
+};
+bool PBAdd_IsValid(int value);
+const PBAdd PBAdd_MIN = TIRESIAS_ADD_IDENTIFIERTOLIST;
+const PBAdd PBAdd_MAX = TIRESIAS_ADD_IDENTIFIERTOBLOCK;
+const int PBAdd_ARRAYSIZE = PBAdd_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* PBAdd_descriptor();
+inline const ::std::string& PBAdd_Name(PBAdd value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    PBAdd_descriptor(), value);
+}
+inline bool PBAdd_Parse(
+    const ::std::string& name, PBAdd* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<PBAdd>(
+    PBAdd_descriptor(), name, value);
+}
+enum PBAllocation {
+  TIRESIAS_CREATE_IDENTIFIER = 0,
+  TIRESIAS_CREATE_TYPE = 1,
+  TIRESIAS_CREATE_STATEMENT = 2,
+  TIRESIAS_CREATE_EXPRESSION = 3,
+  TIRESIAS_CREATE_STATEMENTLIST = 4,
+  TIRESIAS_CREATE_EXPRESSIONLIST = 5,
+  TIRESIAS_CREATE_IDENTIFIERLIST = 6,
+  TIRESIAS_CREATE_SYMBTAB = 7,
+  TIRESIAS_CREATE_PARAMLIST = 8,
+  TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE = 9,
+  TIRESIAS_CREATE_TYPELIST = 10,
+  TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST = 11,
+  TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE = 12
+};
+bool PBAllocation_IsValid(int value);
+const PBAllocation PBAllocation_MIN = TIRESIAS_CREATE_IDENTIFIER;
+const PBAllocation PBAllocation_MAX = TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE;
+const int PBAllocation_ARRAYSIZE = PBAllocation_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* PBAllocation_descriptor();
+inline const ::std::string& PBAllocation_Name(PBAllocation value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    PBAllocation_descriptor(), value);
+}
+inline bool PBAllocation_Parse(
+    const ::std::string& name, PBAllocation* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<PBAllocation>(
+    PBAllocation_descriptor(), name, value);
+}
+enum PBIdentifiers {
+  TIRESIAS_INIT_ENUMIDENTIFIER = 1,
+  TIRESIAS_INIT_CONSTIDENTIFIER = 2,
+  TIRESIAS_INIT_ATTRIDENTIFIER = 3,
+  TIRESIAS_INIT_EXPRVARIDENTIFIER = 4,
+  TIRESIAS_INIT_PARAMIDENTIFIER = 5,
+  TIRESIAS_INIT_LOCVARIDENTIFIER = 6,
+  TIRESIAS_INIT_TYPEIDENTIFIER = 7,
+  TIRESIAS_INIT_SELFIDENTIFIER = 8,
+  TIRESIAS_INIT_METHODIDENTIFIER = 9,
+  TIRESIAS_INIT_MODULE = 10,
+  TIRESIAS_INIT_MAINMODULE = 0
+};
+bool PBIdentifiers_IsValid(int value);
+const PBIdentifiers PBIdentifiers_MIN = TIRESIAS_INIT_MAINMODULE;
+const PBIdentifiers PBIdentifiers_MAX = TIRESIAS_INIT_MODULE;
+const int PBIdentifiers_ARRAYSIZE = PBIdentifiers_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* PBIdentifiers_descriptor();
+inline const ::std::string& PBIdentifiers_Name(PBIdentifiers value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    PBIdentifiers_descriptor(), value);
+}
+inline bool PBIdentifiers_Parse(
+    const ::std::string& name, PBIdentifiers* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<PBIdentifiers>(
+    PBIdentifiers_descriptor(), name, value);
+}
+enum PBTypes {
+  TIRESIAS_INIT_INTTYPE = 1,
+  TIRESIAS_INIT_BOOLTYPE = 2,
+  TIRESIAS_INIT_VALUEDENUMTYPE = 3,
+  TIRESIAS_INIT_ENUMTYPE = 4,
+  TIRESIAS_INIT_LISTTYPE = 5,
+  TIRESIAS_INIT_TUPLETYPE = 6,
+  TIRESIAS_INIT_FUNCTIONTYPE = 7,
+  TIRESIAS_INIT_ACTIONSYSTEMINSTANCE = 8,
+  TIRESIAS_INIT_ACTIONSYSTEMTYPE = 9,
+  TIRESIAS_INIT_NULLTYPE = 0
+};
+bool PBTypes_IsValid(int value);
+const PBTypes PBTypes_MIN = TIRESIAS_INIT_NULLTYPE;
+const PBTypes PBTypes_MAX = TIRESIAS_INIT_ACTIONSYSTEMTYPE;
+const int PBTypes_ARRAYSIZE = PBTypes_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* PBTypes_descriptor();
+inline const ::std::string& PBTypes_Name(PBTypes value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    PBTypes_descriptor(), value);
+}
+inline bool PBTypes_Parse(
+    const ::std::string& name, PBTypes* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<PBTypes>(
+    PBTypes_descriptor(), name, value);
+}
+enum PBStatements {
+  TIRESIAS_INIT_SKIP = 3,
+  TIRESIAS_INIT_BREAK = 4,
+  TIRESIAS_INIT_ABORT = 5,
+  TIRESIAS_INIT_NONDETBLOCK = 6,
+  TIRESIAS_INIT_SEQBLOCK = 7,
+  TIRESIAS_INIT_PRIOBLOCK = 8,
+  TIRESIAS_INIT_GUARDEDCOMMAND = 2,
+  TIRESIAS_INIT_ASSIGNMENT = 1,
+  TIRESIAS_INIT_CALL = 0
+};
+bool PBStatements_IsValid(int value);
+const PBStatements PBStatements_MIN = TIRESIAS_INIT_CALL;
+const PBStatements PBStatements_MAX = TIRESIAS_INIT_PRIOBLOCK;
+const int PBStatements_ARRAYSIZE = PBStatements_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* PBStatements_descriptor();
+inline const ::std::string& PBStatements_Name(PBStatements value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    PBStatements_descriptor(), value);
+}
+inline bool PBStatements_Parse(
+    const ::std::string& name, PBStatements* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<PBStatements>(
+    PBStatements_descriptor(), name, value);
+}
+enum PBExpressions {
+  TIRESIAS_INIT_TYPEEXPRESSION = 4,
+  TIRESIAS_INIT_IDENTIFIEREXPRESSION = 5,
+  TIRESIAS_INIT_UNARYEXPRESSION = 6,
+  TIRESIAS_INIT_BINARYEXPRESSION = 7,
+  TIRESIAS_INIT_TERNARYEXPRESSION = 8,
+  TIRESIAS_INIT_INTVALUEEXPRESSION = 9,
+  TIRESIAS_INIT_BOOLVALUEEXPRESSION = 10,
+  TIRESIAS_INIT_REFVALUEEXPRESSION = 11,
+  TIRESIAS_INIT_LISTCONSTRUCTOR = 12,
+  TIRESIAS_INIT_SETCONSTRUCTOR = 13,
+  TIRESIAS_INIT_TUPLECONSTRUCTOR = 14,
+  TIRESIAS_INIT_ACCESSEXPRESSION = 15,
+  TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION = 3,
+  TIRESIAS_INIT_CALLEXPRESSION = 2,
+  TIRESIAS_INIT_QUANTIFIEREXPRESSION = 1,
+  TIRESIAS_INIT_OBJECTCONSTRUCTOR = 0
+};
+bool PBExpressions_IsValid(int value);
+const PBExpressions PBExpressions_MIN = TIRESIAS_INIT_OBJECTCONSTRUCTOR;
+const PBExpressions PBExpressions_MAX = TIRESIAS_INIT_ACCESSEXPRESSION;
+const int PBExpressions_ARRAYSIZE = PBExpressions_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* PBExpressions_descriptor();
+inline const ::std::string& PBExpressions_Name(PBExpressions value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    PBExpressions_descriptor(), value);
+}
+inline bool PBExpressions_Parse(
+    const ::std::string& name, PBExpressions* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<PBExpressions>(
+    PBExpressions_descriptor(), name, value);
+}
+// ===================================================================
+
+
+// ===================================================================
+
+
+// ===================================================================
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+}  // namespace serialize
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::serialize::PBAdd>() {
+  return ::serialize::PBAdd_descriptor();
+}
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::serialize::PBAllocation>() {
+  return ::serialize::PBAllocation_descriptor();
+}
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::serialize::PBIdentifiers>() {
+  return ::serialize::PBIdentifiers_descriptor();
+}
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::serialize::PBTypes>() {
+  return ::serialize::PBTypes_descriptor();
+}
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::serialize::PBStatements>() {
+  return ::serialize::PBStatements_descriptor();
+}
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::serialize::PBExpressions>() {
+  return ::serialize::PBExpressions_descriptor();
+}
+
+}  // namespace google
+}  // namespace protobuf
+#endif  // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif  // PROTOBUF_FunctionNames_2eproto__INCLUDED
Index: trunk/compiler/cppAst/ast/identifiers/ValueIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/ValueIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/ValueIdentifier.hpp	(revision 2)
@@ -0,0 +1,50 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/Identifier.hpp>
+#include <ast/IScope.hpp>
+#include <ast/types/Type.hpp>
+
+namespace Ast {
+
+class ValueIdentifier
+	: public Identifier
+{
+protected:
+	ValueIdentifier(IdentifierKind kind): Identifier(kind) {};
+	ValueIdentifier(const ValueIdentifier& toCopy): Identifier(toCopy) {};
+	void init(std::int32_t line, std::int32_t col, const char* text,
+				IScope* scopeRef, Type* typeRef)
+	{
+		Identifier::init(line,col,text,scopeRef,typeRef);
+	}
+public:
+	~ValueIdentifier() override {};
+
+};
+
+}
Index: trunk/compiler/cppAst/ast/identifiers/Module.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/Module.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/Module.hpp	(revision 2)
@@ -0,0 +1,61 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/Scope.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class Module:
+	public Scope
+{
+protected:
+	Module(IdentifierKind kind) :
+		Scope(kind)
+	{}
+	Module() :
+		Scope(IdentifierKind::Module)
+	{}
+	Module(const Module& toCopy):
+		Scope(toCopy)
+	{}
+
+	static Module* create() {return new Module();}
+	static Module* createCopy(const Module& toCopy) {return new Module(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void init(int line, int col, const char* text, IScope* scopeRef,
+			Type* typeRef, const char* prefix, SymbolTable* symTabRef)
+	{
+		Scope::init(line,col,text,scopeRef,typeRef,prefix,symTabRef);
+	}
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/CompleteAstTraversalVisitor.hpp
===================================================================
--- trunk/compiler/cppAst/ast/CompleteAstTraversalVisitor.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/CompleteAstTraversalVisitor.hpp	(revision 2)
@@ -0,0 +1,115 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include "IAstVisitor.hpp"
+#include <CallContext.hpp>
+#include <base/TiresiasObject.hpp>
+#include <ast/types/Type.hpp>
+#include <ast/identifiers/Identifier.hpp>
+#include <ast/expressions/Expression.hpp>
+#include <ast/statements/Statement.hpp>
+#include <unordered_map>
+
+namespace Ast {
+
+class CompleteAstTraversalVisitor:
+		public Base::TiresiasObject,
+		public  IAstVisitor {
+protected:
+	unordered_map<AstElement*, bool> m_visited;
+	CallContext* m_context;
+	bool m_DuplicateVisit;
+
+	void visitSub(AstElement* subElement, AstElement* parent);
+	void visitAstElement(AstElement* element, AstElement* parent);
+public:
+	CompleteAstTraversalVisitor(CallContext* context, bool duplicateVisit);
+	~CompleteAstTraversalVisitor() override;
+
+	/* Dispatch to one of the visit(X) methods below */
+	virtual void visitType(Type* element, AstElement* parent);
+	virtual void visitIdentifier(Identifier* element, AstElement* parent);
+	virtual void visitExpression(Expression* element, AstElement* parent);
+	virtual void visitStatement(Statement* element, AstElement* parent);
+
+	void visit(TypeIdentifier* typeIdentifier) override;
+	void visit(EnumIdentifier* enumIdentifier) override;
+//	void visit(ValuedEnumIdentifier* enumIdentifier) override;
+	void visit(AttributeIdentifier* attributeIdentifier) override;
+	void visit(LocalVariableIdentifier* localVariableIdentifier) override;
+	void visit(ParameterIdentifier* parameterIdentifier) override;
+	void visit(ExpressionVariableIdentifier* expressionVariableIdentifier) override;
+	void visit(MethodIdentifier* methodIdentifier) override;
+	void visit(NamedActionIdentifier* namedActionIdentifier) override;
+	void visit(Module* module) override;
+	void visit(ConstantIdentifier* constantIdentifier) override;
+	void visit(UnspecIdentifierBlock* unspecIdentifierList) override;
+	void visit(SeqIdentifierBlock* seqIdentifierList) override;
+	void visit(NondetIdentifierBlock* nondetIdentifierList) override;
+	void visit(PrioIdentifierBlock* prioIdentifierList) override;
+	void visit(MainModule* mainModule) override;
+
+	void visit(IntType* intType) override;
+	void visit(BoolType* boolType) override;
+	void visit(EnumType* enumType) override;
+	void visit(ListType* listType) override;
+	void visit(TupleType* tupleType) override;
+	void visit(NullType* nullType) override;
+	void visit(FunctionType* functionType) override;
+	void visit(ActionSystemType* actionSystemType) override;
+
+	void visit(GuardedCommand* guardedCommand) override;
+	void visit(Call* call) override;
+	void visit(Assignment* assignment) override;
+	void visit(SeqBlock* seqBlock) override;
+	void visit(NondetBlock* nondetBlock) override;
+	void visit(PrioBlock* prioBlock) override;
+	void visit(Skip* skipStatement) override;
+	void visit(Break* breakStatement) override;
+	void visit(Abort* abortStatement) override;
+
+	void visit(TernaryOperator* ternaryOperator) override;
+	void visit(BinaryOperator* binaryOperator) override;
+	void visit(UnaryOperator* unaryOperator) override;
+	void visit(ExistsQuantifier* quantifier) override;
+	void visit(ForallQuantifier* quantifier) override;
+	void visit(ListConstructor* listConstructor) override;
+	void visit(SetConstructor* setConstructor) override;
+	void visit(TupleConstructor* tupleConstructor) override;
+	void visit(ObjectConstructor* objectConstructor) override;
+	void visit(BoolValueExpression* identifierExpression) override;
+	void visit(IntValueExpression* identifierExpression) override;
+	void visit(RefValueExpression* identifierExpression) override;
+	void visit(IdentifierExpression* identifierExpression) override;
+	void visit(TypeExpression* typeExpression) override;
+	void visit(TupleMapAccessExpression* tupleMapAccessExpression) override;
+	void visit(CallExpression* callExpression) override;
+	void visit(AccessExpression* accessExpression) override;
+	void visit(PointerType* pt) override;
+};
+
+} /* namespace Ast */
Index: trunk/compiler/cppAst/ast/statements/Assignment.hpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/Assignment.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/Assignment.hpp	(revision 2)
@@ -0,0 +1,100 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/statements/Statement.hpp>
+#include <ast/IScope.hpp>
+#include <deque>
+#include <ast/SymbolTable.hpp>
+#include <ast/IAstVisitor.hpp>
+#include <base/Exceptions.hpp>
+
+namespace Ast {
+
+class Assignment final
+	: public Statement
+	, public IScope
+{
+protected:
+	SymbolTable* m_symbols;
+	Expression* m_nondetExpression;
+	IScope* m_parentScope;
+	ExpressionList m_places;
+	ExpressionList m_values;
+
+	Assignment():
+		Statement(StatementKind::Assignment),
+		m_symbols (nullptr),
+		m_nondetExpression (nullptr),
+		m_parentScope (nullptr),
+		m_places (),
+		m_values ()
+	{};
+	Assignment(const Assignment& toCopy):
+		Statement(toCopy),
+		m_symbols (toCopy.m_symbols),
+		m_nondetExpression (toCopy.m_nondetExpression),
+		m_parentScope (toCopy.m_parentScope),
+		m_places (toCopy.m_places),
+		m_values (toCopy.m_values)
+	{};
+
+	static Assignment* create() {return new Assignment();}
+	static Assignment* createCopy(const Assignment& toCopy) {return new Assignment(toCopy);}
+public:
+	friend class Ast;
+	friend class Statement;
+
+	void init(std::int32_t line, std::int32_t pos, IScope* scopeRef,
+				Expression* nonDetExprRef, ExpressionList* placeExprListRef,
+				ExpressionList* valueExprListRef, SymbolTable*symTabRef)
+	{
+		Statement::init(line,pos);
+		m_parentScope = scopeRef;
+		m_nondetExpression = nonDetExprRef;
+		m_places = std::move(*placeExprListRef);
+		m_values = std::move(*valueExprListRef);
+		m_symbols = symTabRef;
+	}
+
+	ExpressionList& places() {return m_places;};
+	ExpressionList& values() {return m_values;};
+	Expression* nondetExpression() {return m_nondetExpression;};
+	SymbolTable* symbols() {return m_symbols;};
+
+	void addPlace(Expression* aPlace) {m_places.push_back(aPlace);};
+	void addValue(Expression* aValue) {m_values.push_back(aValue);};
+	void setNondetExpression(Expression* anExpr) {m_nondetExpression = anExpr;};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+	Identifier* resolveIdentifier(const std::string& aName) const override { return m_symbols->get(aName); };
+	IScope* getParentScope() const override {return m_parentScope;};
+	std::string getScopeName() const override {return "";}
+	void setParentScope(IScope* parentScope) override {m_parentScope = parentScope;};
+	void addIdentifier(Identifier* anIdentifier, void* ) override {m_symbols->addIdentifier(anIdentifier);};
+
+	IScope* asScope() final {return (IScope*) this;}
+};
+}
Index: trunk/compiler/cppAst/ast/serialize/gen/FunctionNames.pb.cc
===================================================================
--- trunk/compiler/cppAst/ast/serialize/gen/FunctionNames.pb.cc	(nonexistent)
+++ trunk/compiler/cppAst/ast/serialize/gen/FunctionNames.pb.cc	(revision 2)
@@ -0,0 +1,287 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: FunctionNames.proto
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "FunctionNames.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// @@protoc_insertion_point(includes)
+
+namespace serialize {
+
+namespace {
+
+const ::google::protobuf::EnumDescriptor* PBAdd_descriptor_ = NULL;
+const ::google::protobuf::EnumDescriptor* PBAllocation_descriptor_ = NULL;
+const ::google::protobuf::EnumDescriptor* PBIdentifiers_descriptor_ = NULL;
+const ::google::protobuf::EnumDescriptor* PBTypes_descriptor_ = NULL;
+const ::google::protobuf::EnumDescriptor* PBStatements_descriptor_ = NULL;
+const ::google::protobuf::EnumDescriptor* PBExpressions_descriptor_ = NULL;
+
+}  // namespace
+
+
+void protobuf_AssignDesc_FunctionNames_2eproto() {
+  protobuf_AddDesc_FunctionNames_2eproto();
+  const ::google::protobuf::FileDescriptor* file =
+    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+      "FunctionNames.proto");
+  GOOGLE_CHECK(file != NULL);
+  PBAdd_descriptor_ = file->enum_type(0);
+  PBAllocation_descriptor_ = file->enum_type(1);
+  PBIdentifiers_descriptor_ = file->enum_type(2);
+  PBTypes_descriptor_ = file->enum_type(3);
+  PBStatements_descriptor_ = file->enum_type(4);
+  PBExpressions_descriptor_ = file->enum_type(5);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+                 &protobuf_AssignDesc_FunctionNames_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+  protobuf_AssignDescriptorsOnce();
+}
+
+}  // namespace
+
+void protobuf_ShutdownFile_FunctionNames_2eproto() {
+}
+
+void protobuf_AddDesc_FunctionNames_2eproto() {
+  static bool already_here = false;
+  if (already_here) return;
+  already_here = true;
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+    "\n\023FunctionNames.proto\022\tserialize*\231\002\n\005PBA"
+    "dd\022!\n\035TIRESIAS_ADD_IDENTIFIERTOLIST\020\000\022\033\n"
+    "\027TIRESIAS_ADD_TYPETOLIST\020\001\022 \n\034TIRESIAS_A"
+    "DD_STATEMENTTOLIST\020\002\022!\n\035TIRESIAS_ADD_EXP"
+    "RESSIONTOLIST\020\003\022\034\n\030TIRESIAS_ADD_IDTOSYMB"
+    "TAB\020\004\022\034\n\030TIRESIAS_ADD_PARAMTOLIST\020\005\022+\n\'T"
+    "IRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST\020\006"
+    "\022\"\n\036TIRESIAS_ADD_IDENTIFIERTOBLOCK\020\007*\314\003\n"
+    "\014PBAllocation\022\036\n\032TIRESIAS_CREATE_IDENTIF"
+    "IER\020\000\022\030\n\024TIRESIAS_CREATE_TYPE\020\001\022\035\n\031TIRES"
+    "IAS_CREATE_STATEMENT\020\002\022\036\n\032TIRESIAS_CREAT"
+    "E_EXPRESSION\020\003\022!\n\035TIRESIAS_CREATE_STATEM"
+    "ENTLIST\020\004\022\"\n\036TIRESIAS_CREATE_EXPRESSIONL"
+    "IST\020\005\022\"\n\036TIRESIAS_CREATE_IDENTIFIERLIST\020"
+    "\006\022\033\n\027TIRESIAS_CREATE_SYMBTAB\020\007\022\035\n\031TIRESI"
+    "AS_CREATE_PARAMLIST\020\010\022(\n$TIRESIAS_CREATE"
+    "_ACTIONSYSTEMINSTANCE\020\t\022\034\n\030TIRESIAS_CREA"
+    "TE_TYPELIST\020\n\022,\n(TIRESIAS_CREATE_ACTIONS"
+    "YSTEMINSTANCELIST\020\013\022&\n\"TIRESIAS_CAST_AST"
+    "ELEMENT_TO_ISCOPE\020\014*\202\003\n\rPBIdentifiers\022 \n"
+    "\034TIRESIAS_INIT_ENUMIDENTIFIER\020\001\022!\n\035TIRES"
+    "IAS_INIT_CONSTIDENTIFIER\020\002\022 \n\034TIRESIAS_I"
+    "NIT_ATTRIDENTIFIER\020\003\022#\n\037TIRESIAS_INIT_EX"
+    "PRVARIDENTIFIER\020\004\022!\n\035TIRESIAS_INIT_PARAM"
+    "IDENTIFIER\020\005\022\"\n\036TIRESIAS_INIT_LOCVARIDEN"
+    "TIFIER\020\006\022 \n\034TIRESIAS_INIT_TYPEIDENTIFIER"
+    "\020\007\022 \n\034TIRESIAS_INIT_SELFIDENTIFIER\020\010\022\"\n\036"
+    "TIRESIAS_INIT_METHODIDENTIFIER\020\t\022\030\n\024TIRE"
+    "SIAS_INIT_MODULE\020\n\022\034\n\030TIRESIAS_INIT_MAIN"
+    "MODULE\020\000*\277\002\n\007PBTypes\022\031\n\025TIRESIAS_INIT_IN"
+    "TTYPE\020\001\022\032\n\026TIRESIAS_INIT_BOOLTYPE\020\002\022 \n\034T"
+    "IRESIAS_INIT_VALUEDENUMTYPE\020\003\022\032\n\026TIRESIA"
+    "S_INIT_ENUMTYPE\020\004\022\032\n\026TIRESIAS_INIT_LISTT"
+    "YPE\020\005\022\033\n\027TIRESIAS_INIT_TUPLETYPE\020\006\022\036\n\032TI"
+    "RESIAS_INIT_FUNCTIONTYPE\020\007\022&\n\"TIRESIAS_I"
+    "NIT_ACTIONSYSTEMINSTANCE\020\010\022\"\n\036TIRESIAS_I"
+    "NIT_ACTIONSYSTEMTYPE\020\t\022\032\n\026TIRESIAS_INIT_"
+    "NULLTYPE\020\000*\210\002\n\014PBStatements\022\026\n\022TIRESIAS_"
+    "INIT_SKIP\020\003\022\027\n\023TIRESIAS_INIT_BREAK\020\004\022\027\n\023"
+    "TIRESIAS_INIT_ABORT\020\005\022\035\n\031TIRESIAS_INIT_N"
+    "ONDETBLOCK\020\006\022\032\n\026TIRESIAS_INIT_SEQBLOCK\020\007"
+    "\022\033\n\027TIRESIAS_INIT_PRIOBLOCK\020\010\022 \n\034TIRESIA"
+    "S_INIT_GUARDEDCOMMAND\020\002\022\034\n\030TIRESIAS_INIT"
+    "_ASSIGNMENT\020\001\022\026\n\022TIRESIAS_INIT_CALL\020\000*\340\004"
+    "\n\rPBExpressions\022 \n\034TIRESIAS_INIT_TYPEEXP"
+    "RESSION\020\004\022&\n\"TIRESIAS_INIT_IDENTIFIEREXP"
+    "RESSION\020\005\022!\n\035TIRESIAS_INIT_UNARYEXPRESSI"
+    "ON\020\006\022\"\n\036TIRESIAS_INIT_BINARYEXPRESSION\020\007"
+    "\022#\n\037TIRESIAS_INIT_TERNARYEXPRESSION\020\010\022$\n"
+    " TIRESIAS_INIT_INTVALUEEXPRESSION\020\t\022%\n!T"
+    "IRESIAS_INIT_BOOLVALUEEXPRESSION\020\n\022$\n TI"
+    "RESIAS_INIT_REFVALUEEXPRESSION\020\013\022!\n\035TIRE"
+    "SIAS_INIT_LISTCONSTRUCTOR\020\014\022 \n\034TIRESIAS_"
+    "INIT_SETCONSTRUCTOR\020\r\022\"\n\036TIRESIAS_INIT_T"
+    "UPLECONSTRUCTOR\020\016\022\"\n\036TIRESIAS_INIT_ACCES"
+    "SEXPRESSION\020\017\022*\n&TIRESIAS_INIT_TUPLEMAPA"
+    "CCESSEXPRESSION\020\003\022 \n\034TIRESIAS_INIT_CALLE"
+    "XPRESSION\020\002\022&\n\"TIRESIAS_INIT_QUANTIFIERE"
+    "XPRESSION\020\001\022#\n\037TIRESIAS_INIT_OBJECTCONST"
+    "RUCTOR\020\000BA\n0at.ac.ait.momut.ooas.argos.c"
+    "odegen.serialize.genB\rFunctionNames", 2435);
+  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+    "FunctionNames.proto", &protobuf_RegisterTypes);
+  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_FunctionNames_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_FunctionNames_2eproto {
+  StaticDescriptorInitializer_FunctionNames_2eproto() {
+    protobuf_AddDesc_FunctionNames_2eproto();
+  }
+} static_descriptor_initializer_FunctionNames_2eproto_;
+const ::google::protobuf::EnumDescriptor* PBAdd_descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return PBAdd_descriptor_;
+}
+bool PBAdd_IsValid(int value) {
+  switch(value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+    case 4:
+    case 5:
+    case 6:
+    case 7:
+      return true;
+    default:
+      return false;
+  }
+}
+
+const ::google::protobuf::EnumDescriptor* PBAllocation_descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return PBAllocation_descriptor_;
+}
+bool PBAllocation_IsValid(int value) {
+  switch(value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+    case 4:
+    case 5:
+    case 6:
+    case 7:
+    case 8:
+    case 9:
+    case 10:
+    case 11:
+    case 12:
+      return true;
+    default:
+      return false;
+  }
+}
+
+const ::google::protobuf::EnumDescriptor* PBIdentifiers_descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return PBIdentifiers_descriptor_;
+}
+bool PBIdentifiers_IsValid(int value) {
+  switch(value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+    case 4:
+    case 5:
+    case 6:
+    case 7:
+    case 8:
+    case 9:
+    case 10:
+      return true;
+    default:
+      return false;
+  }
+}
+
+const ::google::protobuf::EnumDescriptor* PBTypes_descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return PBTypes_descriptor_;
+}
+bool PBTypes_IsValid(int value) {
+  switch(value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+    case 4:
+    case 5:
+    case 6:
+    case 7:
+    case 8:
+    case 9:
+      return true;
+    default:
+      return false;
+  }
+}
+
+const ::google::protobuf::EnumDescriptor* PBStatements_descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return PBStatements_descriptor_;
+}
+bool PBStatements_IsValid(int value) {
+  switch(value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+    case 4:
+    case 5:
+    case 6:
+    case 7:
+    case 8:
+      return true;
+    default:
+      return false;
+  }
+}
+
+const ::google::protobuf::EnumDescriptor* PBExpressions_descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return PBExpressions_descriptor_;
+}
+bool PBExpressions_IsValid(int value) {
+  switch(value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+    case 4:
+    case 5:
+    case 6:
+    case 7:
+    case 8:
+    case 9:
+    case 10:
+    case 11:
+    case 12:
+    case 13:
+    case 14:
+    case 15:
+      return true;
+    default:
+      return false;
+  }
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+}  // namespace serialize
+
+// @@protoc_insertion_point(global_scope)
Index: trunk/compiler/cppAst/ast/identifiers/TypeIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/TypeIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/TypeIdentifier.hpp	(revision 2)
@@ -0,0 +1,80 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <string>
+#include <ast/identifiers/Identifier.hpp>
+#include <ast/types/Type.hpp>
+#include <ast/IScope.hpp>
+
+namespace Ast {
+
+class TypeIdentifier
+	: public Identifier
+{
+protected:
+	string m_prefix;
+
+	TypeIdentifier(IdentifierKind id):
+		Identifier(id),
+		m_prefix("")
+	{}
+
+	TypeIdentifier():
+		Identifier(IdentifierKind::TypeIdentifier),
+		m_prefix ("")
+	{};
+
+	TypeIdentifier(std::string /*name*/, Type* someType, IScope* aDefiningScope):
+		TypeIdentifier()
+	{
+		m_type = someType;
+		m_definingScope = aDefiningScope;
+	};
+	TypeIdentifier(const TypeIdentifier& toCopy) :
+		Identifier(toCopy),
+		m_prefix (toCopy.m_prefix)
+	{};
+
+	static TypeIdentifier* create() {return new TypeIdentifier();}
+	static TypeIdentifier* createCopy(const TypeIdentifier& toCopy) {return new TypeIdentifier(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void init(std::int32_t line, std::int32_t col, const char* text,
+			IScope* scopeRef, Type* typeRef, const char* prefix)
+	{
+		Identifier::init(line,col,text,scopeRef,typeRef);
+		m_prefix = prefix;
+	}
+
+	void accept(IAstVisitor& visitor) override
+	{
+		visitor.visit(this);
+	}
+};
+}
Index: trunk/compiler/cppAst/ast/statements/GuardedCommand.hpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/GuardedCommand.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/GuardedCommand.hpp	(revision 2)
@@ -0,0 +1,87 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/statements/Statement.hpp>
+#include <ast/IScope.hpp>
+#include <ast/expressions/Expression.hpp>
+#include <ast/statements/Block.hpp>
+
+namespace Ast {
+
+class GuardedCommand final
+	: public Statement
+	, public IScope
+{
+protected:
+	Expression* m_guard;
+	Statement* m_body;
+	IScope* m_parentScope;
+
+	GuardedCommand():
+		Statement(StatementKind::GuardedCommand),
+		m_guard (nullptr),
+		m_body (nullptr),
+		m_parentScope(nullptr)
+	{}
+
+	GuardedCommand(const GuardedCommand &toCopy):
+		Statement(toCopy),
+		m_guard (toCopy.m_guard),
+		m_body (toCopy.m_body),
+		m_parentScope(toCopy.m_parentScope)
+	{}
+
+	static GuardedCommand* create() {return new GuardedCommand();}
+	static GuardedCommand* createCopy(const GuardedCommand& toCopy) {return new GuardedCommand(toCopy);}
+public:
+	friend class Ast;
+	friend class Statement;
+
+	void init(std::int32_t line, std::int32_t pos, IScope* scopeRef, Expression* guardExprRef,
+				Statement* bodyRef)
+	{
+		Statement::init(line,pos);
+		m_guard = guardExprRef;
+		m_body = bodyRef;
+		m_parentScope = scopeRef;
+	}
+	Expression* guard() {return m_guard;};
+	Statement* body() {return m_body;};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+
+	void setGuard(Expression* newGuard) {m_guard = newGuard;};
+	void setBody(Statement* newBody) {m_body = newBody;};
+
+	Identifier* resolveIdentifier(const std::string& ) const override { return nullptr; };
+	IScope* getParentScope() const override {return m_parentScope;};
+	std::string getScopeName() const override {return "";}
+	void setParentScope(IScope* parentScope) override {m_parentScope = parentScope;};
+	void addIdentifier(Identifier*, void* ) override {throw new Base::NotImplementedException(); /*cannot add to guarded command!*/};
+
+	IScope* asScope() final {return (IScope*) this;}
+};
+}
Index: trunk/compiler/cppAst/ast/statements/Abort.hpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/Abort.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/Abort.hpp	(revision 2)
@@ -0,0 +1,47 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/statements/Statement.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class Abort final
+	: public Statement
+{
+protected:
+	Abort():Statement(StatementKind::Abort){};
+	Abort(const Abort& toCopy): Statement(toCopy){};
+
+	static Abort* create() {return new Abort();}
+	static Abort* createCopy(const Abort& toCopy) {return new Abort(toCopy);}
+public:
+	friend class Ast;
+	friend class Statement;
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/serialize/ProtoBufAstTraversal.hpp
===================================================================
--- trunk/compiler/cppAst/ast/serialize/ProtoBufAstTraversal.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/serialize/ProtoBufAstTraversal.hpp	(revision 2)
@@ -0,0 +1,56 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#pragma once
+
+#include <CallContext.hpp>
+#include <unordered_map>
+#include <ast/serialize/gen/Record.pb.h>
+#include <ast/serialize/gen/FunctionNames.pb.h>
+
+namespace Ast {
+
+class ProtoBufAstTraversal {
+protected:
+	CallContext* m_context;
+	std::unordered_map<std::uint64_t, void*> m_objects;
+
+	void allocate(const serialize::PBFunctionCall& call);
+	void add(const serialize::PBFunctionCall& call);
+	void identifier(const serialize::PBFunctionCall& call);
+	void type(const serialize::PBFunctionCall& call);
+	void statement(const serialize::PBFunctionCall& call);
+	void expression(const serialize::PBFunctionCall& call);
+
+	void* doDeserialize(serialize::PBAstTraversal & traversal);
+
+public:
+	ProtoBufAstTraversal(CallContext* context);
+	~ProtoBufAstTraversal();
+
+	void* deserialize();
+	void* deserialize(const std::uint8_t * buffer, std::uint32_t size);
+};
+
+}
Index: trunk/compiler/cppAst/ast/Containers.hpp
===================================================================
--- trunk/compiler/cppAst/ast/Containers.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/Containers.hpp	(revision 2)
@@ -0,0 +1,151 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#pragma once
+
+#include <ast/identifiers/ParameterIdentifier.hpp>
+#include <ast/SymbolTable.hpp>
+#include <base/TiresiasObject.hpp>
+#include <ast/types/Type.hpp>
+#include <ast/statements/Statement.hpp>
+#include <deque>
+
+namespace Ast {
+
+/*
+ * General list based on std::deque, also inherits from
+ * TireaisObject.
+ */
+template<class T>
+class TiresiasList
+	: public std::deque<T>
+	, public Base::TiresiasObject
+{
+protected:
+	// define a default constructor
+	TiresiasList<T>() {}
+
+	// define a copy constructor that really makes a copy
+	TiresiasList<T>(const TiresiasList<T>& toCopy) {
+		this->insert(this->begin(), toCopy.begin(), toCopy.end());
+	}
+
+public:
+	// define a move assignment operator that moves the lists contents
+	TiresiasList<T>* operator= (TiresiasList<T>&& move) {
+		this->insert(this->begin(),  std::make_move_iterator(move.begin()),  std::make_move_iterator(move.end()));
+		return this;
+	}
+};
+
+/*
+ * ParameterList class.
+ */
+class ParameterList
+	: public TiresiasList<ParameterIdentifier*>
+{
+protected:
+	using TiresiasList<ParameterIdentifier*>::TiresiasList;
+	friend class Ast;
+};
+
+/*
+ * TypeList class
+ */
+class TypeList
+	: public TiresiasList<Type*>
+{
+protected:
+	using TiresiasList<Type*>::TiresiasList;
+	friend class Ast;
+};
+
+/*
+ * ExpressionList class
+ */
+class Expression; // forward
+
+class ExpressionList
+	: public TiresiasList<Expression*>
+{
+protected:
+	using TiresiasList<Expression*>::TiresiasList;
+	friend class Ast;
+};
+
+/*
+ * StatementList class
+ */
+class StatementList
+	: public TiresiasList<Statement*>
+{
+protected:
+	using TiresiasList<Statement*>::TiresiasList;
+	friend class Ast;
+};
+
+/*
+ * IdentifierList class
+ */
+class IdentifierList
+	: public TiresiasList<Identifier*>
+{
+protected:
+	using TiresiasList<Identifier*>::TiresiasList;
+	friend class Ast;
+};
+
+
+/*
+ * FunctionIdentifierList class
+ */
+class FunctionIdentifier; // forward
+
+class FunctionIdentifierList
+	: public TiresiasList<FunctionIdentifier*>
+{
+protected:
+	using TiresiasList<FunctionIdentifier*>::TiresiasList;
+	friend class Ast;
+};
+/*
+ * ActionSystemInstanceList class
+ */
+
+class ActionSystemInstance; // forward
+
+class ActionSystemInstanceList
+	: public TiresiasList<ActionSystemInstance*>
+{
+protected:
+	using TiresiasList<ActionSystemInstance*>::TiresiasList;
+	friend class Ast;
+};
+
+
+}
+
+#include <ast/types/ActionSystemType.hpp>
+#include <ast/expressions/Expression.hpp>
+#include <ast/identifiers/FunctionIdentifier.hpp>
Index: trunk/compiler/cppAst/ast/statements/Call.hpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/Call.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/Call.hpp	(revision 2)
@@ -0,0 +1,64 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/statements/Statement.hpp>
+#include <ast/expressions/Expression.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class Call final
+	: public Statement
+{
+protected:
+	Expression* m_callExpression;
+
+	Call():
+		Statement(StatementKind::Call),
+		m_callExpression(nullptr)
+	{};
+	Call(const Call& toCopy):
+		Statement(toCopy),
+		m_callExpression(toCopy.m_callExpression)
+	{};
+
+	static Call* create() {return new Call();}
+	static Call* createCopy(const Call& toCopy) {return new Call(toCopy);}
+public:
+	friend class Ast;
+	friend class Statement;
+
+	void init(std::int32_t line,std::int32_t pos,Expression* callExprRef) {
+		Statement::init(line,pos);
+		m_callExpression = callExprRef;
+	}
+
+	Expression* callExpression() {return m_callExpression;};
+	void setCallExpression(Expression* newExpression) {m_callExpression = newExpression;};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/statements/Skip.hpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/Skip.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/Skip.hpp	(revision 2)
@@ -0,0 +1,47 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/statements/Statement.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class Skip final
+	: public Statement
+{
+protected:
+	Skip(): Statement(StatementKind::Skip){};
+	Skip(const Skip& toCopy): Statement(toCopy){};
+
+	static Skip* create() {return new Skip();}
+	static Skip* createCopy(const Skip& toCopy) {return new Skip(toCopy);}
+public:
+	friend class Ast;
+	friend class Statement;
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/serialize/gen/Record.pb.h
===================================================================
--- trunk/compiler/cppAst/ast/serialize/gen/Record.pb.h	(nonexistent)
+++ trunk/compiler/cppAst/ast/serialize/gen/Record.pb.h	(revision 2)
@@ -0,0 +1,1023 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: Record.proto
+
+#ifndef PROTOBUF_Record_2eproto__INCLUDED
+#define PROTOBUF_Record_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+#include "FunctionNames.pb.h"
+// @@protoc_insertion_point(includes)
+
+namespace serialize {
+
+// Internal implementation detail -- do not call these.
+void  protobuf_AddDesc_Record_2eproto();
+void protobuf_AssignDesc_Record_2eproto();
+void protobuf_ShutdownFile_Record_2eproto();
+
+class PBParameter;
+class PBReturnValue;
+class PBFunctionCall;
+class PBAstTraversal;
+
+enum PBReturnType {
+  type_voidPointer = 1,
+  type_boolean = 2
+};
+bool PBReturnType_IsValid(int value);
+const PBReturnType PBReturnType_MIN = type_voidPointer;
+const PBReturnType PBReturnType_MAX = type_boolean;
+const int PBReturnType_ARRAYSIZE = PBReturnType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* PBReturnType_descriptor();
+inline const ::std::string& PBReturnType_Name(PBReturnType value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    PBReturnType_descriptor(), value);
+}
+inline bool PBReturnType_Parse(
+    const ::std::string& name, PBReturnType* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<PBReturnType>(
+    PBReturnType_descriptor(), name, value);
+}
+// ===================================================================
+
+class PBParameter : public ::google::protobuf::Message {
+ public:
+  PBParameter();
+  virtual ~PBParameter();
+
+  PBParameter(const PBParameter& from);
+
+  inline PBParameter& operator=(const PBParameter& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const PBParameter& default_instance();
+
+  void Swap(PBParameter* other);
+
+  // implements Message ----------------------------------------------
+
+  PBParameter* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const PBParameter& from);
+  void MergeFrom(const PBParameter& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional uint64 uint64_value = 1;
+  inline bool has_uint64_value() const;
+  inline void clear_uint64_value();
+  static const int kUint64ValueFieldNumber = 1;
+  inline ::google::protobuf::uint64 uint64_value() const;
+  inline void set_uint64_value(::google::protobuf::uint64 value);
+
+  // optional string literal_value = 2;
+  inline bool has_literal_value() const;
+  inline void clear_literal_value();
+  static const int kLiteralValueFieldNumber = 2;
+  inline const ::std::string& literal_value() const;
+  inline void set_literal_value(const ::std::string& value);
+  inline void set_literal_value(const char* value);
+  inline void set_literal_value(const char* value, size_t size);
+  inline ::std::string* mutable_literal_value();
+  inline ::std::string* release_literal_value();
+  inline void set_allocated_literal_value(::std::string* literal_value);
+
+  // optional bool bool_value = 3;
+  inline bool has_bool_value() const;
+  inline void clear_bool_value();
+  static const int kBoolValueFieldNumber = 3;
+  inline bool bool_value() const;
+  inline void set_bool_value(bool value);
+
+  // optional int32 int32_value = 4;
+  inline bool has_int32_value() const;
+  inline void clear_int32_value();
+  static const int kInt32ValueFieldNumber = 4;
+  inline ::google::protobuf::int32 int32_value() const;
+  inline void set_int32_value(::google::protobuf::int32 value);
+
+  // optional uint32 uint32_value = 5;
+  inline bool has_uint32_value() const;
+  inline void clear_uint32_value();
+  static const int kUint32ValueFieldNumber = 5;
+  inline ::google::protobuf::uint32 uint32_value() const;
+  inline void set_uint32_value(::google::protobuf::uint32 value);
+
+  // @@protoc_insertion_point(class_scope:serialize.PBParameter)
+ private:
+  inline void set_has_uint64_value();
+  inline void clear_has_uint64_value();
+  inline void set_has_literal_value();
+  inline void clear_has_literal_value();
+  inline void set_has_bool_value();
+  inline void clear_has_bool_value();
+  inline void set_has_int32_value();
+  inline void clear_has_int32_value();
+  inline void set_has_uint32_value();
+  inline void clear_has_uint32_value();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::google::protobuf::uint64 uint64_value_;
+  ::std::string* literal_value_;
+  bool bool_value_;
+  ::google::protobuf::int32 int32_value_;
+  ::google::protobuf::uint32 uint32_value_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
+
+  friend void  protobuf_AddDesc_Record_2eproto();
+  friend void protobuf_AssignDesc_Record_2eproto();
+  friend void protobuf_ShutdownFile_Record_2eproto();
+
+  void InitAsDefaultInstance();
+  static PBParameter* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class PBReturnValue : public ::google::protobuf::Message {
+ public:
+  PBReturnValue();
+  virtual ~PBReturnValue();
+
+  PBReturnValue(const PBReturnValue& from);
+
+  inline PBReturnValue& operator=(const PBReturnValue& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const PBReturnValue& default_instance();
+
+  void Swap(PBReturnValue* other);
+
+  // implements Message ----------------------------------------------
+
+  PBReturnValue* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const PBReturnValue& from);
+  void MergeFrom(const PBReturnValue& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // required .serialize.PBReturnType return_type = 1;
+  inline bool has_return_type() const;
+  inline void clear_return_type();
+  static const int kReturnTypeFieldNumber = 1;
+  inline ::serialize::PBReturnType return_type() const;
+  inline void set_return_type(::serialize::PBReturnType value);
+
+  // optional uint64 return_id = 2;
+  inline bool has_return_id() const;
+  inline void clear_return_id();
+  static const int kReturnIdFieldNumber = 2;
+  inline ::google::protobuf::uint64 return_id() const;
+  inline void set_return_id(::google::protobuf::uint64 value);
+
+  // @@protoc_insertion_point(class_scope:serialize.PBReturnValue)
+ private:
+  inline void set_has_return_type();
+  inline void clear_has_return_type();
+  inline void set_has_return_id();
+  inline void clear_has_return_id();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::google::protobuf::uint64 return_id_;
+  int return_type_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
+  friend void  protobuf_AddDesc_Record_2eproto();
+  friend void protobuf_AssignDesc_Record_2eproto();
+  friend void protobuf_ShutdownFile_Record_2eproto();
+
+  void InitAsDefaultInstance();
+  static PBReturnValue* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class PBFunctionCall : public ::google::protobuf::Message {
+ public:
+  PBFunctionCall();
+  virtual ~PBFunctionCall();
+
+  PBFunctionCall(const PBFunctionCall& from);
+
+  inline PBFunctionCall& operator=(const PBFunctionCall& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const PBFunctionCall& default_instance();
+
+  void Swap(PBFunctionCall* other);
+
+  // implements Message ----------------------------------------------
+
+  PBFunctionCall* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const PBFunctionCall& from);
+  void MergeFrom(const PBFunctionCall& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional .serialize.PBAdd add = 1;
+  inline bool has_add() const;
+  inline void clear_add();
+  static const int kAddFieldNumber = 1;
+  inline ::serialize::PBAdd add() const;
+  inline void set_add(::serialize::PBAdd value);
+
+  // optional .serialize.PBAllocation allocate = 2;
+  inline bool has_allocate() const;
+  inline void clear_allocate();
+  static const int kAllocateFieldNumber = 2;
+  inline ::serialize::PBAllocation allocate() const;
+  inline void set_allocate(::serialize::PBAllocation value);
+
+  // optional .serialize.PBIdentifiers identifier = 3;
+  inline bool has_identifier() const;
+  inline void clear_identifier();
+  static const int kIdentifierFieldNumber = 3;
+  inline ::serialize::PBIdentifiers identifier() const;
+  inline void set_identifier(::serialize::PBIdentifiers value);
+
+  // optional .serialize.PBTypes type = 4;
+  inline bool has_type() const;
+  inline void clear_type();
+  static const int kTypeFieldNumber = 4;
+  inline ::serialize::PBTypes type() const;
+  inline void set_type(::serialize::PBTypes value);
+
+  // optional .serialize.PBStatements statement = 5;
+  inline bool has_statement() const;
+  inline void clear_statement();
+  static const int kStatementFieldNumber = 5;
+  inline ::serialize::PBStatements statement() const;
+  inline void set_statement(::serialize::PBStatements value);
+
+  // optional .serialize.PBExpressions expression = 6;
+  inline bool has_expression() const;
+  inline void clear_expression();
+  static const int kExpressionFieldNumber = 6;
+  inline ::serialize::PBExpressions expression() const;
+  inline void set_expression(::serialize::PBExpressions value);
+
+  // repeated .serialize.PBParameter parameters = 7;
+  inline int parameters_size() const;
+  inline void clear_parameters();
+  static const int kParametersFieldNumber = 7;
+  inline const ::serialize::PBParameter& parameters(int index) const;
+  inline ::serialize::PBParameter* mutable_parameters(int index);
+  inline ::serialize::PBParameter* add_parameters();
+  inline const ::google::protobuf::RepeatedPtrField< ::serialize::PBParameter >&
+      parameters() const;
+  inline ::google::protobuf::RepeatedPtrField< ::serialize::PBParameter >*
+      mutable_parameters();
+
+  // required .serialize.PBReturnValue return_value = 8;
+  inline bool has_return_value() const;
+  inline void clear_return_value();
+  static const int kReturnValueFieldNumber = 8;
+  inline const ::serialize::PBReturnValue& return_value() const;
+  inline ::serialize::PBReturnValue* mutable_return_value();
+  inline ::serialize::PBReturnValue* release_return_value();
+  inline void set_allocated_return_value(::serialize::PBReturnValue* return_value);
+
+  // @@protoc_insertion_point(class_scope:serialize.PBFunctionCall)
+ private:
+  inline void set_has_add();
+  inline void clear_has_add();
+  inline void set_has_allocate();
+  inline void clear_has_allocate();
+  inline void set_has_identifier();
+  inline void clear_has_identifier();
+  inline void set_has_type();
+  inline void clear_has_type();
+  inline void set_has_statement();
+  inline void clear_has_statement();
+  inline void set_has_expression();
+  inline void clear_has_expression();
+  inline void set_has_return_value();
+  inline void clear_has_return_value();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  int add_;
+  int allocate_;
+  int identifier_;
+  int type_;
+  int statement_;
+  int expression_;
+  ::google::protobuf::RepeatedPtrField< ::serialize::PBParameter > parameters_;
+  ::serialize::PBReturnValue* return_value_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32];
+
+  friend void  protobuf_AddDesc_Record_2eproto();
+  friend void protobuf_AssignDesc_Record_2eproto();
+  friend void protobuf_ShutdownFile_Record_2eproto();
+
+  void InitAsDefaultInstance();
+  static PBFunctionCall* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class PBAstTraversal : public ::google::protobuf::Message {
+ public:
+  PBAstTraversal();
+  virtual ~PBAstTraversal();
+
+  PBAstTraversal(const PBAstTraversal& from);
+
+  inline PBAstTraversal& operator=(const PBAstTraversal& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const PBAstTraversal& default_instance();
+
+  void Swap(PBAstTraversal* other);
+
+  // implements Message ----------------------------------------------
+
+  PBAstTraversal* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const PBAstTraversal& from);
+  void MergeFrom(const PBAstTraversal& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // repeated .serialize.PBFunctionCall calls = 1;
+  inline int calls_size() const;
+  inline void clear_calls();
+  static const int kCallsFieldNumber = 1;
+  inline const ::serialize::PBFunctionCall& calls(int index) const;
+  inline ::serialize::PBFunctionCall* mutable_calls(int index);
+  inline ::serialize::PBFunctionCall* add_calls();
+  inline const ::google::protobuf::RepeatedPtrField< ::serialize::PBFunctionCall >&
+      calls() const;
+  inline ::google::protobuf::RepeatedPtrField< ::serialize::PBFunctionCall >*
+      mutable_calls();
+
+  // required uint64 main_module = 2;
+  inline bool has_main_module() const;
+  inline void clear_main_module();
+  static const int kMainModuleFieldNumber = 2;
+  inline ::google::protobuf::uint64 main_module() const;
+  inline void set_main_module(::google::protobuf::uint64 value);
+
+  // @@protoc_insertion_point(class_scope:serialize.PBAstTraversal)
+ private:
+  inline void set_has_main_module();
+  inline void clear_has_main_module();
+
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+  ::google::protobuf::RepeatedPtrField< ::serialize::PBFunctionCall > calls_;
+  ::google::protobuf::uint64 main_module_;
+
+  mutable int _cached_size_;
+  ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+
+  friend void  protobuf_AddDesc_Record_2eproto();
+  friend void protobuf_AssignDesc_Record_2eproto();
+  friend void protobuf_ShutdownFile_Record_2eproto();
+
+  void InitAsDefaultInstance();
+  static PBAstTraversal* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+// PBParameter
+
+// optional uint64 uint64_value = 1;
+inline bool PBParameter::has_uint64_value() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void PBParameter::set_has_uint64_value() {
+  _has_bits_[0] |= 0x00000001u;
+}
+inline void PBParameter::clear_has_uint64_value() {
+  _has_bits_[0] &= ~0x00000001u;
+}
+inline void PBParameter::clear_uint64_value() {
+  uint64_value_ = GOOGLE_ULONGLONG(0);
+  clear_has_uint64_value();
+}
+inline ::google::protobuf::uint64 PBParameter::uint64_value() const {
+  return uint64_value_;
+}
+inline void PBParameter::set_uint64_value(::google::protobuf::uint64 value) {
+  set_has_uint64_value();
+  uint64_value_ = value;
+}
+
+// optional string literal_value = 2;
+inline bool PBParameter::has_literal_value() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void PBParameter::set_has_literal_value() {
+  _has_bits_[0] |= 0x00000002u;
+}
+inline void PBParameter::clear_has_literal_value() {
+  _has_bits_[0] &= ~0x00000002u;
+}
+inline void PBParameter::clear_literal_value() {
+  if (literal_value_ != &::google::protobuf::internal::kEmptyString) {
+    literal_value_->clear();
+  }
+  clear_has_literal_value();
+}
+inline const ::std::string& PBParameter::literal_value() const {
+  return *literal_value_;
+}
+inline void PBParameter::set_literal_value(const ::std::string& value) {
+  set_has_literal_value();
+  if (literal_value_ == &::google::protobuf::internal::kEmptyString) {
+    literal_value_ = new ::std::string;
+  }
+  literal_value_->assign(value);
+}
+inline void PBParameter::set_literal_value(const char* value) {
+  set_has_literal_value();
+  if (literal_value_ == &::google::protobuf::internal::kEmptyString) {
+    literal_value_ = new ::std::string;
+  }
+  literal_value_->assign(value);
+}
+inline void PBParameter::set_literal_value(const char* value, size_t size) {
+  set_has_literal_value();
+  if (literal_value_ == &::google::protobuf::internal::kEmptyString) {
+    literal_value_ = new ::std::string;
+  }
+  literal_value_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* PBParameter::mutable_literal_value() {
+  set_has_literal_value();
+  if (literal_value_ == &::google::protobuf::internal::kEmptyString) {
+    literal_value_ = new ::std::string;
+  }
+  return literal_value_;
+}
+inline ::std::string* PBParameter::release_literal_value() {
+  clear_has_literal_value();
+  if (literal_value_ == &::google::protobuf::internal::kEmptyString) {
+    return NULL;
+  } else {
+    ::std::string* temp = literal_value_;
+    literal_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+    return temp;
+  }
+}
+inline void PBParameter::set_allocated_literal_value(::std::string* literal_value) {
+  if (literal_value_ != &::google::protobuf::internal::kEmptyString) {
+    delete literal_value_;
+  }
+  if (literal_value) {
+    set_has_literal_value();
+    literal_value_ = literal_value;
+  } else {
+    clear_has_literal_value();
+    literal_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+  }
+}
+
+// optional bool bool_value = 3;
+inline bool PBParameter::has_bool_value() const {
+  return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void PBParameter::set_has_bool_value() {
+  _has_bits_[0] |= 0x00000004u;
+}
+inline void PBParameter::clear_has_bool_value() {
+  _has_bits_[0] &= ~0x00000004u;
+}
+inline void PBParameter::clear_bool_value() {
+  bool_value_ = false;
+  clear_has_bool_value();
+}
+inline bool PBParameter::bool_value() const {
+  return bool_value_;
+}
+inline void PBParameter::set_bool_value(bool value) {
+  set_has_bool_value();
+  bool_value_ = value;
+}
+
+// optional int32 int32_value = 4;
+inline bool PBParameter::has_int32_value() const {
+  return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void PBParameter::set_has_int32_value() {
+  _has_bits_[0] |= 0x00000008u;
+}
+inline void PBParameter::clear_has_int32_value() {
+  _has_bits_[0] &= ~0x00000008u;
+}
+inline void PBParameter::clear_int32_value() {
+  int32_value_ = 0;
+  clear_has_int32_value();
+}
+inline ::google::protobuf::int32 PBParameter::int32_value() const {
+  return int32_value_;
+}
+inline void PBParameter::set_int32_value(::google::protobuf::int32 value) {
+  set_has_int32_value();
+  int32_value_ = value;
+}
+
+// optional uint32 uint32_value = 5;
+inline bool PBParameter::has_uint32_value() const {
+  return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void PBParameter::set_has_uint32_value() {
+  _has_bits_[0] |= 0x00000010u;
+}
+inline void PBParameter::clear_has_uint32_value() {
+  _has_bits_[0] &= ~0x00000010u;
+}
+inline void PBParameter::clear_uint32_value() {
+  uint32_value_ = 0u;
+  clear_has_uint32_value();
+}
+inline ::google::protobuf::uint32 PBParameter::uint32_value() const {
+  return uint32_value_;
+}
+inline void PBParameter::set_uint32_value(::google::protobuf::uint32 value) {
+  set_has_uint32_value();
+  uint32_value_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// PBReturnValue
+
+// required .serialize.PBReturnType return_type = 1;
+inline bool PBReturnValue::has_return_type() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void PBReturnValue::set_has_return_type() {
+  _has_bits_[0] |= 0x00000001u;
+}
+inline void PBReturnValue::clear_has_return_type() {
+  _has_bits_[0] &= ~0x00000001u;
+}
+inline void PBReturnValue::clear_return_type() {
+  return_type_ = 1;
+  clear_has_return_type();
+}
+inline ::serialize::PBReturnType PBReturnValue::return_type() const {
+  return static_cast< ::serialize::PBReturnType >(return_type_);
+}
+inline void PBReturnValue::set_return_type(::serialize::PBReturnType value) {
+  assert(::serialize::PBReturnType_IsValid(value));
+  set_has_return_type();
+  return_type_ = value;
+}
+
+// optional uint64 return_id = 2;
+inline bool PBReturnValue::has_return_id() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void PBReturnValue::set_has_return_id() {
+  _has_bits_[0] |= 0x00000002u;
+}
+inline void PBReturnValue::clear_has_return_id() {
+  _has_bits_[0] &= ~0x00000002u;
+}
+inline void PBReturnValue::clear_return_id() {
+  return_id_ = GOOGLE_ULONGLONG(0);
+  clear_has_return_id();
+}
+inline ::google::protobuf::uint64 PBReturnValue::return_id() const {
+  return return_id_;
+}
+inline void PBReturnValue::set_return_id(::google::protobuf::uint64 value) {
+  set_has_return_id();
+  return_id_ = value;
+}
+
+// -------------------------------------------------------------------
+
+// PBFunctionCall
+
+// optional .serialize.PBAdd add = 1;
+inline bool PBFunctionCall::has_add() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void PBFunctionCall::set_has_add() {
+  _has_bits_[0] |= 0x00000001u;
+}
+inline void PBFunctionCall::clear_has_add() {
+  _has_bits_[0] &= ~0x00000001u;
+}
+inline void PBFunctionCall::clear_add() {
+  add_ = 0;
+  clear_has_add();
+}
+inline ::serialize::PBAdd PBFunctionCall::add() const {
+  return static_cast< ::serialize::PBAdd >(add_);
+}
+inline void PBFunctionCall::set_add(::serialize::PBAdd value) {
+  assert(::serialize::PBAdd_IsValid(value));
+  set_has_add();
+  add_ = value;
+}
+
+// optional .serialize.PBAllocation allocate = 2;
+inline bool PBFunctionCall::has_allocate() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void PBFunctionCall::set_has_allocate() {
+  _has_bits_[0] |= 0x00000002u;
+}
+inline void PBFunctionCall::clear_has_allocate() {
+  _has_bits_[0] &= ~0x00000002u;
+}
+inline void PBFunctionCall::clear_allocate() {
+  allocate_ = 0;
+  clear_has_allocate();
+}
+inline ::serialize::PBAllocation PBFunctionCall::allocate() const {
+  return static_cast< ::serialize::PBAllocation >(allocate_);
+}
+inline void PBFunctionCall::set_allocate(::serialize::PBAllocation value) {
+  assert(::serialize::PBAllocation_IsValid(value));
+  set_has_allocate();
+  allocate_ = value;
+}
+
+// optional .serialize.PBIdentifiers identifier = 3;
+inline bool PBFunctionCall::has_identifier() const {
+  return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void PBFunctionCall::set_has_identifier() {
+  _has_bits_[0] |= 0x00000004u;
+}
+inline void PBFunctionCall::clear_has_identifier() {
+  _has_bits_[0] &= ~0x00000004u;
+}
+inline void PBFunctionCall::clear_identifier() {
+  identifier_ = 1;
+  clear_has_identifier();
+}
+inline ::serialize::PBIdentifiers PBFunctionCall::identifier() const {
+  return static_cast< ::serialize::PBIdentifiers >(identifier_);
+}
+inline void PBFunctionCall::set_identifier(::serialize::PBIdentifiers value) {
+  assert(::serialize::PBIdentifiers_IsValid(value));
+  set_has_identifier();
+  identifier_ = value;
+}
+
+// optional .serialize.PBTypes type = 4;
+inline bool PBFunctionCall::has_type() const {
+  return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void PBFunctionCall::set_has_type() {
+  _has_bits_[0] |= 0x00000008u;
+}
+inline void PBFunctionCall::clear_has_type() {
+  _has_bits_[0] &= ~0x00000008u;
+}
+inline void PBFunctionCall::clear_type() {
+  type_ = 1;
+  clear_has_type();
+}
+inline ::serialize::PBTypes PBFunctionCall::type() const {
+  return static_cast< ::serialize::PBTypes >(type_);
+}
+inline void PBFunctionCall::set_type(::serialize::PBTypes value) {
+  assert(::serialize::PBTypes_IsValid(value));
+  set_has_type();
+  type_ = value;
+}
+
+// optional .serialize.PBStatements statement = 5;
+inline bool PBFunctionCall::has_statement() const {
+  return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void PBFunctionCall::set_has_statement() {
+  _has_bits_[0] |= 0x00000010u;
+}
+inline void PBFunctionCall::clear_has_statement() {
+  _has_bits_[0] &= ~0x00000010u;
+}
+inline void PBFunctionCall::clear_statement() {
+  statement_ = 3;
+  clear_has_statement();
+}
+inline ::serialize::PBStatements PBFunctionCall::statement() const {
+  return static_cast< ::serialize::PBStatements >(statement_);
+}
+inline void PBFunctionCall::set_statement(::serialize::PBStatements value) {
+  assert(::serialize::PBStatements_IsValid(value));
+  set_has_statement();
+  statement_ = value;
+}
+
+// optional .serialize.PBExpressions expression = 6;
+inline bool PBFunctionCall::has_expression() const {
+  return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void PBFunctionCall::set_has_expression() {
+  _has_bits_[0] |= 0x00000020u;
+}
+inline void PBFunctionCall::clear_has_expression() {
+  _has_bits_[0] &= ~0x00000020u;
+}
+inline void PBFunctionCall::clear_expression() {
+  expression_ = 4;
+  clear_has_expression();
+}
+inline ::serialize::PBExpressions PBFunctionCall::expression() const {
+  return static_cast< ::serialize::PBExpressions >(expression_);
+}
+inline void PBFunctionCall::set_expression(::serialize::PBExpressions value) {
+  assert(::serialize::PBExpressions_IsValid(value));
+  set_has_expression();
+  expression_ = value;
+}
+
+// repeated .serialize.PBParameter parameters = 7;
+inline int PBFunctionCall::parameters_size() const {
+  return parameters_.size();
+}
+inline void PBFunctionCall::clear_parameters() {
+  parameters_.Clear();
+}
+inline const ::serialize::PBParameter& PBFunctionCall::parameters(int index) const {
+  return parameters_.Get(index);
+}
+inline ::serialize::PBParameter* PBFunctionCall::mutable_parameters(int index) {
+  return parameters_.Mutable(index);
+}
+inline ::serialize::PBParameter* PBFunctionCall::add_parameters() {
+  return parameters_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::serialize::PBParameter >&
+PBFunctionCall::parameters() const {
+  return parameters_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::serialize::PBParameter >*
+PBFunctionCall::mutable_parameters() {
+  return &parameters_;
+}
+
+// required .serialize.PBReturnValue return_value = 8;
+inline bool PBFunctionCall::has_return_value() const {
+  return (_has_bits_[0] & 0x00000080u) != 0;
+}
+inline void PBFunctionCall::set_has_return_value() {
+  _has_bits_[0] |= 0x00000080u;
+}
+inline void PBFunctionCall::clear_has_return_value() {
+  _has_bits_[0] &= ~0x00000080u;
+}
+inline void PBFunctionCall::clear_return_value() {
+  if (return_value_ != NULL) return_value_->::serialize::PBReturnValue::Clear();
+  clear_has_return_value();
+}
+inline const ::serialize::PBReturnValue& PBFunctionCall::return_value() const {
+  return return_value_ != NULL ? *return_value_ : *default_instance_->return_value_;
+}
+inline ::serialize::PBReturnValue* PBFunctionCall::mutable_return_value() {
+  set_has_return_value();
+  if (return_value_ == NULL) return_value_ = new ::serialize::PBReturnValue;
+  return return_value_;
+}
+inline ::serialize::PBReturnValue* PBFunctionCall::release_return_value() {
+  clear_has_return_value();
+  ::serialize::PBReturnValue* temp = return_value_;
+  return_value_ = NULL;
+  return temp;
+}
+inline void PBFunctionCall::set_allocated_return_value(::serialize::PBReturnValue* return_value) {
+  delete return_value_;
+  return_value_ = return_value;
+  if (return_value) {
+    set_has_return_value();
+  } else {
+    clear_has_return_value();
+  }
+}
+
+// -------------------------------------------------------------------
+
+// PBAstTraversal
+
+// repeated .serialize.PBFunctionCall calls = 1;
+inline int PBAstTraversal::calls_size() const {
+  return calls_.size();
+}
+inline void PBAstTraversal::clear_calls() {
+  calls_.Clear();
+}
+inline const ::serialize::PBFunctionCall& PBAstTraversal::calls(int index) const {
+  return calls_.Get(index);
+}
+inline ::serialize::PBFunctionCall* PBAstTraversal::mutable_calls(int index) {
+  return calls_.Mutable(index);
+}
+inline ::serialize::PBFunctionCall* PBAstTraversal::add_calls() {
+  return calls_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::serialize::PBFunctionCall >&
+PBAstTraversal::calls() const {
+  return calls_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::serialize::PBFunctionCall >*
+PBAstTraversal::mutable_calls() {
+  return &calls_;
+}
+
+// required uint64 main_module = 2;
+inline bool PBAstTraversal::has_main_module() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void PBAstTraversal::set_has_main_module() {
+  _has_bits_[0] |= 0x00000002u;
+}
+inline void PBAstTraversal::clear_has_main_module() {
+  _has_bits_[0] &= ~0x00000002u;
+}
+inline void PBAstTraversal::clear_main_module() {
+  main_module_ = GOOGLE_ULONGLONG(0);
+  clear_has_main_module();
+}
+inline ::google::protobuf::uint64 PBAstTraversal::main_module() const {
+  return main_module_;
+}
+inline void PBAstTraversal::set_main_module(::google::protobuf::uint64 value) {
+  set_has_main_module();
+  main_module_ = value;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+}  // namespace serialize
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::serialize::PBReturnType>() {
+  return ::serialize::PBReturnType_descriptor();
+}
+
+}  // namespace google
+}  // namespace protobuf
+#endif  // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif  // PROTOBUF_Record_2eproto__INCLUDED
Index: trunk/compiler/cppAst/ast/DeepCloneVisitor.cpp
===================================================================
--- trunk/compiler/cppAst/ast/DeepCloneVisitor.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/DeepCloneVisitor.cpp	(revision 2)
@@ -0,0 +1,293 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+/*
+ * DeepCloneVisitor.cpp
+ *
+ *  Created on: Feb 12, 2014
+ *      Author: willibald
+ */
+
+#include "DeepCloneVisitor.hpp"
+#include <list>
+#include <ast/identifiers/NamedActionIdentifier.hpp>
+#include <ast/statements/SeqBlock.hpp>
+#include <ast/expressions/BinaryOperator.hpp>
+#include <ast/statements/Assignment.hpp>
+#include <ast/identifiers/AttributeIdentifier.hpp>
+#include <ast/statements/Call.hpp>
+#include <ast/expressions/CallExpression.hpp>
+#include <ast/statements/GuardedCommand.hpp>
+#include <ast/expressions/IdentifierExpression.hpp>
+#include <ast/expressions/ListConstructor.hpp>
+#include <ast/expressions/SetConstructor.hpp>
+#include <ast/expressions/TernaryOperator.hpp>
+#include <ast/expressions/TupleConstructor.hpp>
+#include <ast/expressions/TupleMapAccessExpression.hpp>
+
+namespace Ast {
+
+
+
+void DeepCloneVisitor::updateScope(IScope* aScope) {
+	IScope* parentScope = aScope->getParentScope();
+	if (parentScope != nullptr) {
+		if(m_mapping.count(parentScope) == 0) {
+			if (!m_allowLinksToNonClonedParents) {
+				m_context->logError("Internal Error. Scope update failed.");
+				abort();
+			}
+			return;
+		}
+		aScope->setParentScope((IScope*)m_mapping[parentScope]);
+	}
+}
+
+void DeepCloneVisitor::checkScope(IScope* aScope) {
+	if (aScope->getParentScope() == nullptr)
+		return;
+	if (m_mapping.count(aScope->getParentScope()) > 0) {
+		m_context->logError("Internal Error. Scope check failed.");
+		abort();
+	}
+}
+
+Expression* DeepCloneVisitor::eClone(Expression* anExpr) {
+	Expression* result = nullptr;
+	if (anExpr != nullptr)
+	{
+		result = m_cloneAst->createExpression(*anExpr);
+		if (anExpr->asScope() != nullptr)
+		{
+			m_mapping[anExpr] = result;
+			updateScope(result->asScope());
+		}
+		result->accept(*this);
+	}
+	return result;
+}
+
+Statement* DeepCloneVisitor::sClone(Statement* aStatement) {
+	Statement* result = nullptr;
+	if (aStatement != nullptr)
+	{
+		result = m_cloneAst->createStatement(*aStatement);
+		if (aStatement->asScope() != nullptr)
+		{
+			m_mapping[aStatement] = result;
+			updateScope(result->asScope());
+		}
+		result->accept(*this);
+	}
+	return result;
+}
+
+void DeepCloneVisitor::symTabClone(SymbolTable* aTable) {
+	if (aTable != nullptr && aTable->size() > 0)
+	{
+		std::list<Identifier*> newList;
+		for (auto& x: *aTable)
+		{
+			if (m_mapping.count(x.second) == 0) {
+				Identifier* newid = m_cloneAst->createIdentifier(*x.second);
+				newList.push_back(newid);
+				m_mapping[x.second] = newid;
+			} else {
+				newList.push_back((Identifier*) m_mapping[x.second]);
+			}
+		}
+		aTable->setSymbolList(newList);
+	}
+}
+
+void DeepCloneVisitor::cloneBlock(Block* aBlock) {
+	symTabClone(aBlock->symbols());
+	StatementList& statements = aBlock->statements();
+	for (std::size_t cntr = 0; cntr < statements.size(); cntr++) {
+		statements[cntr] = sClone(statements[cntr]);
+	}
+}
+
+void DeepCloneVisitor::cloneQuantifier(Quantifier* qf) {
+	symTabClone(qf->symbols());
+	bool oldQunatifierState = m_quantifierState;
+	m_quantifierState = true;
+	visit(qf);
+	m_quantifierState = oldQunatifierState;
+}
+
+void DeepCloneVisitor::cloneExpressionList(ExpressionList& aList) {
+	for (std::size_t cntr =0; cntr < aList.size(); cntr ++)
+		aList[cntr] = eClone(aList[cntr]);
+}
+
+
+
+void DeepCloneVisitor::visit(NamedActionIdentifier* namedActionIdentifier)
+{
+	namedActionIdentifier->setBody(sClone(namedActionIdentifier->body()));
+	// we do not clone the parameters..
+}
+
+
+void DeepCloneVisitor::visit(ObjectConstructor* )
+{
+	//CompleteAstTraversalVisitor::visit(objectConstructor);
+}
+
+
+void DeepCloneVisitor::visit(NondetBlock* nondetBlock)
+{
+	cloneBlock((Block*)nondetBlock);
+}
+
+void DeepCloneVisitor::visit(SeqBlock* seqBlock)
+{
+	seqBlock->setFilter(eClone(seqBlock->filter()));
+	cloneBlock((Block*)seqBlock);
+}
+
+void DeepCloneVisitor::visit(PrioBlock* prioBlock)
+{
+	cloneBlock((Block*)prioBlock);
+}
+
+
+void DeepCloneVisitor::visit(AccessExpression* accessExpression)
+{
+	visit((BinaryOperator*)accessExpression);
+}
+
+void DeepCloneVisitor::visit(BinaryOperator* binaryOperator)
+{
+	Expression* left  = eClone(binaryOperator->left());
+	Expression* right = eClone(binaryOperator->right());
+	binaryOperator->setLeftChild(left);
+	binaryOperator->setRightChild(right);
+}
+
+void DeepCloneVisitor::visit(Assignment* assignment)
+{
+	symTabClone(assignment->symbols());
+	cloneExpressionList(assignment->places());
+	cloneExpressionList(assignment->values());
+	assignment->setNondetExpression(eClone(assignment->nondetExpression()));
+	checkScope(assignment);
+}
+
+
+void DeepCloneVisitor::visit(AttributeIdentifier* attributeIdentifier)
+{
+	attributeIdentifier->setInitializer(eClone(attributeIdentifier->initializer()));
+}
+
+void DeepCloneVisitor::visit(Call* call)
+{
+	call->setCallExpression(eClone(call->callExpression()));
+}
+
+void DeepCloneVisitor::visit(CallExpression* callExpression)
+{
+	cloneExpressionList(callExpression->arguments());
+	visit((UnaryOperator*)callExpression);
+}
+
+void DeepCloneVisitor::visit(ExistsQuantifier* quantifier)
+{
+	cloneQuantifier((Quantifier*)quantifier);
+}
+
+void DeepCloneVisitor::visit(ForallQuantifier* quantifier)
+{
+	cloneQuantifier((Quantifier*)quantifier);
+}
+
+void DeepCloneVisitor::visit(GuardedCommand* guardedCommand)
+{
+	Statement*  newblock = sClone(guardedCommand->body());
+	Expression* newguard = eClone(guardedCommand->guard());
+	guardedCommand->setBody(newblock);
+	guardedCommand->setGuard(newguard);
+}
+
+
+void DeepCloneVisitor::visit(IdentifierExpression* identifierExpression)
+{
+	if (identifierExpression->isSelf() && m_selfreplacement != nullptr)
+		identifierExpression->setIdentifier(m_selfreplacement);
+	else if (m_mapping.count(identifierExpression->identifier()) > 0
+	         && identifierExpression->identifier()->kind() != IdentifierKind::MethodIdentifier)
+	{
+		/* we do NOT replace method calls here, since they are prefixed by self if it's a
+		 * method in the current object or by some field/method access if it's another
+		 * object.
+		 */
+		identifierExpression->setIdentifier((Identifier*)m_mapping[identifierExpression->identifier()]);
+	}
+}
+
+
+void DeepCloneVisitor::visit(ListConstructor* listConstructor)
+{
+	symTabClone(listConstructor->comprehensionVariables());
+	cloneExpressionList(listConstructor->elements());
+	listConstructor->setComprehension(eClone(listConstructor->comprehension()));
+}
+
+
+void DeepCloneVisitor::visit(SetConstructor* setConstructor)
+{
+	symTabClone(setConstructor->comprehensionVariables());
+	cloneExpressionList(setConstructor->items());
+	setConstructor->setComprehension(eClone(setConstructor->comprehension()));
+}
+
+
+void DeepCloneVisitor::visit(TernaryOperator* ternaryOperator)
+{
+	ternaryOperator->setLeftChild(eClone(ternaryOperator->left()));
+	ternaryOperator->setMidChild(eClone(ternaryOperator->mid()));
+	ternaryOperator->setRightChild(eClone(ternaryOperator->right()));
+}
+
+
+void DeepCloneVisitor::visit(TupleConstructor* tupleConstructor)
+{
+	cloneExpressionList(tupleConstructor->values());
+}
+
+
+void DeepCloneVisitor::visit(TupleMapAccessExpression* tupleMapAccessExpression)
+{
+	tupleMapAccessExpression->setArgument(eClone(tupleMapAccessExpression->argument()));
+	visit((UnaryOperator*)tupleMapAccessExpression);
+}
+
+
+void DeepCloneVisitor::visit(UnaryOperator* unaryOperator)
+{
+	unaryOperator->setChild(eClone(unaryOperator->child()));
+}
+
+} /* namespace Ast */
Index: trunk/compiler/cppAst/ast/statements/SeqBlock.hpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/SeqBlock.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/SeqBlock.hpp	(revision 2)
@@ -0,0 +1,48 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/statements/Block.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class SeqBlock final
+	: public Block
+{
+protected:
+	SeqBlock() : Block(StatementKind::SeqBlock) {}
+	SeqBlock(const SeqBlock& toCopy): Block(toCopy) {}
+
+	static SeqBlock* create() {return new SeqBlock();}
+	static SeqBlock* createCopy(const SeqBlock& toCopy) {return new SeqBlock(toCopy);}
+public:
+	friend class Ast;
+	friend class Statement;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/types/ActionSystemType.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/ActionSystemType.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/ActionSystemType.hpp	(revision 2)
@@ -0,0 +1,199 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/Containers.hpp>
+#include <ast/types/Type.hpp>
+#include <ast/IScope.hpp>
+#include <ast/statements/Block.hpp>
+#include <ast/SymbolTable.hpp>
+#include <deque>
+#include <string>
+#include <cstdint>
+#include <ast/identifiers/Identifier.hpp>
+#include <ast/identifiers/FunctionIdentifier.hpp>
+#include <base/Exceptions.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class ActionSystemType; // forward
+
+
+class ActionSystemInstance final
+	: public Base::TiresiasObject
+{
+protected:
+	std::int32_t m_numberOfCreatedObjects;
+	ActionSystemType* m_type;
+	ActionSystemInstance* m_parentObject;
+	string m_name;
+
+	ActionSystemInstance():
+		TiresiasObject(),
+		m_numberOfCreatedObjects (0),
+		m_type (nullptr),
+		m_parentObject (nullptr),
+		m_name ("")
+	{};
+	ActionSystemInstance(const ActionSystemInstance& toCopy):
+		TiresiasObject(),
+		m_numberOfCreatedObjects (toCopy.m_numberOfCreatedObjects),
+		m_type (toCopy.m_type),
+		m_parentObject (toCopy.m_parentObject),
+		m_name (toCopy.m_name)
+	{};
+public:
+	friend class Ast;
+
+	void init(ActionSystemType* typeRef, const char* name, std::int32_t numOfCreatedObjs, ActionSystemInstance* parentInstanceRef)
+	{
+		m_type = typeRef;
+		m_name = name;
+		m_numberOfCreatedObjects = numOfCreatedObjs;
+		m_parentObject = parentInstanceRef;
+	}
+
+	std::string getName() const {return m_name;};
+	std::int32_t getNumberOfCreatedObjects() const {return m_numberOfCreatedObjects;};
+	ActionSystemType* getType() const {return m_type;};
+	ActionSystemInstance* getParentObject() const {return m_parentObject;};
+
+	constexpr static std::uint8_t TypeId = 2;
+	static ActionSystemInstance* create() {
+		return new ActionSystemInstance();
+	}
+};
+
+
+class ActionSystemType
+	: public Type
+	, public IScope
+{
+protected:
+	bool m_autoCons;
+	bool m_isInSystemDescription;
+	ActionSystemType* m_baseType;
+	Block* m_doodBlock;
+	IScope* m_parentScope;
+	SymbolTable* m_symbols;
+	ActionSystemInstanceList m_objects;
+	ActionSystemInstanceList m_derivedObjects;
+	FunctionIdentifier* m_doodFunction; // only avail after Finalisation Visitor has run. Wraps doodBlock in function.
+
+	ActionSystemType():
+		Type(TypeKind::OoActionSystemType),
+		m_autoCons (false),
+		m_isInSystemDescription (false),
+		m_baseType (nullptr),
+		m_doodBlock(nullptr),
+		m_parentScope(nullptr),
+		m_symbols(nullptr),
+		m_objects (),
+		m_derivedObjects(),
+		m_doodFunction (nullptr)
+	{};
+
+	ActionSystemType(const ActionSystemType& toCopy):
+		Type(toCopy),
+		m_autoCons (toCopy.m_autoCons),
+		m_isInSystemDescription (toCopy.m_isInSystemDescription),
+		m_baseType (toCopy.m_baseType),
+		m_doodBlock(toCopy.m_doodBlock),
+		m_parentScope(toCopy.m_parentScope),
+		m_symbols(toCopy.m_symbols),
+		m_objects (toCopy.m_objects),
+		m_derivedObjects(toCopy.m_derivedObjects),
+		m_doodFunction (toCopy.m_doodFunction)
+	{};
+
+	static constexpr const char* s_doodFunctionName = ".dood";
+	static ActionSystemType* create() {return new ActionSystemType();}
+	static ActionSystemType* createCopy(const ActionSystemType& toCopy) {return new ActionSystemType(toCopy);}
+public:
+	friend class Ast;
+	friend class Type;
+
+
+	void init(TypeIdentifier* identifierRef, bool anonymousType, ActionSystemType* baseTypeRef,
+			IScope* parentScopeRef, Block* doodBlockRef, SymbolTable* symTab,
+			ActionSystemInstanceList* objectsListRef,
+			ActionSystemInstanceList* derivedObjectsListRef, bool autoConstruction, bool isInSystemDescription)
+	{
+		Type::init(identifierRef,anonymousType);
+		m_baseType = baseTypeRef;
+		m_parentScope = parentScopeRef;
+		m_doodBlock = doodBlockRef;
+		m_symbols = symTab;
+		m_objects = std::move(*objectsListRef);
+		m_derivedObjects = std::move(*derivedObjectsListRef);
+		m_autoCons = autoConstruction;
+		m_isInSystemDescription = isInSystemDescription;
+	}
+
+	bool autoConstruction() {return m_autoCons;};
+	bool isInSystemDescription() {return m_isInSystemDescription;};
+	Block* doodBlock() {return m_doodBlock;};
+	std::string doodFunctionName() const {return s_doodFunctionName;}
+	FunctionIdentifier* doodFunction() {return m_doodFunction; }
+	ActionSystemType* baseType() {return m_baseType;};
+	SymbolTable* symbols() {return m_symbols;};
+	ActionSystemInstanceList& objects() {return m_objects;};
+	ActionSystemInstanceList& derivedObjects() {return m_derivedObjects;};
+	IScope* getParentScope() const override {return m_parentScope;};
+	std::string getScopeName() const override {return m_identifier->toString();}
+
+	void setDoodBlock(Block* anArg) {m_doodBlock = anArg;};
+	void setDoodFunction(FunctionIdentifier* id) {m_doodFunction = id;}
+	void setParentScope(IScope* parentScope) override {m_parentScope = parentScope;};
+	void setBaseType(ActionSystemType* newType) {m_baseType = newType;};
+	void setIsInSystemDescription(bool p) {m_isInSystemDescription = p;};
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+	Identifier* resolveIdentifier(const std::string& aName) const override {return m_symbols->get(aName);}
+	void addIdentifier(Identifier* anIdentifier, void* /*tag*/) override {m_symbols->addIdentifier(anIdentifier);};
+	SymbolTable* getAllSymbols() {return m_symbols;};
+
+	IScope* asScope() final {return (IScope*) this;}
+	bool isSubTypeOf(ActionSystemType* other){
+		if(other == this)
+			return true;
+		else if(m_baseType == nullptr)
+			return false;
+		else
+			return m_baseType->isSubTypeOf(other);
+	}
+	bool isDefined(const Identifier* id) {
+		bool result = false;
+		ActionSystemType* aType = this;
+		while (!result && aType != nullptr) {
+			result = aType->m_symbols->defined(id);
+			aType = aType->m_baseType;
+		}
+		return result;
+	}
+};
+}
Index: trunk/compiler/cppAst/ast/DeepCloneVisitor.hpp
===================================================================
--- trunk/compiler/cppAst/ast/DeepCloneVisitor.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/DeepCloneVisitor.hpp	(revision 2)
@@ -0,0 +1,141 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#pragma once
+
+#include <ast/CompleteAstTraversalVisitor.hpp>
+#include <ast/Ast.hpp>
+#include <unordered_map>
+#include <ast/expressions/Quantifier.hpp>
+
+namespace Ast {
+
+/**
+ * Based on the OoaDeepCloneVisitor from the Java frontend. Takes a shallow
+ * copy of an AST element and makes it a deep copy.
+ */
+class DeepCloneVisitor final :
+	public CompleteAstTraversalVisitor
+{
+protected:
+	Ast* m_cloneAst;
+	std::unordered_map<void*, void*> m_mapping;
+	Identifier* m_selfreplacement;
+	bool m_allowLinksToNonClonedParents;
+	bool m_quantifierState;
+
+	void updateScope(IScope* aScope);
+	void checkScope(IScope* aScope);
+	Expression* eClone(Expression* anExpr);
+	Statement* sClone(Statement* aStatement);
+	void symTabClone(SymbolTable* aTable);
+	void cloneBlock(Block* aBlock);
+	void cloneQuantifier(Quantifier* qf);
+	void cloneExpressionList(ExpressionList& aList);
+
+	void error() {
+		m_context->logError("Internal error: Cannot clone a type");
+		abort();
+	}
+
+public:
+	DeepCloneVisitor(
+			CallContext* context,
+			Ast* cloneAst,
+			bool linksToNonClonedParents = true,
+			const std::unordered_map<void*, void*>* initMapping = nullptr,
+			Identifier* selfreplace = nullptr)
+	:
+		CompleteAstTraversalVisitor( context, false),
+		m_cloneAst (cloneAst),
+		m_mapping(),
+		m_selfreplacement (selfreplace),
+		m_allowLinksToNonClonedParents (linksToNonClonedParents),
+		m_quantifierState (false)
+	{
+		if (initMapping != nullptr)
+			m_mapping.insert(initMapping->begin(), initMapping->end());
+	}
+
+	std::string returnVisitorName() override {return "DeepCloneVisitor";}
+
+	void visit(BoolType* ) override         { error(); }
+	void visit(EnumType* ) override         { error(); }
+	void visit(FunctionType* ) override { error(); }
+	void visit(IntType* ) override           { error(); }
+	void visit(ListType* ) override         { error(); }
+	void visit(NullType* ) override         { error(); }
+	void visit(ActionSystemType* ) override       { error(); }
+	void visit(TupleType* ) override                       { error(); }
+
+	void visit(EnumIdentifier* ) override             { error(); }
+	void visit(ExpressionVariableIdentifier* ) override { error(); }
+	void visit(LocalVariableIdentifier* ) override           { error(); }
+	void visit(MainModule* ) override                     { error(); }
+	void visit(MethodIdentifier* ) override         { error(); }
+	void visit(Module* ) override                             { error(); }
+	void visit(NondetIdentifierBlock* ) override{ error(); }
+	void visit(ParameterIdentifier* ) override   { error(); }
+	void visit(PrioIdentifierBlock* ) override   { error(); }
+	void visit(SeqIdentifierBlock* ) override      { error(); }
+	void visit(TypeIdentifier* ) override             { error(); }
+	void visit(UnspecIdentifierBlock* ) override { error(); }
+
+
+	void visit(NamedActionIdentifier* namedActionIdentifier) override;
+	void visit(ObjectConstructor* objectConstructor) override;
+
+
+//	void visit(AbortStatement* abortStatement) override { }
+	void visit(BoolValueExpression* ) override {};
+	void visit(IntValueExpression* ) override  {};
+	void visit(RefValueExpression* ) override  {};
+	void visit(Skip* ) override { }
+	void visit(Break* ) override { error(); }
+	void visit(TypeExpression* ) override { /*we do not clone types*/ }
+
+
+	void visit(NondetBlock* nondetBlock) override;
+	void visit(SeqBlock* seqBlock) override;
+	void visit(PrioBlock* prioBlock) override;
+	void visit(AccessExpression* accessExpression) override;
+	void visit(BinaryOperator* binaryOperator) override;
+	void visit(Assignment* assignment) override;
+	void visit(AttributeIdentifier* attributeIdentifier) override;
+	void visit(Call* call) override;
+
+	void visit(CallExpression* callExpression) override;
+	void visit(ExistsQuantifier* quantifier) override;
+	void visit(ForallQuantifier* quantifier) override;
+	void visit(GuardedCommand* guardedCommand) override;
+	void visit(IdentifierExpression* identifierExpression) override;
+	void visit(ListConstructor* listConstructor) override;
+	void visit(SetConstructor* setConstructor) override;
+	void visit(TernaryOperator* ternaryOperator) override;
+	void visit(TupleConstructor* tupleConstructor) override;
+	void visit(TupleMapAccessExpression* tupleMapAccessExpression) override;
+	void visit(UnaryOperator* unaryOperator) override;
+};
+
+} /* namespace Ast */
Index: trunk/compiler/cppAst/ast/statements/Break.hpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/Break.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/Break.hpp	(revision 2)
@@ -0,0 +1,53 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+/*
+ * Break.hpp
+ *
+ *  Created on: Apr 1, 2014
+ *      Author: willibald
+ */
+
+#pragma once
+
+#include <ast/statements/Statement.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class Break final
+	: public Statement
+{
+protected:
+	Break(): Statement(StatementKind::Break){};
+	Break(const Break& toCopy): Statement(toCopy){};
+
+	static Break* create() {return new Break();}
+	static Break* createCopy(const Break& toCopy) {return new Break(toCopy);}
+public:
+	friend class Ast;
+	friend class Statement;
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/types/ActionSystemType.cpp
===================================================================
--- trunk/compiler/cppAst/ast/types/ActionSystemType.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/ActionSystemType.cpp	(revision 2)
@@ -0,0 +1,31 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#include "ActionSystemType.hpp"
+
+namespace Ast {
+
+
+}
+
Index: trunk/compiler/cppAst/ast/types/FunctionType.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/FunctionType.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/FunctionType.hpp	(revision 2)
@@ -0,0 +1,112 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/types/Type.hpp>
+#include <ast/Containers.hpp>
+#include <deque>
+
+namespace Ast {
+
+enum class FunctionKind : std::uint8_t {
+	Observable = 0,
+	Controllable = 1,
+	Continuous = 2,
+	Internal = 3,
+	Method = 4
+};
+
+class FunctionType final
+	: public Type
+{
+protected:
+	FunctionKind m_functionType;
+	bool m_pure;
+	bool m_static;
+	bool* m_miracleSafe;
+	Type* m_returnType;
+	TypeList m_parameter;
+
+	FunctionType():
+		Type(TypeKind::FunctionType),
+		m_functionType (FunctionKind::Internal),
+		m_pure(false),
+		m_static(false),
+		m_miracleSafe (nullptr),
+		m_returnType (nullptr),
+		m_parameter ()
+	{}
+
+	FunctionType(const FunctionType& toCopy):
+		Type(toCopy),
+		m_functionType (toCopy.m_functionType),
+		m_pure(toCopy.m_pure),
+		m_static(toCopy.m_static),
+		m_miracleSafe (toCopy.m_miracleSafe),
+		m_returnType (toCopy.m_returnType),
+		m_parameter (toCopy.m_parameter)
+	{}
+
+	static FunctionType* create() {return new FunctionType();}
+	static FunctionType* createCopy(const FunctionType& toCopy) {return new FunctionType(toCopy);}
+public:
+	friend class Ast;
+	friend class Type;
+
+	~FunctionType() override {
+		if (m_miracleSafe != nullptr)
+			delete m_miracleSafe;
+	}
+
+	void init(TypeIdentifier* identifierRef, bool anonymousType,
+			TypeList* paramTypeListRef, Type* returnTypeRef, FunctionKind functionKind, bool isPure)
+	{
+		Type::init(identifierRef,anonymousType);
+		m_parameter = std::move(*paramTypeListRef);
+		m_returnType = returnTypeRef;
+		m_functionType = functionKind;
+		m_pure = isPure;
+	}
+
+	bool* isMiracleSafe() const {return m_miracleSafe;};
+	bool isStatic() const {return m_static;}
+	bool isPureFunction() const {return m_pure;};
+	TypeList& parameter() {return m_parameter;};
+	Type* returnType() const {return m_returnType;};
+	FunctionKind functionType() const {return m_functionType;};
+
+	void addParameterType(Type* aType) {m_parameter.push_back(aType);};
+	void setReturnType(Type* aType) {m_returnType = aType;};
+	void setMiracleSafe(bool newValue) {
+		if (m_miracleSafe == nullptr)
+			m_miracleSafe = new bool();
+		*m_miracleSafe = newValue;
+	}
+	void setIsStatic(bool isStatic) {m_static = isStatic;}
+	void setIsPureFunction(bool newValue) {m_pure = newValue;}
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/types/EnumType.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/EnumType.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/EnumType.hpp	(revision 2)
@@ -0,0 +1,86 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/types/Type.hpp>
+#include <ast/SymbolTable.hpp>
+#include <deque>
+#include <ast/identifiers/EnumIdentifier.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class EnumType
+	: public Type
+{
+protected:
+	SymbolTable* m_enumSymbols;
+	std::deque<EnumIdentifier*> m_listOfEnumSymbols;
+
+	EnumType(TypeKind tk):
+		Type(tk),
+		m_enumSymbols(nullptr),
+		m_listOfEnumSymbols()
+	{}
+	EnumType():
+		Type(TypeKind::EnumeratedType),
+		m_enumSymbols(nullptr),
+		m_listOfEnumSymbols()
+	{}
+	EnumType(const EnumType& toCopy):
+		Type(toCopy),
+		m_enumSymbols(toCopy.m_enumSymbols),
+		m_listOfEnumSymbols(toCopy.m_listOfEnumSymbols)
+	{}
+	static EnumType* create() {return new EnumType(); }
+	static EnumType* createCopy(const EnumType& toCopy) {return new EnumType(toCopy); }
+public:
+	friend class Ast;
+	friend class Type;
+
+	void init( TypeIdentifier* identifierRef, bool anonymousType, SymbolTable* symTabRef) {
+		Type::init(identifierRef, anonymousType);
+		m_enumSymbols = symTabRef;
+		m_listOfEnumSymbols.clear();
+		for (auto& iter : *symTabRef){
+			m_listOfEnumSymbols.push_back((EnumIdentifier*)iter.second);
+		}
+	}
+
+	SymbolTable* symbolTable() {return m_enumSymbols;};
+	std::deque<EnumIdentifier*>& listOfEnumSymbols() {return m_listOfEnumSymbols;};
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+	void addEnumSymbol(EnumIdentifier*) {throw new Base::NotImplementedException();}
+
+	bool isSigned() override {return false;}
+
+	uint32_t bitwidth() override {
+		return (std::uint32_t) std::floor(std::log2(m_listOfEnumSymbols.size())) + 1;
+	}
+
+};
+}
Index: trunk/compiler/cppAst/ast/ExpressionVisitor.cpp
===================================================================
--- trunk/compiler/cppAst/ast/ExpressionVisitor.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/ExpressionVisitor.cpp	(revision 2)
@@ -0,0 +1,171 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#include "ExpressionVisitor.hpp"
+#include <ast/expressions/IdentifierExpression.hpp>
+#include <ast/expressions/TypeExpression.hpp>
+#include <ast/expressions/ListConstructor.hpp>
+#include <ast/expressions/SetConstructor.hpp>
+#include <ast/expressions/TupleConstructor.hpp>
+#include <ast/expressions/AccessExpression.hpp>
+#include <ast/expressions/BinaryOperator.hpp>
+#include <ast/expressions/TernaryOperator.hpp>
+#include <ast/expressions/TupleMapAccessExpression.hpp>
+#include <ast/expressions/CallExpression.hpp>
+#include <ast/expressions/ForallQuantifier.hpp>
+#include <ast/expressions/ExistsQuantifier.hpp>
+#include <ast/expressions/UnaryOperator.hpp>
+
+
+namespace Ast {
+
+
+ExpressionVisitor::ExpressionVisitor(CallContext* context):
+		m_context(context)
+{}
+
+ExpressionVisitor::~ExpressionVisitor()
+{}
+
+
+void ExpressionVisitor::visitSub(AstElement* subElement, AstElement* parent) {
+	if (subElement == nullptr)
+		return;
+	visitAstElement(subElement, parent);
+}
+
+void ExpressionVisitor::visitAstElement(AstElement* element, AstElement* ){
+	switch (element->nodeType()) {
+	case AstNodeTypeEnum::statement:
+	case AstNodeTypeEnum::identifier:
+	case AstNodeTypeEnum::type:
+		error();
+		break;
+	case AstNodeTypeEnum::expression:
+		static_cast<Expression*>(element)->accept(*this);
+		break;
+	default:
+		m_context->logError("Internal error. Unknown AST type.");
+		abort();
+	}
+}
+
+void ExpressionVisitor::error() {
+	m_context -> logError("Internal error. This visitor only supports expressions.");
+	abort();
+}
+
+
+void ExpressionVisitor::visit(TypeIdentifier* ) { error(); };
+void ExpressionVisitor::visit(EnumIdentifier* ) { error(); };
+//void ExpressionVisitor::visit(ValuedEnumIdentifier* enumIdentifier) { error(); };
+void ExpressionVisitor::visit(AttributeIdentifier* ) { error(); };
+void ExpressionVisitor::visit(LocalVariableIdentifier* ) { error(); };
+void ExpressionVisitor::visit(ParameterIdentifier* ) { error(); };
+void ExpressionVisitor::visit(ExpressionVariableIdentifier* ) { error(); };
+void ExpressionVisitor::visit(MethodIdentifier* ) { error(); };
+void ExpressionVisitor::visit(NamedActionIdentifier* ) { error(); };
+void ExpressionVisitor::visit(Module* ) { error(); };
+void ExpressionVisitor::visit(ConstantIdentifier* ) { error(); };
+void ExpressionVisitor::visit(UnspecIdentifierBlock* ) { error(); };
+void ExpressionVisitor::visit(SeqIdentifierBlock* ) { error(); };
+void ExpressionVisitor::visit(NondetIdentifierBlock* ) { error(); };
+void ExpressionVisitor::visit(PrioIdentifierBlock* ) { error(); };
+void ExpressionVisitor::visit(MainModule* ) { error(); };
+void ExpressionVisitor::visit(IntType* ) { error(); };
+void ExpressionVisitor::visit(BoolType* ) { error(); };
+void ExpressionVisitor::visit(EnumType* ) { error(); };
+void ExpressionVisitor::visit(ListType* ) { error(); };
+void ExpressionVisitor::visit(TupleType* ) { error(); };
+void ExpressionVisitor::visit(NullType* ) { error(); };
+void ExpressionVisitor::visit(PointerType* ) { error(); };
+void ExpressionVisitor::visit(FunctionType* ) { error(); };
+void ExpressionVisitor::visit(ActionSystemType* ) { error(); };
+void ExpressionVisitor::visit(GuardedCommand* ) { error(); };
+void ExpressionVisitor::visit(Call* ) { error(); };
+void ExpressionVisitor::visit(Assignment* ) { error(); };
+void ExpressionVisitor::visit(SeqBlock* ) { error(); };
+void ExpressionVisitor::visit(NondetBlock* ) { error(); };
+void ExpressionVisitor::visit(PrioBlock* ) { error(); };
+void ExpressionVisitor::visit(Skip* ) { error(); };
+void ExpressionVisitor::visit(Break* ) { error(); };
+void ExpressionVisitor::visit(Abort* ) { error(); };
+
+
+void ExpressionVisitor::visit(TernaryOperator* ternaryOperator) {
+	visitSub(ternaryOperator->left(), ternaryOperator);
+	visitSub(ternaryOperator->mid(), ternaryOperator);
+	visitSub(ternaryOperator->right(), ternaryOperator);
+};
+void ExpressionVisitor::visit(BinaryOperator* binaryOperator) {
+	visitSub(binaryOperator->left(), binaryOperator);
+	visitSub(binaryOperator->right(), binaryOperator);
+};
+void ExpressionVisitor::visit(UnaryOperator* unaryOperator) {
+	visitSub(unaryOperator->child(), unaryOperator);
+};
+void ExpressionVisitor::visit(ExistsQuantifier* quantifier) {
+	visitSub(quantifier->child(), quantifier);
+};
+void ExpressionVisitor::visit(ForallQuantifier* quantifier) {
+	visitSub(quantifier->child(), quantifier);
+};
+void ExpressionVisitor::visit(ListConstructor* listConstructor) {
+	for (auto& elems: listConstructor->elements())
+		visitSub(elems, listConstructor);
+
+	visitSub(listConstructor->comprehension(), listConstructor);
+};
+void ExpressionVisitor::visit(SetConstructor* setConstructor) {
+	for (auto& elems: setConstructor->items())
+		visitSub(elems, setConstructor);
+
+	visitSub(setConstructor->comprehension(), setConstructor);
+};
+void ExpressionVisitor::visit(TupleConstructor* tupleConstructor) {
+	for (auto& elem: tupleConstructor->values())
+		visitSub(elem, tupleConstructor);
+};
+void ExpressionVisitor::visit(ObjectConstructor* ) {};
+void ExpressionVisitor::visit(BoolValueExpression* ) {};
+void ExpressionVisitor::visit(IntValueExpression* ) {};
+void ExpressionVisitor::visit(RefValueExpression* ) {};
+void ExpressionVisitor::visit(IdentifierExpression* ) {};
+void ExpressionVisitor::visit(TypeExpression* ) {};
+void ExpressionVisitor::visit(TupleMapAccessExpression* tupleMapAccessExpression) {
+	visitSub(tupleMapAccessExpression->argument(), tupleMapAccessExpression);
+	visitSub(tupleMapAccessExpression->child(), tupleMapAccessExpression);
+};
+void ExpressionVisitor::visit(CallExpression* callExpression) {
+	for (auto& arg: callExpression->arguments())
+		visitSub(arg, callExpression);
+	visitSub(callExpression->child(), callExpression);
+};
+void ExpressionVisitor::visit(AccessExpression* accessExpression) {
+	visitSub(accessExpression->left(), accessExpression);
+	visitSub(accessExpression->right(), accessExpression);
+};
+
+} /* namespace Ast */
Index: trunk/compiler/cppAst/ast/statements/PrioBlock.hpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/PrioBlock.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/PrioBlock.hpp	(revision 2)
@@ -0,0 +1,47 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/statements/Block.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class PrioBlock final
+	: public Block
+{
+protected:
+	PrioBlock() : Block(StatementKind::PrioBlock) {}
+	PrioBlock(const PrioBlock& toCopy): Block(toCopy) {}
+
+	static PrioBlock* create() {return new PrioBlock();}
+	static PrioBlock* createCopy(const PrioBlock& toCopy) {return new PrioBlock(toCopy);}
+public:
+	friend class Ast;
+	friend class Statement;
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/types/PointerType.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/PointerType.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/PointerType.hpp	(revision 2)
@@ -0,0 +1,49 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#pragma once
+
+#include <ast/types/Type.hpp>
+
+namespace Ast {
+
+
+class PointerType final
+	: public Type
+{
+protected:
+	PointerType():Type(TypeKind::Pointer) {};
+	PointerType(const NullType& toCopy): Type(toCopy) {};
+
+	static PointerType* create(){return new PointerType();}
+	static PointerType* createCopy(const PointerType& toCopy){return new PointerType(toCopy);}
+public:
+	friend class Ast;
+	friend class Type;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+
+
+}
Index: trunk/compiler/cppAst/ast/types/NullType.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/NullType.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/NullType.hpp	(revision 2)
@@ -0,0 +1,49 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/types/Type.hpp>
+#include <ast/IAstVisitor.hpp>
+#include <string>
+
+namespace Ast {
+
+class NullType final
+	: public Type
+{
+protected:
+	NullType():Type(TypeKind::Null) {};
+	NullType(const NullType& toCopy): Type(toCopy) {};
+
+	static NullType* create() {return new NullType();}
+	static NullType* createCopy(const NullType& toCopy) {return new NullType(toCopy);}
+public:
+	friend class Ast;
+	friend class Type;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/ExpressionVisitor.hpp
===================================================================
--- trunk/compiler/cppAst/ast/ExpressionVisitor.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/ExpressionVisitor.hpp	(revision 2)
@@ -0,0 +1,111 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <CallContext.hpp>
+#include <ast/IAstVisitor.hpp>
+#include <base/TiresiasObject.hpp>
+#include <ast/types/Type.hpp>
+#include <ast/identifiers/Identifier.hpp>
+#include <ast/expressions/Expression.hpp>
+#include <ast/statements/Statement.hpp>
+#include <unordered_map>
+
+namespace Ast {
+
+/**
+ * Walks an Expression-Tree, ignores all the other AST elements.
+ */
+class ExpressionVisitor:
+		public Base::TiresiasObject,
+		public IAstVisitor {
+protected:
+	CallContext* m_context;
+
+	void visitSub(AstElement* subElement, AstElement* parent);
+	void visitAstElement(AstElement* element, AstElement* parent);
+	void error();
+public:
+	ExpressionVisitor(CallContext* context);
+	~ExpressionVisitor() override;
+
+	void visit(TypeIdentifier* typeIdentifier) override;
+	void visit(EnumIdentifier* enumIdentifier) override;
+//	void visit(ValuedEnumIdentifier* enumIdentifier) override;
+	void visit(AttributeIdentifier* attributeIdentifier) override;
+	void visit(LocalVariableIdentifier* localVariableIdentifier) override;
+	void visit(ParameterIdentifier* parameterIdentifier) override;
+	void visit(ExpressionVariableIdentifier* expressionVariableIdentifier) override;
+	void visit(MethodIdentifier* methodIdentifier) override;
+	void visit(NamedActionIdentifier* namedActionIdentifier) override;
+	void visit(Module* module) override;
+	void visit(ConstantIdentifier* constantIdentifier) override;
+	void visit(UnspecIdentifierBlock* unspecIdentifierList) override;
+	void visit(SeqIdentifierBlock* seqIdentifierList) override;
+	void visit(NondetIdentifierBlock* nondetIdentifierList) override;
+	void visit(PrioIdentifierBlock* prioIdentifierList) override;
+	void visit(MainModule* mainModule) override;
+
+	void visit(IntType* intType) override;
+	void visit(BoolType* boolType) override;
+	void visit(EnumType* enumType) override;
+	void visit(ListType* listType) override;
+	void visit(TupleType* tupleType) override;
+	void visit(NullType* nullType) override;
+	void visit(FunctionType* functionType) override;
+	void visit(ActionSystemType* actionSystemType) override;
+
+	void visit(GuardedCommand* guardedCommand) override;
+	void visit(Call* call) override;
+	void visit(Assignment* assignment) override;
+	void visit(SeqBlock* seqBlock) override;
+	void visit(NondetBlock* nondetBlock) override;
+	void visit(PrioBlock* prioBlock) override;
+	void visit(Skip* skipStatement) override;
+	void visit(Break* skipStatement) override;
+	void visit(Abort* abortStatement) override;
+
+	void visit(TernaryOperator* ternaryOperator) override;
+	void visit(BinaryOperator* binaryOperator) override;
+	void visit(UnaryOperator* unaryOperator) override;
+	void visit(ExistsQuantifier* quantifier) override;
+	void visit(ForallQuantifier* quantifier) override;
+	void visit(ListConstructor* listConstructor) override;
+	void visit(SetConstructor* setConstructor) override;
+	void visit(TupleConstructor* tupleConstructor) override;
+	void visit(ObjectConstructor* objectConstructor) override;
+	void visit(BoolValueExpression* identifierExpression) override;
+	void visit(IntValueExpression* identifierExpression) override;
+	void visit(RefValueExpression* identifierExpression) override;
+	void visit(IdentifierExpression* identifierExpression) override;
+	void visit(TypeExpression* typeExpression) override;
+	void visit(TupleMapAccessExpression* tupleMapAccessExpression) override;
+	void visit(CallExpression* callExpression) override;
+	void visit(AccessExpression* accessExpression) override;
+	void visit(PointerType* pt) override;
+};
+
+} /* namespace Ast */
Index: trunk/compiler/cppAst/ast/statements/Statement.hpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/Statement.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/Statement.hpp	(revision 2)
@@ -0,0 +1,108 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <base/TiresiasObject.hpp>
+#include <ast/AstElement.hpp>
+#include <cstdint>
+#include <base/Exceptions.hpp>
+
+namespace Ast {
+
+/**
+ * You must not change the assigned values as this
+ * needs to be kept in sync with the definitions in Argos!
+ */
+enum class StatementKind : std::uint8_t {
+	GuardedCommand = 0,
+	Call = 1,
+	Assignment = 2,
+	SeqBlock = 3,
+	NondetBlock = 4,
+	PrioBlock = 5,
+	Skip = 6,
+	Abort = 7,
+	Kill = 8,
+	QualConstraint = 9,
+	Break = 10,
+	STATEMENTKIND_LAST_ITEM = Break
+};
+
+#define STATEMENTKIND_NR_ITEMS ((std::uint8_t)StatementKind::STATEMENTKIND_LAST_ITEM + 1)
+
+
+class Statement:
+	public AstElement
+{
+protected:
+	typedef Statement* (*ConstrPtr)();
+	typedef Statement* (*CopyConstrPtr)(const Statement& toCopy);
+
+	StatementKind m_kind;
+	std::int32_t m_line;
+	std::int32_t m_pos;
+
+	Statement(StatementKind kind):
+		AstElement(AstNodeTypeEnum::statement),
+		m_kind(kind),
+		m_line(-1),
+		m_pos(-1)
+	{};
+
+	Statement(const Statement& toCopy):
+		AstElement(AstNodeTypeEnum::statement),
+		m_kind(toCopy.m_kind),
+		m_line(toCopy.m_line),
+		m_pos(toCopy.m_pos)
+	{}
+
+	static Base::FuncPtr s_stmntVmt [2][STATEMENTKIND_NR_ITEMS];
+	static Statement* createVirtual(StatementKind aType); // virtual constructor used by Ast
+	static Statement* createVirtual(const Statement& toCopy); // virtual copy constructor used by Ast
+public:
+	friend class Ast;
+
+	void init(std::int32_t line, std::int32_t col) {
+		m_line = line;
+		m_pos = col;
+	}
+
+	StatementKind kind() const {return m_kind;}
+	std::int32_t line() const {return m_line;};
+	std::int32_t pos() const {return m_pos;};
+
+	void accept(IAstVisitor& visitor) override;
+	std::string toString() const {
+		std::string result = "Stmnt ";
+		result += std::to_string((std::uint32_t) m_kind );
+		result += " at ";
+		result += std::to_string(m_line);
+		result += ":";
+		result += std::to_string(m_pos);
+		return result;
+	}
+};
+}
Index: trunk/compiler/cppAst/ast/types/ValuedEnumType.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/ValuedEnumType.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/ValuedEnumType.hpp	(revision 2)
@@ -0,0 +1,71 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/types/EnumType.hpp>
+#include <ast/types/IntType.hpp>
+#include <string>
+
+namespace Ast {
+class ValuedEnumType final
+	: public EnumType
+{
+protected:
+	IntType* m_intType;
+
+	ValuedEnumType():
+		EnumType(TypeKind::ValuedEnumeratedType),
+		m_intType(nullptr)
+	{};
+	ValuedEnumType(const ValuedEnumType &toCopy):
+		EnumType(toCopy),
+		m_intType(toCopy.m_intType)
+	{};
+
+	static ValuedEnumType* create() {return new ValuedEnumType();}
+	static ValuedEnumType* createCopy(const ValuedEnumType& toCopy) {return new ValuedEnumType(toCopy);}
+public:
+	friend class Ast;
+	friend class Type;
+
+	void init( TypeIdentifier* identifierRef, bool anonymousType, SymbolTable* symTabRef,
+			IntType* intTypeRef)
+	{
+		EnumType::init(identifierRef, anonymousType, symTabRef);
+		m_intType = intTypeRef;
+	}
+
+
+	IntType* getIntType() {return m_intType;};
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+
+	bool isSigned() override {return m_intType->isSigned();}
+
+	uint32_t bitwidth() override {return m_intType->bitwidth();}
+
+};
+}
Index: trunk/compiler/cppAst/ast/IAstVisitor.hpp
===================================================================
--- trunk/compiler/cppAst/ast/IAstVisitor.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/IAstVisitor.hpp	(revision 2)
@@ -0,0 +1,109 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+
+#pragma once
+
+#include <string>
+#include "Ast.hpp"
+
+namespace Ast {
+
+class IAstVisitor
+{
+public:
+	virtual ~IAstVisitor() {};
+	virtual std::string returnVisitorName() = 0;
+
+	virtual void visit(TypeIdentifier* typeIdentifier) = 0;
+	virtual void visit(EnumIdentifier* enumIdentifier) = 0;
+//	virtual void visit(ValuedEnumIdentifier* enumIdentifier) = 0;
+	virtual void visit(AttributeIdentifier* attributeIdentifier) = 0;
+	virtual void visit(LocalVariableIdentifier* localVariableIdentifier) = 0;
+	virtual void visit(ParameterIdentifier* parameterIdentifier) = 0;
+	virtual void visit(ExpressionVariableIdentifier* expressionVariableIdentifier) = 0;
+	virtual void visit(MethodIdentifier* methodIdentifier) = 0;
+	virtual void visit(NamedActionIdentifier* namedActionIdentifier) = 0;
+	virtual void visit(Module* module) = 0;
+	virtual void visit(ConstantIdentifier* constantIdentifier) = 0;
+	virtual void visit(UnspecIdentifierBlock* unspecIdentifierList) = 0;
+	virtual void visit(SeqIdentifierBlock* seqIdentifierList) = 0;
+	virtual void visit(NondetIdentifierBlock* nondetIdentifierList) = 0;
+	virtual void visit(PrioIdentifierBlock* prioIdentifierList) = 0;
+	virtual void visit(MainModule* mainModule) = 0;
+
+	virtual void visit(IntType* intType) = 0;
+	virtual void visit(BoolType* boolType) = 0;
+	virtual void visit(EnumType* enumType) = 0;
+	virtual void visit(ListType* listType) = 0;
+	virtual void visit(TupleType* tupleType) = 0;
+	virtual void visit(NullType* nullType) = 0;
+	virtual void visit(FunctionType* functionType) = 0;
+	virtual void visit(ActionSystemType* actionSystemType) = 0;
+	virtual void visit(PointerType* pointerType) = 0;
+
+
+	virtual void visit(GuardedCommand* guardedCommand) = 0;
+	virtual void visit(Call* call) = 0;
+	virtual void visit(Assignment* assignment) = 0;
+	virtual void visit(SeqBlock* seqBlock) = 0;
+	virtual void visit(NondetBlock* nondetBlock) = 0;
+	virtual void visit(PrioBlock* prioBlock) = 0;
+	virtual void visit(Skip* skipStatement) = 0;
+	virtual void visit(Break* breakStatement) = 0;
+	virtual void visit(Abort* abortStatement) = 0;
+
+	virtual void visit(TernaryOperator* ternaryOperator) = 0;
+	virtual void visit(BinaryOperator* binaryOperator) = 0;
+	virtual void visit(UnaryOperator* unaryOperator) = 0;
+	virtual void visit(ExistsQuantifier* quantifier) = 0;
+	virtual void visit(ForallQuantifier* quantifier) = 0;
+	virtual void visit(ListConstructor* listConstructor) = 0;
+	virtual void visit(SetConstructor* setConstructor) = 0;
+	virtual void visit(TupleConstructor* tupleConstructor) = 0;
+	virtual void visit(ObjectConstructor* objectConstructor) = 0;
+	virtual void visit(BoolValueExpression* identifierExpression) = 0;
+	virtual void visit(IntValueExpression* identifierExpression) = 0;
+	virtual void visit(RefValueExpression* identifierExpression) = 0;
+	virtual void visit(IdentifierExpression* identifierExpression) = 0;
+	virtual void visit(TypeExpression* typeExpression) = 0;
+	virtual void visit(TupleMapAccessExpression* tupleMapAccessExpression) = 0;
+	virtual void visit(CallExpression* callExpression) = 0;
+	virtual void visit(AccessExpression* accessExpression) = 0;
+
+
+/*
+	virtual void visit(SelfTypeIdentifier& typeIdentifier) = 0;
+	virtual void visit(KillStatement& killStatement) = 0;
+	virtual void visit(UnresolvedIdentifierExpression& unresolvedIdentifierExpression) = 0;
+	virtual void visit(MapConstructor& mapConstructor) = 0;
+	virtual void visit(CharType& charType) = 0;
+	virtual void visit(FloatType& floatType) = 0;
+	virtual void visit(MapType& mapType) = 0;
+	virtual void visit(AnyType& anyType) = 0;
+*/
+};
+
+}
Index: trunk/compiler/cppAst/ast/types/CharType.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/CharType.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/CharType.hpp	(revision 2)
@@ -0,0 +1,43 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/types/IntType.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class CharType final
+	: public IntType
+{
+protected:
+	CharType(): IntType() {}
+	CharType(CharType &toCopy): IntType(toCopy) {}
+
+public:
+//	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/cppAst/ast/types/Type.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/Type.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/Type.hpp	(revision 2)
@@ -0,0 +1,137 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <cstdint>
+#include <string>
+
+#include <base/TiresiasObject.hpp>
+#include <ast/identifiers/TypeIdentifier.hpp>
+#include <ast/AstElement.hpp>
+#include <base/Exceptions.hpp>
+
+namespace Ast {
+
+/**
+ * You must not change the assigned values as this
+ * needs to be kept in sync with the definitions in Argos!
+ */
+enum class TypeKind : std::uint8_t
+{
+	IntType = 0,
+	BoolType = 1,
+	FloatType = 2,
+	EnumeratedType = 3,
+	ListType = 4,
+	MapType = 5,
+	QrType = 6,
+	TupleType = 7,
+	FunctionType = 8,
+	OoActionSystemType = 9,
+	OpaqueType = 10,
+	Null = 11,
+	Any = 12,
+	ValuedEnumeratedType = 13,
+	Pointer = 14, // used in backend only, to interface with the runtime
+	TYPEKIND_LAST_ITEM = Pointer
+};
+
+#define TYPEKIND_NR_ITEMS ((std::uint8_t)TypeKind::TYPEKIND_LAST_ITEM + 1)
+
+
+enum class TypeVMethod: std::uint8_t {
+	Constr = 0,
+	CopyConstr = 1,
+	TYPEVMETHOD_LAST_ITEM = CopyConstr
+};
+
+#define TYPEVMETHOD_NR_ITEMS ((std::uint8_t)TypeVMethod::TYPEVMETHOD_LAST_ITEM + 1)
+
+
+class Type
+	: public AstElement
+{
+protected:
+	typedef Type* (*ConstrPtr)();
+	typedef Type* (*CopyConstrPtr)(const Type& toCopy);
+
+	const TypeKind m_kind; // byte @ +2 byte
+	bool  m_anonymousType; // byte @ +3
+	TypeIdentifier* m_identifier = nullptr;
+
+	Type(TypeKind kind):
+		AstElement(AstNodeTypeEnum::type),
+		m_kind(kind),
+		m_anonymousType (false),
+		m_identifier (nullptr)
+	{};
+	Type(const Type &toCopy):
+		AstElement(AstNodeTypeEnum::type),
+		m_kind(toCopy.m_kind),
+		m_anonymousType (toCopy.m_anonymousType),
+		m_identifier (toCopy.m_identifier)
+	{};
+
+	static Base::FuncPtr s_typeVmt [TYPEVMETHOD_NR_ITEMS][TYPEKIND_NR_ITEMS];
+	static Type* createVirtual(TypeKind aType); // virtual constructor used by Ast
+	static Type* createVirtual(const Type& toCopy); // virtual copy constructor used by Ast
+public:
+	friend class Ast;
+
+	void init(TypeIdentifier* id, bool anonymousType) {
+		m_identifier = id;
+		m_anonymousType = anonymousType;
+	}
+
+	TypeKind kind() const {
+		return m_kind;
+	}
+	TypeIdentifier* identifier() const {
+		return m_identifier;
+	}
+	std::string toString() const;
+
+	void setTypeIdentifier(TypeIdentifier* anId) {
+		m_identifier = anId;
+	}
+	bool isAnonymousType() {
+		return m_anonymousType;
+	}
+
+	void accept(IAstVisitor& visitor) override;
+
+	static bool equal(Type* type1, Type* type2);
+
+	virtual bool isSigned(){return false;}
+
+	virtual uint32_t bitwidth(){throw new Base::NotImplementedException();}
+
+	bool requiresCast(Type* targetType) {
+		return bitwidth() != targetType->bitwidth() || isSigned() != targetType->isSigned();
+	}
+
+};
+}
Index: trunk/compiler/cppAst/ast/IScope.hpp
===================================================================
--- trunk/compiler/cppAst/ast/IScope.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/IScope.hpp	(revision 2)
@@ -0,0 +1,48 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <string>
+
+
+namespace Ast {
+
+	class Identifier; // forward
+
+	class IScope
+	{
+	public:
+		virtual ~IScope() {};
+
+		virtual Identifier* resolveIdentifier(const std::string& aName) const = 0;
+		virtual IScope* getParentScope() const = 0;
+		virtual std::string getScopeName() const = 0;
+
+		virtual void setParentScope(IScope* parentScope) = 0;
+		virtual void addIdentifier(Identifier* anIdentifier, void* tag) = 0;
+	};
+
+}
Index: trunk/compiler/cppAst/ast/types/ListType.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/ListType.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/ListType.hpp	(revision 2)
@@ -0,0 +1,68 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/types/Type.hpp>
+#include <cstdint>
+
+namespace Ast {
+
+class ListType final
+	: public Type
+{
+protected:
+	Type* m_innerType;
+	std::uint32_t m_maxNumberOfElements;
+
+	ListType():Type(TypeKind::ListType), m_innerType(nullptr), m_maxNumberOfElements(0){}
+	ListType(const ListType& toCopy):
+		Type(toCopy),
+		m_innerType(toCopy.m_innerType),
+		m_maxNumberOfElements (toCopy.m_maxNumberOfElements)
+	{}
+
+	static ListType* create() {return new ListType();}
+	static ListType* createCopy(const ListType& toCopy) {return new ListType(toCopy);}
+public:
+	friend class Ast;
+	friend class Type;
+
+	void init(TypeIdentifier* identifierRef, bool anonymousType, Type* innerTypeRef,
+			std::uint32_t maxNumberOfElements)
+	{
+		Type::init(identifierRef,anonymousType);
+		m_innerType = innerTypeRef;
+		m_maxNumberOfElements = maxNumberOfElements;
+	}
+
+	Type* innerType() {return m_innerType;};
+	std::uint32_t maxNumberOfElements() const {return m_maxNumberOfElements;};
+
+	void setMaxNumberOfElements(std::uint32_t max) {m_maxNumberOfElements = max;};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+	void setInnerType(Type* newType) {m_innerType = newType;};
+};
+}
Index: trunk/compiler/licenses/eclipse/notice.html
===================================================================
--- trunk/compiler/licenses/eclipse/notice.html	(nonexistent)
+++ trunk/compiler/licenses/eclipse/notice.html	(revision 2)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY &quot;CONTENT&quot;).  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+   (&quot;EPL&quot;).  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;.  Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;).  Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+       on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
\ No newline at end of file
Index: trunk/compiler/licenses/eclipse/epl-v10.html
===================================================================
--- trunk/compiler/licenses/eclipse/epl-v10.html	(nonexistent)
+++ trunk/compiler/licenses/eclipse/epl-v10.html	(revision 2)
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+	{
+	panose-1:2 11 6 4 3 5 4 4 2 4;
+	mso-font-charset:0;
+	mso-font-pitch:variable;
+	mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+	{mso-style-parent:"";
+	margin:0in;
+	margin-bottom:.0001pt;
+	mso-pagination:widow-orphan;
+	font-size:12.0pt;
+	}
+p
+	{margin-right:0in;
+	mso-margin-top-alt:auto;
+	mso-margin-bottom-alt:auto;
+	margin-left:0in;
+	mso-pagination:widow-orphan;
+	font-size:12.0pt;
+	}
+p.BalloonText, li.BalloonText, div.BalloonText
+	{mso-style-name:"Balloon Text";
+	margin:0in;
+	margin-bottom:.0001pt;
+	mso-pagination:widow-orphan;
+	font-size:8.0pt;
+	
+	}
+@page Section1
+	{size:8.5in 11.0in;
+	margin:1.0in 1.25in 1.0in 1.25in;
+	mso-header-margin:.5in;
+	mso-footer-margin:.5in;
+	mso-paper-source:0;}
+div.Section1
+	{page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
Index: trunk/compiler/cppAst/ast/types/Type.cpp
===================================================================
--- trunk/compiler/cppAst/ast/types/Type.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/Type.cpp	(revision 2)
@@ -0,0 +1,185 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#include "Type.hpp"
+#include <ast/types/IntType.hpp>
+#include <ast/types/BoolType.hpp>
+#include <ast/types/EnumType.hpp>
+#include <ast/types/ListType.hpp>
+#include <ast/types/TupleType.hpp>
+#include <ast/types/FunctionType.hpp>
+#include <ast/types/ActionSystemType.hpp>
+#include <ast/types/NullType.hpp>
+#include <ast/types/ValuedEnumType.hpp>
+#include <ast/types/PointerType.hpp>
+
+namespace Ast {
+
+
+static void abstractError() {
+	throw new Base::NotImplementedException();
+}
+
+
+Base::FuncPtr Type::s_typeVmt [TYPEVMETHOD_NR_ITEMS][TYPEKIND_NR_ITEMS] =
+{
+		// pointers to create methods, index 0
+		{   /*IntType = 0*/        (Base::FuncPtr) &IntType::create,
+		    /*BoolType = 1*/       (Base::FuncPtr) &BoolType::create,
+		    /*FloatType = 2*/                      &abstractError,
+		    /*EnumeratedType = 3*/ (Base::FuncPtr) &EnumType::create,
+		    /*ListType = 4*/       (Base::FuncPtr) &ListType::create,
+		    /*MapType = 5*/                        &abstractError,
+		    /*QrType = 6*/                         &abstractError,
+		    /*TupleType = 7*/      (Base::FuncPtr) &TupleType::create,
+		    /*FunctionType = 8*/   (Base::FuncPtr) &FunctionType::create,
+		    /*ActionSystemType= 9*/(Base::FuncPtr) &ActionSystemType::create,
+		    /*OpaqueType = 10*/                    &abstractError,
+		    /*Null = 11*/          (Base::FuncPtr) &NullType::create,
+		    /*Any = 12*/                           &abstractError,
+		    /*ValuedEnumeratedType = 13*/(Base::FuncPtr) &ValuedEnumType::create,
+		    /*Pointer = 14*/       (Base::FuncPtr) &PointerType::create
+		},
+		// pointers to copy constructors, index 1
+		{   /*IntType = 0*/        (Base::FuncPtr) &IntType::createCopy,
+		    /*BoolType = 1*/       (Base::FuncPtr) &BoolType::createCopy,
+		    /*FloatType = 2*/                      &abstractError,
+		    /*EnumeratedType = 3*/ (Base::FuncPtr) &EnumType::createCopy,
+		    /*ListType = 4*/       (Base::FuncPtr) &ListType::createCopy,
+		    /*MapType = 5*/                        &abstractError,
+		    /*QrType = 6*/                         &abstractError,
+		    /*TupleType = 7*/      (Base::FuncPtr) &TupleType::createCopy,
+		    /*FunctionType = 8*/   (Base::FuncPtr) &FunctionType::createCopy,
+		    /*ActionSystemType= 9*/(Base::FuncPtr) &ActionSystemType::createCopy,
+		    /*OpaqueType = 10*/                    &abstractError,
+		    /*Null = 11*/          (Base::FuncPtr) &NullType::createCopy,
+		    /*Any = 12*/                           &abstractError,
+		    /*ValuedEnumeratedType = 13*/(Base::FuncPtr) &ValuedEnumType::createCopy,
+		    /*Pointer = 14*/       (Base::FuncPtr) &PointerType::createCopy
+		}
+};
+
+
+void Type::accept(IAstVisitor& ) {
+	throw new Base::NotImplementedException();
+};
+
+std::string Type::toString() const {
+	std::string result ("??");
+	if (m_identifier != nullptr)
+		result = m_identifier->tokenText();
+	return result; // NRVO
+}
+
+Type* Type::createVirtual(TypeKind type) {
+	return (std::uint8_t)type < TYPEKIND_NR_ITEMS ? ((ConstrPtr)s_typeVmt[0][(std::uint8_t)type])() : nullptr;
+}
+
+Type* Type::createVirtual(const Type& toCopy) {
+	std::uint8_t kind ((std::uint8_t)toCopy.kind());
+	return ((CopyConstrPtr)s_typeVmt[1][kind])(toCopy);
+}
+
+
+bool Type::equal(Type* type1, Type* type2)
+{
+	if ((type1 == nullptr) || (type2 == nullptr))
+		return false;
+
+	// if of different kind, then return false..
+	TypeKind tk1 = type1->kind();
+	TypeKind tk2 = type2->kind();
+	if (tk1 != tk2)
+		return false;
+
+	// if same kind, make a rigorous check
+	switch (tk1)
+	{
+		case TypeKind::IntType: {
+			IntType* intt1 = (IntType*)type1;
+			IntType* intt2 = (IntType*)type2;
+			return intt1->rangeLow() == intt2->rangeLow() && intt1->rangeHigh() == intt2->rangeHigh();
+		}
+
+		case TypeKind::BoolType:
+			return true;
+
+//		case TypeKind::FloatType:
+//			FloatType* floatt1 = (FloatType*)type1;
+//			FloatType* floatt2 = (FloatType*)type2;
+//			return floatt1->low() == floatt2->low() &&
+//					floatt1->high() == floatt2->high() &&
+//					floatt1->precision() == floatt2->precision();
+
+		case TypeKind::ValuedEnumeratedType:
+		case TypeKind::EnumeratedType:
+			return type1 == type2; // ref equ
+
+		case TypeKind::ListType: {
+			ListType* listt1 = (ListType*)type1;
+			ListType* listt2 = (ListType*)type2;
+			return equal(listt1->innerType(), listt2->innerType()) &&
+				listt1->maxNumberOfElements() == listt2->maxNumberOfElements(); // need this because of covertype
+		}
+
+//		case TypeKind::MapType:
+//			MapType* mapt1 = (MapType*)type1;
+//			MapType* mapt2 = (MapType*)type2;
+//			return equal(mapt1->fromType(), mapt2->fromType()) &&
+//				equal(mapt1->toType(), mapt2->toType()) &&
+//				mapt1->maxNumberOfElements() == mapt2->maxNumberOfElements(); // need this because of covertype
+
+		case TypeKind::TupleType: {
+			TupleType* tuplet1 = (TupleType*)type1;
+			TupleType* tuplet2 = (TupleType*)type2;
+			if (tuplet1->innerTypes().size() != tuplet2->innerTypes().size())
+				return false;
+			auto innert1 = tuplet1->innerTypes().begin();
+			auto innert2 = tuplet2->innerTypes().begin();
+			while (innert1 != tuplet1->innerTypes().end())
+			{
+				if (!equal(*innert1, *innert2))
+					return false;
+				innert1++;
+				innert2++;
+			}
+			return true;
+		}
+
+		case TypeKind::OoActionSystemType:
+			return type1 == type2;
+
+		case TypeKind::Null:
+		case TypeKind::Any:
+		case TypeKind::Pointer:
+			return true;
+
+		default: {
+			std::cerr << "Unknown type in type comparison. Aborting. " << (int) tk1 << std::endl;
+			abort();
+		}
+	}
+}
+
+}
Index: trunk/compiler/cppAst/ast/Makefile
===================================================================
--- trunk/compiler/cppAst/ast/Makefile	(nonexistent)
+++ trunk/compiler/cppAst/ast/Makefile	(revision 2)
@@ -0,0 +1,68 @@
+
+#
+# AST MODULE
+#
+
+include ../../Makefile.inc
+
+CPPFLAGS  = $(PRJCFLAGS) \
+	-I.. \
+	`pkg-config $(PROTOBUFFLAGS) --cflags $(PROTOBUFCONFIG)`
+
+OBJLIBS = $(BUILDOUTPUTDIR)/libast.a
+
+OBJOUTPUTDIR:=$(OBJOUTPUTDIR)/ast
+
+OBJS    =  \
+	$(OBJOUTPUTDIR)/serialize/gen/FunctionNames.pb.o \
+	$(OBJOUTPUTDIR)/serialize/gen/Record.pb.o \
+	$(OBJOUTPUTDIR)/serialize/ProtoBufAstTraversal.o \
+	$(OBJOUTPUTDIR)/AstFactory.o \
+	$(OBJOUTPUTDIR)/CompleteAstTraversalVisitor.o \
+	$(OBJOUTPUTDIR)/ExpressionVisitor.o \
+	$(OBJOUTPUTDIR)/StatementVisitor.o \
+	$(OBJOUTPUTDIR)/PrintVisitor.o \
+	$(OBJOUTPUTDIR)/Ast.o \
+	$(OBJOUTPUTDIR)/DeepCloneVisitor.o \
+	$(OBJOUTPUTDIR)/expressions/Expression.o \
+	$(OBJOUTPUTDIR)/identifiers/Identifier.o \
+	$(OBJOUTPUTDIR)/statements/Statement.o \
+	$(OBJOUTPUTDIR)/types/Type.o \
+	$(OBJOUTPUTDIR)/types/ActionSystemType.o \
+	$(OBJOUTPUTDIR)/SymbolTable.o
+
+all : subdirs $(OBJLIBS)
+
+$(BUILDOUTPUTDIR)/%.a : $(OBJS)
+	$(ECHO) $(AR) $(ARFLAGS) rv $@ $?
+	$(AR) $(ARFLAGS) rv $@ $?
+	$(ECHO) $(RANLIB) $@
+	$(RANLIB) $@
+
+subdirs:
+	mkdir -p $(OBJOUTPUTDIR)/expressions
+	mkdir -p $(OBJOUTPUTDIR)/identifiers
+	mkdir -p $(OBJOUTPUTDIR)/statements
+	mkdir -p $(OBJOUTPUTDIR)/types
+	mkdir -p $(OBJOUTPUTDIR)/serialize
+	mkdir -p $(OBJOUTPUTDIR)/serialize/gen
+
+clean :
+	$(ECHO) cleaning up in ast
+	-$(RM) -f $(OBJS)
+
+# pull in dependency info for *existing* .o files
+-include $(OBJS:.o=.d)
+
+force_look :
+	true
+
+include ../../Makefile.rules
+
+# Default rule to compile a cc file (generated by protoc)
+$(OBJOUTPUTDIR)/%.o: %.cc $(HEADERS)
+	$(ECHO) "    compiling $@"
+	$(CC)  -fPIC -c -o $@ $< $(CPPFLAGS) 
+	$(CC)  -fPIC -MT $@ -MM $(CPPFLAGS) $< > $(@:.o=.d)
+
+
Index: trunk/compiler/licenses/protobuf/LICENSE
===================================================================
--- trunk/compiler/licenses/protobuf/LICENSE	(nonexistent)
+++ trunk/compiler/licenses/protobuf/LICENSE	(revision 2)
@@ -0,0 +1,44 @@
+This license applies to all parts of Protocol Buffers except the following:
+
+  - Atomicops support for generic gcc, located in
+    src/google/protobuf/stubs/atomicops_internals_generic_gcc.h.
+    This file is copyrighted by Red Hat Inc.
+
+  - Atomicops support for AIX/POWER, located in
+    src/google/protobuf/stubs/atomicops_internals_aix.h.
+    This file is copyrighted by Bloomberg Finance LP.
+
+  - Andorid.mk, which is copyrighted by The Android Open Source Project.
+
+Copyright 2014, Google Inc.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+    * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it.  This code is not
+standalone and requires a support library to be linked with it.  This
+support library is itself covered by the above license.
Index: trunk/compiler/licenses/jna/license.txt
===================================================================
--- trunk/compiler/licenses/jna/license.txt	(nonexistent)
+++ trunk/compiler/licenses/jna/license.txt	(revision 2)
@@ -0,0 +1,25 @@
+JNA is dual-licensed under 2 alternative Open Source/Free 
+licenses: LGPL 2.1 and Apache License 2.0. (starting with
+JNA version 4.0.0). 
+
+What this means is that one can choose either one of these
+licenses (for purposes of re-distributing JNA; usually by
+including it as one of jars another application or
+library uses) by downloading corresponding jar file,
+using it, and living happily everafter. 
+
+You may obtain a copy of the LGPL License at:
+
+http://www.gnu.org/licenses/licenses.html
+
+A copy is also included in the downloadable source code package
+containing JNA, in file "LGPL2.1", under the same directory
+as this file.
+
+You may obtain a copy of the ASL License at:
+
+http://www.apache.org/licenses/
+
+A copy is also included in the downloadable source code package
+containing JNA, in file "ASL2.0", under the same directory
+as this file.
\ No newline at end of file
Index: trunk/compiler/licenses/antlr/Antlrv3.txt
===================================================================
--- trunk/compiler/licenses/antlr/Antlrv3.txt	(nonexistent)
+++ trunk/compiler/licenses/antlr/Antlrv3.txt	(revision 2)
@@ -0,0 +1,10 @@
+[The BSD License]
+Copyright (c) 2010 Terence Parr
+All rights reserved.
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
Index: trunk/compiler/cppAst/ast/PrintVisitor.cpp
===================================================================
--- trunk/compiler/cppAst/ast/PrintVisitor.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/PrintVisitor.cpp	(revision 2)
@@ -0,0 +1,983 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#include "PrintVisitor.hpp"
+#include <ast/identifiers/MainModule.hpp>
+#include <ast/types/IntType.hpp>
+#include <ast/identifiers/EnumIdentifier.hpp>
+#include <ast/types/EnumType.hpp>
+#include <ast/types/ListType.hpp>
+#include <ast/types/TupleType.hpp>
+#include <ast/types/ActionSystemType.hpp>
+#include <ast/identifiers/AttributeIdentifier.hpp>
+#include <ast/expressions/ValueExpression.hpp>
+#include <ast/statements/Assignment.hpp>
+#include <ast/expressions/AccessExpression.hpp>
+#include <ast/expressions/TypeExpression.hpp>
+#include <ast/expressions/BinaryOperator.hpp>
+#include <ast/expressions/UnaryOperator.hpp>
+#include <ast/expressions/CallExpression.hpp>
+#include <ast/expressions/TupleMapAccessExpression.hpp>
+#include <ast/expressions/TupleConstructor.hpp>
+#include <ast/expressions/ListConstructor.hpp>
+#include <ast/statements/NondetBlock.hpp>
+#include <ast/statements/PrioBlock.hpp>
+#include <ast/statements/SeqBlock.hpp>
+#include <ast/statements/Call.hpp>
+#include <ast/statements/GuardedCommand.hpp>
+#include <ast/expressions/IdentifierExpression.hpp>
+#include <ast/identifiers/IdentifierBlock.hpp>
+#include <ast/statements/Skip.hpp>
+#include <ast/expressions/TernaryOperator.hpp>
+#include <ast/identifiers/NamedActionIdentifier.hpp>
+#include <ast/identifiers/MethodIdentifier.hpp>
+#include <ast/types/FunctionType.hpp>
+#include <ast/identifiers/NamedActionIdentifier.hpp>
+#include <ast/expressions/SetConstructor.hpp>
+#include <ast/identifiers/ExpressionVariableIdentifier.hpp>
+#include <ast/expressions/ObjectConstructor.hpp>
+#include <ast/types/NullType.hpp>
+#include <ast/types/PointerType.hpp>
+#include <map>
+#include <base/CdtFixes.hpp>
+#include <cassert>
+
+namespace Ast {
+
+PrintVisitor::PrintVisitor(CallContext* context):
+	CompleteAstTraversalVisitor(context, false),
+	m_writeTypes (true),
+	m_output (),
+	m_currentTypeDef (nullptr)
+{}
+
+PrintVisitor::~PrintVisitor() {
+}
+
+template<typename T>
+void PrintVisitor::printSubElementOrNull(T* anElem)
+{
+	if (anElem == nullptr)
+		m_output.append("<null>");
+	else
+		anElem->accept(*this);
+}
+
+
+/*print the type identifier, or the type definition by calling the anAction delegate.*/
+void PrintVisitor::printType(Type* atype, const std::function<void()>& anAction)
+{
+	//m_context->logTrace(TRACE_EXECUTOR, "Start printing type: " + atype->toString());
+
+	if (   (atype->identifier() != nullptr)
+	    && (!atype->isAnonymousType())
+	    && (m_currentTypeDef != atype->identifier() || !m_writeTypes)) // ref equ.
+	{
+		bool write = m_writeTypes;
+		m_writeTypes = false;
+		atype->identifier()->accept(*this);
+		m_writeTypes = write;
+	}
+	else
+		anAction();
+}
+
+void PrintVisitor::visit(MainModule* mainModule)
+{
+	int i = 0;
+	// write all types
+	m_writeTypes = true;
+	m_output.incIndent();
+	m_output.appendLine("types");
+	for (auto& type: *mainModule->symbolTable())
+	{
+		if (type.second->kind() != IdentifierKind::TypeIdentifier)
+			continue;
+
+		if (i != 0)
+			m_output.appendLine(";");
+		i++;
+		type.second->accept(*this);
+	}
+
+	m_output.decIndent();
+	m_output.appendLine("");
+	m_output.incIndent();
+	m_output.incIndent();
+	m_output.appendLine("system");
+	m_writeTypes = false;
+
+	// write system description block
+	mainModule->systemDescription()->accept(*this);
+
+	if (mainModule->getMainFunction() != nullptr) {
+		m_output.appendLine("# Automatically generated main function:");
+		mainModule->getMainFunction()->accept(*this);
+	}
+}
+
+void PrintVisitor::visit(TypeIdentifier* typeIdentifier)
+{
+	m_output.append(typeIdentifier->tokenText());
+	if (m_writeTypes)
+	{
+		m_currentTypeDef = typeIdentifier;
+		m_output.append(" = ");
+		printSubElementOrNull(typeIdentifier->type());
+	}
+}
+
+void PrintVisitor::visit(BoolType* )
+{
+	m_output.append("bool");
+}
+
+
+//void PrintVisitor::visit(CharType* charType)
+//{
+//	m_output.append("char");
+//}
+
+
+void PrintVisitor::visit(IntType* intType)
+{
+	printType(intType, [&](){
+		m_output.append("int [");
+		m_output.append(intType->rangeLow());
+		m_output.append(" .. ");
+		m_output.append(intType->rangeHigh());
+		m_output.append("]");
+	});
+}
+
+//	@Override
+//	public void visit(final FloatType floatType)
+//	{
+//		PrintType(floatType,  new Action(){
+//			@Override
+//			public void doIt() {
+//				m_output.append("float [");
+//				m_output.append(Double.toString(floatType.low()));
+//				m_output.append(" .. ");
+//				m_output.append(Double.toString(floatType.high()));
+//				m_output.append("] /*");
+//				m_output.append(Double.toString(floatType.precision()));
+//				m_output.append("*/");
+//		}});
+//	}
+
+
+void PrintVisitor::visit(EnumIdentifier* enumIdentifier)
+{
+	m_output.append(enumIdentifier->tokenText());
+	if (enumIdentifier->haveValue())
+		m_output.append(" = " + std::to_string(enumIdentifier->value()));
+}
+
+template <typename T>
+void PrintVisitor::printEnumeration(const T& arg)
+{
+	int i = 0;
+	for (auto& sym: arg)
+	{
+		if (i != 0)
+			m_output.append(", ");
+		i++;
+		printSubElementOrNull(sym);
+	}
+}
+
+void PrintVisitor::visit(EnumType* enumType)
+{
+	printType(enumType, [&]() {
+		m_output.append("{");
+		printEnumeration(enumType->listOfEnumSymbols());
+		m_output.append("}");
+	});
+}
+
+
+void PrintVisitor::visit(ListType* listType)
+{
+	printType(listType, [&](){
+		m_output.append("list [");
+		m_output.append(listType->maxNumberOfElements());
+		m_output.append("] of ");
+		bool oldwrite = m_writeTypes;
+		m_writeTypes = false;
+		printSubElementOrNull(listType->innerType());
+		m_writeTypes = oldwrite;
+	});
+}
+
+//void PrintVisitor::visit(MapType* mapType)
+//{
+//	printType(mapType, [this, mapType](){
+//		m_output.append("map [");
+//		m_output.append(mapType->maxNumberOfElements());
+//		m_output.append("] ");
+//		printSubElementOrNull(mapType->fromType());
+//		m_output.append(" to ");
+//		printSubElementOrNull(mapType->toType());
+//	});
+//}
+
+void PrintVisitor::visit(TupleType* tupleType)
+{
+	printType(tupleType, [&](){
+		m_output.append("(");
+		bool oldwrite = m_writeTypes;
+		m_writeTypes = false;
+		printEnumeration(tupleType->innerTypes());
+		m_writeTypes = oldwrite;
+		m_output.append(")");
+	});
+}
+
+void PrintVisitor::visit(ActionSystemType* ooActionSystemType)
+{
+	printType(ooActionSystemType, [&](){
+		if (ooActionSystemType->autoConstruction())
+			m_output.append("autocons ");
+
+		m_output.append("system ");
+		if (ooActionSystemType->baseType() != nullptr)
+			m_output.append(boost::format("(%s)") % ooActionSystemType->baseType()->identifier()->tokenText());
+		m_output.appendLine("");
+
+		m_output.incIndent();
+		m_output.appendLine("|[");
+
+		// get a list of interesting symbols
+		std::deque<AttributeIdentifier*> attrs;
+		std::deque<MethodIdentifier*> methods;
+		std::deque<NamedActionIdentifier*> namedActions;
+
+		for(auto& sym: *ooActionSystemType->symbols())
+		{
+			switch(sym.second->kind()) {
+			case IdentifierKind::AttributeIdentifier:
+				attrs.push_back((AttributeIdentifier*)sym.second);
+				break;
+			case IdentifierKind::MethodIdentifier:
+				methods.push_back((MethodIdentifier*)sym.second);
+				break;
+			case IdentifierKind::NamedActionIdentifier:
+				namedActions.push_back((NamedActionIdentifier*)sym.second);
+				break;
+			default:
+				// do nothing.
+				break;
+			}
+		}
+
+		int i = 0;
+		if (attrs.size() > 0)
+		{
+			// variables
+			m_output.incIndent();
+			m_output.appendLine("var");
+			for (AttributeIdentifier* attr : attrs)
+			{
+				if (i != 0)
+					m_output.appendLine(";");
+				i++;
+				printSubElementOrNull(attr);
+			}
+			m_output.decIndent();
+			m_output.appendLine("");
+		}
+		bool writeTypesSave = m_writeTypes;
+		m_writeTypes = false;
+
+		i = 0;
+		if (methods.size() > 0)
+		{
+			m_output.incIndent();
+			m_output.appendLine("methods");
+			for (MethodIdentifier* method : methods)
+			{
+				if (i != 0)
+					m_output.appendLine(";");
+				i++;
+				printSubElementOrNull(method);
+			}
+			m_output.decIndent();
+			m_output.appendLine("");
+		}
+
+		i = 0;
+		if (namedActions.size() > 0)
+		{
+			m_output.incIndent();
+			m_output.appendLine("actions");
+			for (NamedActionIdentifier* action: namedActions)
+			{
+				if (i != 0)
+					m_output.appendLine(";");
+				i++;
+				printSubElementOrNull(action);
+			}
+			m_output.decIndent();
+			m_output.appendLine("");
+		}
+
+		if ((ooActionSystemType->doodBlock() != nullptr) &&
+		    (ooActionSystemType->doodBlock()->statements().size() > 0))
+		{
+			m_output.incIndent();
+			m_output.appendLine("do");
+			printSubElementOrNull(ooActionSystemType->doodBlock());
+			m_output.decIndent();
+			m_output.appendLine("");
+			m_output.appendLine("od");
+		}
+		m_output.decIndent();
+		m_output.appendLine("");
+		m_output.append("]|");
+		m_writeTypes = writeTypesSave;
+	});
+}
+
+void PrintVisitor::visit(NullType* )
+{
+	m_output.append("nil");
+}
+
+void PrintVisitor::visit(PointerType* )
+{
+	m_output.append("<somePointer>");
+}
+
+
+void PrintVisitor::visit(AttributeIdentifier* attributeIdentifier)
+{
+	if (attributeIdentifier->isStatic())
+		m_output.append("static ");
+	if (attributeIdentifier->isObservable())
+		m_output.append("obs ");
+	if (attributeIdentifier->isControllable())
+		m_output.append("ctr ");
+
+	m_output.append(attributeIdentifier->tokenText());
+	if (m_writeTypes)
+	{
+		m_output.append(": ");
+		assert(m_writeTypes == true); // if guards this
+		m_writeTypes = false;
+		printSubElementOrNull(attributeIdentifier->type());
+		m_writeTypes = true;
+		m_output.append(" = ");
+		printSubElementOrNull(attributeIdentifier->initializer());
+	}
+}
+
+void PrintVisitor::visit(BoolValueExpression* valueExpression){
+	m_output.append(std::to_string(valueExpression->value()));
+}
+
+void PrintVisitor::visit(IntValueExpression* valueExpression){
+	m_output.append(std::to_string(valueExpression->value()));
+}
+
+void PrintVisitor::visit(RefValueExpression* valueExpression){
+	if (valueExpression->value() != nullptr)
+		m_output.append((std::int64_t)valueExpression->value());
+	else
+		m_output.append("nil");
+}
+
+//void PrintVisitor::visit(AbortStatement* abortStatement)
+//{
+//	m_output.append("abort");
+//}
+
+void PrintVisitor::visit(Assignment* assignment)
+{
+	printEnumeration(assignment->places());
+	m_output.append(" := ");
+	printEnumeration(assignment->values());
+	if (assignment->nondetExpression() != nullptr)
+	{
+		m_output.incIndent();
+		m_output.appendLine("");
+		m_output.append("with ");
+		assignment->nondetExpression()->accept(*this);
+
+		if (assignment->symbols()->size() > 0)
+		{
+			m_output.append(" /* vars: ");
+			for (auto& localVar: *assignment->symbols())
+			{
+				localVar.second->accept(*this);
+				m_output.append(" ");
+			}
+			m_output.append("*/");
+		}
+		m_output.decIndent();
+		m_output.appendLine("");
+	}
+}
+
+//void PrintVisitor::visit(KillStatement* killStatement)
+//{
+//	m_output.append("kill (");
+//	printSubElementOrNull(killStatement->someOne);
+//	m_output.append(")");
+//}
+
+void PrintVisitor::visit(AccessExpression* accessExpression)
+{
+	if (accessExpression->right() != nullptr)
+	{
+		m_output.append("(");
+		printSubElementOrNull(accessExpression->left());
+		m_output.append(").");
+		printSubElementOrNull(accessExpression->right());
+	} else {
+		m_output.append("(");
+		printSubElementOrNull(accessExpression->left());
+		m_output.append(")");
+	}
+}
+
+static std::map<ExpressionKind, const char*> opMap = {
+	{ ExpressionKind::conditional, "ternIf" },
+	{ ExpressionKind::domresby, "domresby"},
+	{ ExpressionKind::domresto, "domresto"},
+	{ ExpressionKind::rngresby, "rngresby"},
+	{ ExpressionKind::rngresto, "rngresto"},
+	{ ExpressionKind::munion, "munion"},
+	{ ExpressionKind::conc, "conc"},
+	{ ExpressionKind::diff, "diff"},
+	{ ExpressionKind::inter, "inter"},
+	{ ExpressionKind::elemin, "elemin"},
+	{ ExpressionKind::notelemin, "notelemin"},
+	{ ExpressionKind::subset, "subset"},
+	{ ExpressionKind::_union, "union"},
+	{ ExpressionKind::div, "div"},
+	{ ExpressionKind::greater, ">"},
+	{ ExpressionKind::greaterequal, ">="},
+	{ ExpressionKind::idiv, "idiv"},
+	{ ExpressionKind::less, "<"},
+	{ ExpressionKind::lessequal, "<="},
+	{ ExpressionKind::minus, "-"},
+	{ ExpressionKind::mod, "mod"},
+	{ ExpressionKind::pow, "pow"},
+	{ ExpressionKind::prod, "*"},
+	{ ExpressionKind::sum, "+"},
+	{ ExpressionKind::_and, "and"},
+	{ ExpressionKind::biimplies, "<=>"},
+	{ ExpressionKind::implies, "=>"},
+	{ ExpressionKind::_or, "or"},
+	{ ExpressionKind::equal, "="},
+	{ ExpressionKind::notequal, "<>"},
+	{ ExpressionKind::seqmod_mapoverride, "seqmod_mapoverride"},
+	{ ExpressionKind::dom, "dom"},
+	{ ExpressionKind::range, "range"},
+	{ ExpressionKind::merge, "merge"},
+	{ ExpressionKind::card, "card"},
+	{ ExpressionKind::dconc, "dconc"},
+	{ ExpressionKind::dinter, "dinter"},
+	{ ExpressionKind::dunion, "dunion"},
+	{ ExpressionKind::elems, "elems"},
+	{ ExpressionKind::head, "head"},
+	{ ExpressionKind::inds, "inds"},
+	{ ExpressionKind::len, "len"},
+	{ ExpressionKind::tail, "tail"},
+	{ ExpressionKind::unminus, "-"},
+	{ ExpressionKind::unplus, "+"},
+	{ ExpressionKind::_not, "not"},
+	{ ExpressionKind::abs, "abs"},
+	{ ExpressionKind::forall, "forall"},
+	{ ExpressionKind::exists, "exists"},
+	{ ExpressionKind::ListConstr, "listconstr"},
+	{ ExpressionKind::SetConstr, "setconstr"},
+	{ ExpressionKind::MapConstr, "mapconstr"},
+	{ ExpressionKind::TupleConstr, "tupleconstr"},
+	{ ExpressionKind::ObjectConstr, "objectconstr"},
+	{ ExpressionKind::QValConstr, "qvalconstr"},
+	{ ExpressionKind::Identifier, "identifier"},
+	{ ExpressionKind::UnresolvedIdentifier, "unresId"},
+	{ ExpressionKind::Type, "type"},
+	{ ExpressionKind::TupleMapAccess, "tuplemapaccess"},
+	{ ExpressionKind::Call, "call"},
+	{ ExpressionKind::Access, "."},
+	{ ExpressionKind::Primed, "'"},
+	{ ExpressionKind::Cast, "cast"},
+	{ ExpressionKind::foldLR, "foldLR"},
+	{ ExpressionKind::foldRL, "foldRL"},
+	{ ExpressionKind::Value_Integer, "value_int"},
+	{ ExpressionKind::Value_Bool, "value_bool"},
+	{ ExpressionKind::Value_Reference, "value_ref"}
+};
+
+
+void PrintVisitor::printOperator(Expression* expression)
+{
+	ExpressionKind kind = expression->kind();
+	if (kind == ::Ast::ExpressionKind::Cast) {
+		m_output.append("(");
+		if (expression->type() != nullptr)
+			m_output.append(expression->type()->toString());
+		else
+			m_output.append("Cast??");
+		m_output.append(")");
+	} else if (opMap.count(kind) > 0) {
+		m_output.append(opMap[kind]);
+	} else {
+		m_context->logError("Internal error. Unknown operation: " + std::to_string((std::uint64_t)expression->kind()));
+		abort();
+	}
+}
+
+void PrintVisitor::visit(TypeExpression* typeExpression)
+{
+	printSubElementOrNull(typeExpression->type());
+}
+
+void PrintVisitor::visit(BinaryOperator* binaryOperator)
+{
+	m_output.incIndent();
+	m_output.appendLine("(");
+	printSubElementOrNull(binaryOperator->left());
+	m_output.decIndent();
+	m_output.appendLine("");
+	m_output.appendLine(")");
+
+	printOperator(binaryOperator);
+	m_output.appendLine("");
+
+	m_output.incIndent();
+	m_output.appendLine("(");
+	printSubElementOrNull(binaryOperator->right());
+	m_output.decIndent();
+	m_output.appendLine("");
+	m_output.appendLine(")");
+}
+
+void PrintVisitor::visit(UnaryOperator* unaryOperator)
+{
+	printOperator(unaryOperator);
+	m_output.append("(");
+	printSubElementOrNull(unaryOperator->child());
+	m_output.append(")");
+}
+
+void PrintVisitor::visit(CallExpression* callExpression)
+{
+	if (callExpression->child() != nullptr)
+		callExpression->child()->accept(*this);
+	if (callExpression->arguments().size() > 0)
+	{
+		m_output.append("(");
+		printEnumeration(callExpression->arguments());
+		m_output.append(")");
+	} else {
+		m_output.append("()");
+	}
+}
+
+void PrintVisitor::visit(TupleMapAccessExpression* tupleMapAccessExpression)
+{
+	if (tupleMapAccessExpression->child() != nullptr)
+		tupleMapAccessExpression->child()->accept(*this);
+	m_output.append("[");
+	printSubElementOrNull(tupleMapAccessExpression->argument());
+	m_output.append("]");
+}
+
+void PrintVisitor::visit(TupleConstructor* tupleConstructor)
+{
+	m_output.append(tupleConstructor->tupleType()->tokenText());
+	m_output.append("(");
+	printEnumeration(tupleConstructor->values());
+	m_output.append(")");
+}
+
+void PrintVisitor::visit(ListConstructor* listConstructor)
+{
+	m_output.append("[");
+	printEnumeration(listConstructor->elements());
+	if (listConstructor->hasComprehension())
+	{
+		m_output.append("| var ");
+		int i = 0;
+		for (auto& element: *listConstructor->comprehensionVariables())
+		{
+			if (i != 0)
+				m_output.append("; ");
+			i++;
+			printSubElementOrNull(element.second);
+		}
+		m_output.appendLine(" &");
+		printSubElementOrNull(listConstructor->comprehension());
+	}
+	m_output.append("]");
+}
+
+void PrintVisitor::visit(NondetBlock* nondetBlock)
+{
+	int i = 0;
+	if (m_makeParens)
+	{
+		m_output.incIndent();
+		m_output.appendLine("(");
+	}
+	for (auto& smt: nondetBlock->statements())
+	{
+		if (i != 0)
+		{
+			m_output.decIndent();
+			m_output.appendLine("");
+			m_output.incIndent();
+			m_output.appendLine("[] ");
+		}
+		i++;
+		smt->accept(*this);
+	}
+	if (m_makeParens)
+	{
+		m_output.decIndent();
+		m_output.appendLine("");
+		m_output.appendLine(")");
+	}
+}
+
+void PrintVisitor::visit(PrioBlock* prioBlock)
+{
+	int i = 0;
+	if (m_makeParens)
+	{
+		m_output.incIndent();
+		m_output.appendLine("(");
+	}
+	for (auto& smt: prioBlock->statements())
+	{
+		if (i != 0)
+		{
+			m_output.decIndent();
+			m_output.appendLine("");
+			m_output.incIndent();
+			m_output.appendLine("// ");
+		}
+		i++;
+		smt->accept(*this);
+	}
+	if (m_makeParens)
+	{
+		m_output.decIndent();
+		m_output.appendLine("");
+		m_output.appendLine(")");
+	}
+}
+
+void PrintVisitor::visit(SeqBlock* seqBlock)
+{
+	int i = 0;
+	bool old_makeparens = m_makeParens;
+	m_output.incIndent();
+	m_output.appendLine("(");
+	if (seqBlock->symbols() != nullptr && seqBlock->symbols()->size() > 0)
+	{
+		m_output.append("var ");
+		for (auto& id: *seqBlock->symbols())
+		{
+			m_output.append(id.second->tokenText());
+			m_output.append(": ");
+			printSubElementOrNull(id.second);
+		}
+		m_output.append(": ");
+	}
+	for (auto& smt: seqBlock->statements())
+	{
+		if (smt == nullptr)
+				continue;
+		if (i != 0)
+		{
+			m_output.decIndent();
+			m_output.appendLine("");
+			m_output.incIndent();
+			m_output.appendLine("; ");
+		}
+		i++;
+		m_makeParens = true;
+		smt->accept(*this);
+		m_makeParens = old_makeparens;
+	}
+	m_output.decIndent();
+	m_output.appendLine("");
+	m_output.appendLine(")");
+}
+
+void PrintVisitor::visit(Call* call)
+{
+	call->callExpression()->accept(*this);
+}
+
+void PrintVisitor::visit(GuardedCommand* guardedCommand)
+{
+	m_output.append("requires ");
+	printSubElementOrNull(guardedCommand->guard());
+	m_output.incIndent();
+	m_output.appendLine(" :");
+
+	if (guardedCommand->body() != nullptr)
+		guardedCommand->body()->accept(*this);
+
+	m_output.decIndent();
+	m_output.appendLine("");
+	m_output.appendLine("end");
+}
+
+void PrintVisitor::visit(IdentifierExpression* identifierExpression)
+{
+	m_output.append(identifierExpression->identifier()->tokenText());
+}
+
+void PrintVisitor::visit(NondetIdentifierBlock* nondetIdentifierList)
+{
+	int i = 0;
+	for (auto& smt: nondetIdentifierList->identifiers())
+	{
+		if (i != 0)
+		{
+			m_output.decIndent();
+			m_output.appendLine("");
+			m_output.incIndent();
+			m_output.appendLine("[] ");
+		}
+		i++;
+		smt->accept(*this);
+	}
+}
+
+void PrintVisitor::visit(PrioIdentifierBlock* prioIdentifierList)
+{
+	int i = 0;
+	for (auto& smt: prioIdentifierList->identifiers())
+	{
+		if (i != 0)
+		{
+			m_output.decIndent();
+			m_output.appendLine("");
+			m_output.incIndent();
+			m_output.appendLine("//");
+		}
+		i++;
+		smt->accept(*this);
+	}
+}
+
+void PrintVisitor::visit(SeqIdentifierBlock* seqIdentifierList)
+{
+	int i = 0;
+	m_output.incIndent();
+	m_output.appendLine("(");
+	for (auto& smt: seqIdentifierList->identifiers())
+	{
+		if (i != 0)
+			m_output.appendLine("; ");
+		i++;
+		smt->accept(*this);
+	}
+	m_output.decIndent();
+	m_output.appendLine("");
+	m_output.appendLine(")");
+}
+
+void PrintVisitor::visit(Skip* )
+{
+	m_output.append("skip");
+}
+
+void PrintVisitor::visit(TernaryOperator* ternaryOperator)
+{
+	switch(ternaryOperator->kind()) {
+	case ExpressionKind::conditional:
+		m_output.append("if");
+		printSubElementOrNull(ternaryOperator->left());
+		m_output.incIndent();
+		m_output.appendLine("then");
+		printSubElementOrNull(ternaryOperator->mid());
+		m_output.decIndent();
+		m_output.appendLine("");
+		m_output.incIndent();
+		m_output.appendLine("else");
+		printSubElementOrNull(ternaryOperator->right());
+		m_output.decIndent();
+		m_output.appendLine("");
+		m_output.append("end");
+		break;
+	case ExpressionKind::foldLR:
+	case ExpressionKind::foldRL:
+		printSubElementOrNull(ternaryOperator->left());
+		if (ternaryOperator->mid() != nullptr)
+		{
+			m_output.append(" :: (");
+			printSubElementOrNull(ternaryOperator->mid());
+			m_output.append(")");
+		}
+		if (ternaryOperator->kind() == ExpressionKind::foldLR)
+			m_output.append(" :>: (");
+		else
+			m_output.append(" :<: (");
+		printSubElementOrNull(ternaryOperator->right());
+		m_output.append(")");
+		break;
+	default:
+		m_context->logError("Internal error. Unknown ternary operator.");
+		abort();
+		break;
+	}
+}
+
+void PrintVisitor::visit(MethodIdentifier* methodIdentifier)
+{
+	bool* safe = ((FunctionType*)methodIdentifier->type())->isMiracleSafe();
+	if ( safe == nullptr || *safe == false)
+		m_output.append("/*BASIC*/ ");
+
+
+	FunctionType* atype = (FunctionType*)methodIdentifier->type();
+
+	m_output.append(methodIdentifier->tokenText());
+	m_output.append("(");
+	int j = 0;
+	for (auto& x: methodIdentifier->parameter())
+	{
+		if (j != 0)
+			m_output.append(", ");
+		else
+			j++;
+		m_output.append(x->tokenText());
+		m_output.append(": ");
+		printSubElementOrNull(x->type());
+	}
+	m_output.append(")");
+	if (atype->returnType() != nullptr)
+	{
+		m_output.append(": ");
+		printSubElementOrNull(atype->returnType());
+	}
+	m_output.appendLine("");
+
+	m_output.incIndent();
+	m_output.appendLine("var");
+	int i = 0;
+	for (auto& sym: *methodIdentifier->symbolTable())
+	{
+		if (i != 0)
+			m_output.appendLine(";");
+		i++;
+		m_output.append(sym.second->tokenText());
+		m_output.append(": ");
+		printSubElementOrNull(sym.second->type());
+	}
+	m_output.decIndent();
+	m_output.appendLine("");
+
+	printSubElementOrNull(methodIdentifier->body());
+	m_output.append("end");
+}
+
+void PrintVisitor::visit(NamedActionIdentifier* namedActionIdentifier)
+{
+	bool* safe = ((FunctionType*)namedActionIdentifier->type())->isMiracleSafe();
+	if ( safe == nullptr || *safe == false)
+		m_output.append("/*BASIC*/ ");
+
+	m_output.append(namedActionIdentifier->tokenText());
+	m_output.append("(");
+	FunctionType* atype = (FunctionType*)namedActionIdentifier->type();
+	printEnumeration(atype->parameter());
+	m_output.append(")");
+	m_output.appendLine("");
+
+	m_output.incIndent();
+	m_output.appendLine("var");
+	int i = 0;
+	for (auto& sym: *namedActionIdentifier->symbolTable())
+	{
+		if (i != 0)
+			m_output.appendLine(";");
+		i++;
+		m_output.append(sym.second->tokenText());
+		m_output.append(": ");
+		printSubElementOrNull(sym.second->type());
+	}
+	m_output.decIndent();
+	m_output.appendLine("");
+
+	printSubElementOrNull(namedActionIdentifier->body());
+	m_output.append("end");
+}
+
+void PrintVisitor::visit(SetConstructor* setConstructor)
+{
+	m_output.append("[");
+	printEnumeration(setConstructor->items());
+	if (setConstructor->hasComprehension())
+	{
+		m_output.append("| var ");
+		int i = 0;
+		for(auto& elem: *setConstructor->comprehensionVariables())
+		{
+			if (i != 0)
+				m_output.append("; ");
+			i++;
+			printSubElementOrNull(elem.second);
+		}
+		m_output.appendLine(" &");
+		printSubElementOrNull(setConstructor->comprehension());
+	}
+	m_output.append("]");
+}
+
+void PrintVisitor::visit(ExpressionVariableIdentifier* expressionVariableIdentifier)
+{
+	m_output.append(expressionVariableIdentifier->tokenText());
+	m_output.append(": ");
+	printSubElementOrNull(expressionVariableIdentifier->type());
+}
+
+void PrintVisitor::visit(ObjectConstructor* objectConstructor)
+{
+	m_output.append("new (");
+	printSubElementOrNull(objectConstructor->type());
+	m_output.append(")");
+
+	m_output.append(" //");
+	for (auto& i: objectConstructor->instances()) {
+		m_output.append(" (");
+		m_output.append(i->getName());
+		m_output.append(" parent: ");
+		m_output.append(i->getParentObject()->getName());
+		m_output.append(") ");
+	}
+}
+
+
+} /* namespace Ast */
Index: trunk/compiler/ooasCompiler/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/compiler/ooasCompiler/.settings/org.eclipse.jdt.core.prefs	(nonexistent)
+++ trunk/compiler/ooasCompiler/.settings/org.eclipse.jdt.core.prefs	(revision 2)
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
Index: trunk/compiler/licenses/jna/LICENSE.ASL
===================================================================
--- trunk/compiler/licenses/jna/LICENSE.ASL	(nonexistent)
+++ trunk/compiler/licenses/jna/LICENSE.ASL	(revision 2)
@@ -0,0 +1,12 @@
+This copy of JNA is licensed under the
+Apache (Software) License, version 2.0 ("the License").
+See the License for details about distribution rights, and the
+specific rights regarding derivate works.
+
+You may obtain a copy of the License at:
+
+http://www.apache.org/licenses/
+
+A copy is also included in the downloadable source code package
+containing JNA, in file "ASL2.0", under the same directory
+as this file.
\ No newline at end of file
Index: trunk/compiler/cppAst/ast/PrintVisitor.hpp
===================================================================
--- trunk/compiler/cppAst/ast/PrintVisitor.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/PrintVisitor.hpp	(revision 2)
@@ -0,0 +1,106 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/CompleteAstTraversalVisitor.hpp>
+#include <ast/identifiers/Identifier.hpp>
+#include <ast/TextEmitter.hpp>
+#include <ast/identifiers/IdentifierBlock.hpp>
+#include <ast/statements/Skip.hpp>
+
+namespace Ast {
+
+class PrintVisitor final:
+	public CompleteAstTraversalVisitor
+{
+protected:
+	bool m_makeParens = true;
+	bool m_writeTypes;
+	Identifier* m_currentTypeDef;
+	TextEmitter m_output;
+
+	template<typename T> void printSubElementOrNull(T* anElem);
+	template <typename T> void printEnumeration(const T& iarg);
+	void printOperator(Expression* expression);
+	void printType(Type* atype, const std::function<void()>& anAction);
+
+public:
+	PrintVisitor(CallContext* context);
+	virtual ~PrintVisitor();
+
+	void visit(MainModule* mainModule) override;
+	void visit(TypeIdentifier* typeIdentifier) override;
+	void visit(BoolType* boolType) override;
+	void visit(IntType* intType) override;
+	void visit(EnumIdentifier* enumIdentifier) override;
+	void visit(EnumType* enumType) override;
+	void visit(ListType* listType) override;
+	void visit(TupleType* tupleType) override;
+	void visit(ActionSystemType* actionSystemType) override;
+	void visit(NullType* nullType) override;
+	void visit(AttributeIdentifier* attributeIdentifier) override;
+	void visit(BoolValueExpression* valueExpression) override;
+	void visit(IntValueExpression* valueExpression) override;
+	void visit(RefValueExpression* valueExpression) override;
+//	void visit(AbortStatement* abortStatement) override;
+	void visit(Assignment* assignment) override;
+	void visit(AccessExpression* accessExpression) override;
+	void visit(TypeExpression* typeExpression) override;
+	void visit(BinaryOperator* binaryOperator) override;
+	void visit(UnaryOperator* unaryOperator) override;
+	void visit(CallExpression* callExpression) override;
+	void visit(TupleMapAccessExpression* tupleMapAccessExpression) override;
+	void visit(TupleConstructor* tupleConstructor) override;
+	void visit(ListConstructor* listConstructor) override;
+	void visit(NondetBlock* nondetBlock) override;
+	void visit(PrioBlock* prioBlock) override;
+	void visit(SeqBlock* seqBlock) override;
+	void visit(Call* call) override;
+	void visit(GuardedCommand* guardedCommand) override;
+	void visit(IdentifierExpression* identifierExpression) override;
+	void visit(NondetIdentifierBlock* nondetIdentifierList) override;
+	void visit(PrioIdentifierBlock* prioIdentifierList) override;
+	void visit(SeqIdentifierBlock* seqIdentifierList) override;
+	void visit(Skip* skipStatement) override;
+	void visit(TernaryOperator* ternaryOperator) override;
+	void visit(MethodIdentifier* methodIdentifier) override;
+	void visit(NamedActionIdentifier* namedActionIdentifier) override;
+	void visit(SetConstructor* setConstructor) override;
+	void visit(ExpressionVariableIdentifier* expressionVariableIdentifier) override;
+	void visit(ObjectConstructor* objectConstructor) override;
+	void visit(PointerType* pointerType) override;
+
+	std::string returnVisitorName() {
+		return std::string("Print OOAS");
+	}
+
+	std::string toString()
+	{
+		return m_output.toString();
+	}
+};
+
+} /* namespace Ast */
Index: trunk/compiler/ooasCompiler/antlrworks-1.4.3.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/compiler/ooasCompiler/antlrworks-1.4.3.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/compiler/ooasCompiler/libraries/jna-4.0.0.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/compiler/ooasCompiler/libraries/jna-4.0.0.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/compiler/cppAst/ast/StatementVisitor.cpp
===================================================================
--- trunk/compiler/cppAst/ast/StatementVisitor.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/StatementVisitor.cpp	(revision 2)
@@ -0,0 +1,148 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+/*
+ * StatementVisitor.cpp
+ *
+ *  Created on: Feb 4, 2014
+ *      Author: willibald
+ */
+
+#include "StatementVisitor.hpp"
+#include <ast/statements/GuardedCommand.hpp>
+#include <ast/statements/SeqBlock.hpp>
+#include <ast/statements/NondetBlock.hpp>
+#include <ast/statements/PrioBlock.hpp>
+
+
+namespace Ast {
+
+
+StatementVisitor::StatementVisitor(CallContext* context):
+		m_context(context)
+{}
+
+StatementVisitor::~StatementVisitor()
+{}
+
+
+void StatementVisitor::visitSub(AstElement* subElement, AstElement* parent) {
+	if (subElement == nullptr)
+		return;
+	visitAstElement(subElement, parent);
+}
+
+void StatementVisitor::visitAstElement(AstElement* element, AstElement* ){
+	switch (element->nodeType()) {
+	case AstNodeTypeEnum::expression:
+	case AstNodeTypeEnum::identifier:
+	case AstNodeTypeEnum::type:
+		error();
+		break;
+	case AstNodeTypeEnum::statement:
+		static_cast<Statement*>(element)->accept(*this);
+		break;
+	default:
+		m_context->logError("Internal error. Unknown AST type.");
+		abort();
+	}
+}
+
+void StatementVisitor::error() {
+	m_context -> logError("Internal error. This visitor only supports statements.");
+	abort();
+}
+
+//Identifiers
+void StatementVisitor::visit(TypeIdentifier* ) { error(); };
+void StatementVisitor::visit(EnumIdentifier* ) { error(); };
+//void StatementVisitor::visit(ValuedEnumIdentifier* enumIdentifier) { error(); };
+void StatementVisitor::visit(AttributeIdentifier* ) { error(); };
+void StatementVisitor::visit(LocalVariableIdentifier* ) { error(); };
+void StatementVisitor::visit(ParameterIdentifier* ) { error(); };
+void StatementVisitor::visit(ExpressionVariableIdentifier* ) { error(); };
+void StatementVisitor::visit(MethodIdentifier* ) { error(); };
+void StatementVisitor::visit(NamedActionIdentifier* ) { error(); };
+void StatementVisitor::visit(Module* ) { error(); };
+void StatementVisitor::visit(ConstantIdentifier* ) { error(); };
+void StatementVisitor::visit(UnspecIdentifierBlock* ) { error(); };
+void StatementVisitor::visit(SeqIdentifierBlock* ) { error(); };
+void StatementVisitor::visit(NondetIdentifierBlock* ) { error(); };
+void StatementVisitor::visit(PrioIdentifierBlock* ) { error(); };
+void StatementVisitor::visit(MainModule* ) { error(); };
+
+//Types
+void StatementVisitor::visit(IntType* ) { error(); };
+void StatementVisitor::visit(BoolType* ) { error(); };
+void StatementVisitor::visit(EnumType* ) { error(); };
+void StatementVisitor::visit(ListType* ) { error(); };
+void StatementVisitor::visit(TupleType* ) { error(); };
+void StatementVisitor::visit(NullType* ) { error(); };
+void StatementVisitor::visit(PointerType* ) { error(); };
+void StatementVisitor::visit(FunctionType* ) { error(); };
+void StatementVisitor::visit(ActionSystemType* ) { error(); };
+
+// Statements
+void StatementVisitor::visit(GuardedCommand* guardedCommand) {
+	visitSub(guardedCommand->body(), guardedCommand);
+};
+
+void StatementVisitor::visit(Call* ) { };
+void StatementVisitor::visit(Assignment* ) { };
+void StatementVisitor::visit(SeqBlock* seqBlock) {
+	for (auto& s: seqBlock->statements())
+		visitSub(s, seqBlock);
+};
+void StatementVisitor::visit(NondetBlock* nondetBlock) {
+	for (auto& s: nondetBlock->statements())
+		visitSub(s, nondetBlock);
+};
+void StatementVisitor::visit(PrioBlock* prioBlock) {
+	for (auto& s: prioBlock->statements())
+		visitSub(s, prioBlock);
+};
+void StatementVisitor::visit(Skip* ) { };
+void StatementVisitor::visit(Break* ) { };
+void StatementVisitor::visit(Abort* ) { };
+
+// Expressions
+void StatementVisitor::visit(TernaryOperator* ) { error(); };
+void StatementVisitor::visit(BinaryOperator* ) { error(); };
+void StatementVisitor::visit(UnaryOperator* ) { error(); };
+void StatementVisitor::visit(ExistsQuantifier* ) { error(); };
+void StatementVisitor::visit(ForallQuantifier* ) { error(); };
+void StatementVisitor::visit(ListConstructor* ) { error(); };
+void StatementVisitor::visit(SetConstructor* ) { error(); };
+void StatementVisitor::visit(TupleConstructor* ) { error(); };
+void StatementVisitor::visit(ObjectConstructor* ) { error(); };
+void StatementVisitor::visit(BoolValueExpression* ) { error(); };
+void StatementVisitor::visit(IntValueExpression* ) { error(); };
+void StatementVisitor::visit(RefValueExpression* ) { error(); };
+void StatementVisitor::visit(IdentifierExpression* ) { error(); };
+void StatementVisitor::visit(TypeExpression* ) { error(); };
+void StatementVisitor::visit(TupleMapAccessExpression* ) { error(); };
+void StatementVisitor::visit(CallExpression* ) { error(); };
+void StatementVisitor::visit(AccessExpression* ) { error(); };
+
+} /* namespace Ast */
Index: trunk/compiler/cppAst/ast/StatementVisitor.hpp
===================================================================
--- trunk/compiler/cppAst/ast/StatementVisitor.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/StatementVisitor.hpp	(revision 2)
@@ -0,0 +1,113 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#pragma once
+
+#include <CallContext.hpp>
+#include <ast/IAstVisitor.hpp>
+#include <base/TiresiasObject.hpp>
+#include <ast/types/Type.hpp>
+#include <ast/identifiers/Identifier.hpp>
+#include <ast/expressions/Expression.hpp>
+#include <ast/statements/Statement.hpp>
+#include <unordered_map>
+
+
+namespace Ast {
+
+/**
+ * Walks a Statement-Tree, ignores all the other AST elements.
+ */
+class StatementVisitor:
+		public Base::TiresiasObject,
+		public IAstVisitor {
+protected:
+	CallContext* m_context;
+
+	void visitSub(AstElement* subElement, AstElement* parent);
+	void visitAstElement(AstElement* element, AstElement* parent);
+	void error();
+public:
+	StatementVisitor(CallContext* context);
+	~StatementVisitor() override;
+
+	void visit(TypeIdentifier* typeIdentifier) override;
+	void visit(EnumIdentifier* enumIdentifier) override;
+//	void visit(ValuedEnumIdentifier* enumIdentifier) override;
+	void visit(AttributeIdentifier* attributeIdentifier) override;
+	void visit(LocalVariableIdentifier* localVariableIdentifier) override;
+	void visit(ParameterIdentifier* parameterIdentifier) override;
+	void visit(ExpressionVariableIdentifier* expressionVariableIdentifier) override;
+	void visit(MethodIdentifier* methodIdentifier) override;
+	void visit(NamedActionIdentifier* namedActionIdentifier) override;
+	void visit(Module* module) override;
+	void visit(ConstantIdentifier* constantIdentifier) override;
+	void visit(UnspecIdentifierBlock* unspecIdentifierList) override;
+	void visit(SeqIdentifierBlock* seqIdentifierList) override;
+	void visit(NondetIdentifierBlock* nondetIdentifierList) override;
+	void visit(PrioIdentifierBlock* prioIdentifierList) override;
+	void visit(MainModule* mainModule) override;
+
+	void visit(IntType* intType) override;
+	void visit(BoolType* boolType) override;
+	void visit(EnumType* enumType) override;
+	void visit(ListType* listType) override;
+	void visit(TupleType* tupleType) override;
+	void visit(NullType* nullType) override;
+	void visit(FunctionType* functionType) override;
+	void visit(ActionSystemType* actionSystemType) override;
+
+	void visit(GuardedCommand* guardedCommand) override;
+	void visit(Call* call) override;
+	void visit(Assignment* assignment) override;
+	void visit(SeqBlock* seqBlock) override;
+	void visit(NondetBlock* nondetBlock) override;
+	void visit(PrioBlock* prioBlock) override;
+	void visit(Skip* skipStatement) override;
+	void visit(Break* skipStatement) override;
+	void visit(Abort* abortStatement) override;
+
+	void visit(TernaryOperator* ternaryOperator) override;
+	void visit(BinaryOperator* binaryOperator) override;
+	void visit(UnaryOperator* unaryOperator) override;
+	void visit(ExistsQuantifier* quantifier) override;
+	void visit(ForallQuantifier* quantifier) override;
+	void visit(ListConstructor* listConstructor) override;
+	void visit(SetConstructor* setConstructor) override;
+	void visit(TupleConstructor* tupleConstructor) override;
+	void visit(ObjectConstructor* objectConstructor) override;
+	void visit(BoolValueExpression* identifierExpression) override;
+	void visit(IntValueExpression* identifierExpression) override;
+	void visit(RefValueExpression* identifierExpression) override;
+	void visit(IdentifierExpression* identifierExpression) override;
+	void visit(TypeExpression* typeExpression) override;
+	void visit(TupleMapAccessExpression* tupleMapAccessExpression) override;
+	void visit(CallExpression* callExpression) override;
+	void visit(AccessExpression* accessExpression) override;
+	void visit(PointerType* pt) override;
+};
+
+
+} /* namespace Ast */
+
Index: trunk/compiler/ooasCompiler/.project
===================================================================
--- trunk/compiler/ooasCompiler/.project	(nonexistent)
+++ trunk/compiler/ooasCompiler/.project	(revision 2)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>OOASCompiler</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
Index: trunk/compiler/cppAst/ast/SymbolTable.cpp
===================================================================
--- trunk/compiler/cppAst/ast/SymbolTable.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/SymbolTable.cpp	(revision 2)
@@ -0,0 +1,71 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+/*
+ * SymbolTable.cpp
+ *
+ *  Created on: Dec 23, 2013
+ *      Author: willibald
+ */
+
+#include "SymbolTable.hpp"
+
+namespace Ast {
+
+bool SymbolTable::addIdentifier(Identifier* anIdent) {
+	if (anIdent != nullptr) {
+		std::pair<std::string,Identifier*> toInsert(anIdent->tokenText(),anIdent);
+		auto pair = m_symbols.insert(toInsert);
+		if (!pair.second) {
+			throw new Base::UnsupportedOperationException(
+				boost::format("Identifier '%s' already exists") % anIdent->tokenText());
+		}
+		m_symbols[anIdent->tokenText()] = anIdent;
+		m_identifiers.insert(anIdent);
+		return true;
+	}
+	return false;
+}
+
+//Binary predicate that, taking two values of the same type of those contained in the list,
+//returns true if the first argument goes before the second argument in the strict weak ordering it defines, and false otherwise.
+bool symbolSort(Identifier*& a, Identifier*& b) {
+	return a->tokenText() < b->tokenText();
+}
+
+void SymbolTable::setSymbolList(std::list<Identifier*>& newList) {
+	newList.sort(&symbolSort);
+	m_symbols.clear();
+	m_identifiers.clear();
+	for (auto& s: newList)
+		addIdentifier(s);
+}
+
+Identifier* SymbolTable::get(const char* aKey) {
+	auto iter = m_symbols.find(aKey);
+	return iter == m_symbols.end() ? nullptr : iter->second;
+}
+
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/Compiler.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/Compiler.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/Compiler.java	(revision 2)
@@ -0,0 +1,390 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.momut.ooas.CompilerConfiguration.Backend;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.codegen.ast.OoaAstEmitter;
+import org.momut.ooas.codegen.cadp.OoaCADPVisitor;
+import org.momut.ooas.codegen.prolog.OoaPrologVisitor;
+import org.momut.ooas.codegen.prologsymbolic.OoaPrologSymbolicVisitor;
+import org.momut.ooas.parser.CompilerMessage;
+import org.momut.ooas.parser.ParserError;
+import org.momut.ooas.parser.ParserMessage;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.parser.ParserWarning;
+import org.momut.ooas.parser.ooaCustomParser;
+import org.momut.ooas.utils.exceptions.OoasCompilerRuntimeException;
+import org.momut.ooas.visitors.OoaActionClassifierVisitor;
+import org.momut.ooas.visitors.OoaCheckObjectRefsConstant;
+import org.momut.ooas.visitors.OoaMethodPureClassifierVisitor;
+import org.momut.ooas.visitors.OoaObjectInstantiationVisitor;
+import org.momut.ooas.visitors.OoaPrintVisitor;
+import org.momut.ooas.visitors.OoaReplaceOpaqueVisitor;
+import org.momut.ooas.visitors.OoaResolveExpressionsVisitor;
+import org.momut.ooas.visitors.OoaSymbolSortVisitor;
+import org.momut.ooas.visitors.OoaTypeCheckVisitor;
+import org.momut.ooas.visitors.OoaTypeRenameVisitor;
+import org.momut.ooas.visitors.OoaTypesVisitor;
+import org.momut.ooas.visitors.analysis.OoaCheckASTVisitor;
+import org.momut.ooas.visitors.analysis.OoaPrintActionSequencesVisitor;
+import org.momut.ooas.visitors.analysis.OoaPrintActionsVisitor;
+import org.momut.ooas.visitors.analysis.OoaPrintMetricsVisitor;
+import org.momut.ooas.visitors.optimisation.OoaRemoveTrivialBlocksVisitor;
+
+public final class Compiler {
+	public interface IProgressCallBack {
+		public void startingCompilePhase(String compilePhaseName);
+		public void doneCompilePhase();
+	}
+	public interface ILogCallBack {
+		public void logError(boolean toConsole, String message);
+	}
+	private static final class NullProgressCallBack implements IProgressCallBack {
+		@Override
+		public void startingCompilePhase(String compilePhaseName) {}
+		@Override
+		public void doneCompilePhase() {}
+	}
+	private interface CreateVisitor {
+		public IAstVisitor create(ParserState aState);
+	}
+
+	public final CompilerConfiguration config;
+	private final ArrayList<CreateVisitor> pipeLine = new ArrayList<CreateVisitor>();
+	private ArrayList<ParserError> listOfParserErrors = new ArrayList<>();
+	private ArrayList<ParserWarning> listOfParserWarnings = new ArrayList<>();
+	private ArrayList<ParserMessage> listOfParserMessages = new ArrayList<>();
+
+	private void updateParserMsgs(ParserState pState) {
+		final Comparator<CompilerMessage> comparator = new Comparator<CompilerMessage>(){
+			@Override
+			public int compare(CompilerMessage arg0, CompilerMessage arg1) {
+				if (arg0.line() != arg1.line())
+					return arg0.line() - arg1.line();
+				else
+					return arg0.column() - arg1.column();
+			}};
+
+		listOfParserErrors = pState.listOfParserErrors;
+		listOfParserMessages = pState.listOfParserMessages;
+		listOfParserWarnings = pState.listOfParserWarnings;
+
+		// sort the logs
+		Collections.sort(listOfParserErrors, comparator);
+		Collections.sort(listOfParserMessages, comparator);
+		Collections.sort(listOfParserWarnings, comparator);
+	}
+
+	public List<ParserError> getErrors() {
+		return Collections.unmodifiableList(listOfParserErrors);
+	}
+	public List<ParserWarning> getWarnings() {
+		return Collections.unmodifiableList(listOfParserWarnings);
+	}
+	public List<ParserMessage> getMessages() {
+		return Collections.unmodifiableList(listOfParserMessages);
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder result = new StringBuilder();
+		for (final ParserError err: getErrors())
+			result.append(String.format("ERROR: %s (%s,%s): %s\n",
+				err.file(), err.line(), err.column(), err.message()));
+		for (final ParserWarning err: getWarnings())
+			result.append(String.format("Warning: %s (%s,%s): %s\n",
+				err.file(), err.line(), err.column(), err.message()));
+		for (final ParserMessage msg: getMessages())
+			result.append(String.format("Info: %s (%s,%s): %s\n",
+				msg.file(), msg.line(), msg.column(), msg.message()));
+		return result.toString();
+	}
+
+	private void fillPipeLine() {
+		pipeLine.add(new CreateVisitor(){
+			@Override
+			public IAstVisitor create(ParserState aState) {
+				return new OoaCheckASTVisitor(aState, "Stage 0");
+			}});
+		pipeLine.add(new CreateVisitor(){
+			@Override
+			public IAstVisitor create(ParserState aState) {
+				return new OoaSymbolSortVisitor(aState);
+			}});
+		pipeLine.add(new CreateVisitor(){
+			@Override
+			public IAstVisitor create(ParserState aState) {
+				return new OoaReplaceOpaqueVisitor(aState);
+			}});
+		pipeLine.add(new CreateVisitor(){
+			@Override
+			public IAstVisitor create(ParserState aState) {
+				return new OoaTypesVisitor(aState);
+			}});
+		pipeLine.add(new CreateVisitor(){
+			@Override
+			public IAstVisitor create(ParserState aState) {
+				return new OoaResolveExpressionsVisitor(aState);
+			}});
+		pipeLine.add(new CreateVisitor(){
+			@Override
+			public IAstVisitor create(ParserState aState) {
+				return new OoaMethodPureClassifierVisitor(aState);
+			}});
+		pipeLine.add(new CreateVisitor(){
+			@Override
+			public IAstVisitor create(ParserState aState) {
+				return new OoaTypeCheckVisitor(aState);
+			}});
+
+		if (!config.getNamedTypePrefix().equals(""))
+		{
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaTypeRenameVisitor(aState);
+				}});
+		}
+
+		// do some trivial "optimizations" (remove prioritized and nondet choice blocks
+		// with only one element, join sequential blocks that are direct children of
+		// sequential blocks to one sequential block
+		pipeLine.add(new CreateVisitor(){
+			@Override
+			public IAstVisitor create(ParserState aState) {
+				return new OoaRemoveTrivialBlocksVisitor(aState);
+			}});
+		// check the AST
+		pipeLine.add(new CreateVisitor(){
+			@Override
+			public IAstVisitor create(ParserState aState) {
+				return new OoaCheckASTVisitor(aState,"After Optimisation");
+			}});
+
+
+		pipeLine.add(new CreateVisitor(){
+			@Override
+			public IAstVisitor create(ParserState aState) {
+				return new OoaActionClassifierVisitor(aState);
+			}});
+
+		pipeLine.add(new CreateVisitor(){
+			@Override
+			public IAstVisitor create(ParserState aState) {
+				return new OoaPrintMetricsVisitor(aState);
+			}
+		});
+
+		switch (config.getBackend()) {
+		case Printer:
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaPrintVisitor(aState);
+				}});
+			break;
+		case CADP :
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaObjectInstantiationVisitor(aState, config.getLabelCompression());
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaPrintActionsVisitor(aState);
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaPrintActionSequencesVisitor(aState);
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaCADPVisitor(aState);
+				}});
+			break;
+		case Prolog:
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaObjectInstantiationVisitor(aState, config.getLabelCompression());
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaPrintActionsVisitor(aState);
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaPrintActionSequencesVisitor(aState);
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaPrologVisitor(aState, config.getMaxSearchDepth(), config.getNameSpace());
+				}});
+			break;
+		case PrologSymbolic:
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaCheckObjectRefsConstant(aState);
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaObjectInstantiationVisitor(aState, config.getLabelCompression());
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaPrintActionSequencesVisitor(aState);
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaPrintActionsVisitor(aState);
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaPrologSymbolicVisitor(aState, config.getMaxSearchDepth(), config.getNameSpace());
+				}});
+			break;
+		case CopyAST:
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaObjectInstantiationVisitor(aState, config.getLabelCompression());
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaPrintActionsVisitor(aState);
+				}});
+			pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor create(ParserState aState) {
+					return new OoaAstEmitter<>(aState, config.getAstTarget());
+				}});
+			break;
+		default:
+			throw new OoasCompilerRuntimeException("Unknown backend.");
+		}
+	}
+
+
+	public int compile(ILogCallBack logCallback) {
+		return compile(new NullProgressCallBack(), logCallback);
+	}
+
+	/* fire up the parser */
+	public int compile(IProgressCallBack callback, ILogCallBack logCallback)
+	{
+		if (config.isWriteable()) {
+			config.setWriteOnly();
+			fillPipeLine();
+		}
+
+		ParserState pState;
+		try {
+			callback.startingCompilePhase("OoaParser");
+			pState = config.useStreams()
+					?  new ParserState(config.getUnitName(), config.getInputStream(), config.getNamedTypePrefix())
+					:  new ParserState(config.getFileToParse(), config.getNamedTypePrefix());
+			final int result = ooaCustomParser.FirstPass(pState);
+			if (result == 0) {
+				callback.doneCompilePhase();
+				if (pipeLine.size() > 0) {
+					IAstVisitor visitor = null;
+					for (final CreateVisitor item: pipeLine) {
+						visitor = item.create(pState);
+						callback.startingCompilePhase(visitor.returnVisitorName());
+						pState.ooaSystem.Accept(visitor);
+						visitor.done();
+						if (pState.listOfParserErrors.size() > 0) {
+							updateParserMsgs(pState);
+							return pState.listOfParserErrors.size();
+						} else
+							callback.doneCompilePhase();
+					}
+					// after we've done all visitors, write the output file.
+					if (!config.useStreams() && !config.getFileToOutput().equals(""))
+					{
+						final FileWriter fw = new FileWriter(config.getFileToOutput(), false);
+						fw.write(visitor.toString()); // fixme: this should be ascii..
+						fw.close();
+					} else if (config.useStreams()) {
+						final OutputStream out = config.getOutputStream();
+						final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out));
+						writer.write(visitor.toString());
+						writer.close();
+					}
+				}
+			}
+			updateParserMsgs(pState);
+			return result;
+		} catch (final IOException e) {
+			logCallback.logError(true, e.toString());
+			return -1;
+		}
+	}
+
+
+	public Compiler(CompilerConfiguration config) {
+		this.config = config;
+	}
+
+	public Compiler(String unitName, String fileToParse, String fileToWrite, Backend be) {
+		this(new CompilerConfiguration(unitName, fileToParse, fileToWrite, be));
+	}
+
+	public Compiler(String fileToParse, String fileToWrite, Backend be) {
+		this(new File(fileToParse).getName(), fileToParse, fileToWrite, be);
+	}
+
+	public Compiler(String unitName, InputStream input, OutputStream output, Backend be) {
+		this(new CompilerConfiguration(unitName, input, output, be));
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/AstNodeTypeEnum.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/AstNodeTypeEnum.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/AstNodeTypeEnum.java	(revision 2)
@@ -0,0 +1,36 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast;
+
+/* All Elements of the AST */
+public enum AstNodeTypeEnum {
+	type,
+	identifier,
+	expression,
+	statement 
+}
Index: trunk/compiler/ooasCompiler/libraries/ecj-4.4.2.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/compiler/ooasCompiler/libraries/ecj-4.4.2.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/compiler/cppAst/ast/SymbolTable.hpp
===================================================================
--- trunk/compiler/cppAst/ast/SymbolTable.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/SymbolTable.hpp	(revision 2)
@@ -0,0 +1,75 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <cstdint>
+#include <unordered_map>
+#include <unordered_set>
+#include <list>
+#include <string>
+#include <ast/identifiers/Identifier.hpp>
+#include <base/Exceptions.hpp>
+
+namespace Ast {
+
+class SymbolTable: public Base::TiresiasObject {
+protected:
+	std::unordered_map<std::string, Identifier*> m_symbols;
+	std::unordered_set<const Identifier*> m_identifiers;
+
+	SymbolTable():
+		TiresiasObject(),
+		m_symbols(),
+		m_identifiers()
+	{};
+	SymbolTable(const SymbolTable &toCopy):
+		TiresiasObject(),
+		m_symbols(toCopy.m_symbols),
+		m_identifiers (toCopy.m_identifiers)
+	{};
+public:
+	friend class Ast;
+
+	std::unordered_map<std::string, Identifier*>::iterator begin() {return m_symbols.begin();}
+	std::unordered_map<std::string, Identifier*>::iterator end() {return m_symbols.end();}
+	std::unordered_set<const Identifier*> identifiers() {return m_identifiers;}
+
+	std::uint64_t size() {return m_symbols.size();}
+	bool defined(const Identifier* aValue) { return m_identifiers.count(aValue) > 0; }
+	bool defined(std::string& aKey)  { return m_symbols.find(aKey) != m_symbols.end(); }
+	Identifier* get(const std::string& aKey) {
+		std::unordered_map<std::string, Identifier*>::iterator iter = m_symbols.find(aKey);
+		if (iter == m_symbols.end())
+			return nullptr;
+		return iter->second;
+	}
+	Identifier* get(const char* aKey);
+	bool addIdentifier(Identifier* anIdent);
+	void setSymbolList(std::list<Identifier*>& newList);
+};
+
+}
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/CmdlineCompiler.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/CmdlineCompiler.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/CmdlineCompiler.java	(revision 2)
@@ -0,0 +1,363 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.momut.ooas.CompilerConfiguration.LabelCompression;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.codegen.prolog.OoaPrologVisitor;
+import org.momut.ooas.codegen.prologsymbolic.OoaPrologSymbolicVisitor;
+import org.momut.ooas.parser.ParserError;
+import org.momut.ooas.parser.ParserMessage;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.parser.ParserWarning;
+import org.momut.ooas.parser.ooaCustomParser;
+import org.momut.ooas.visitors.OoaActionClassifierVisitor;
+import org.momut.ooas.visitors.OoaMethodPureClassifierVisitor;
+import org.momut.ooas.visitors.OoaObjectInstantiationVisitor;
+import org.momut.ooas.visitors.OoaReplaceOpaqueVisitor;
+import org.momut.ooas.visitors.OoaResolveExpressionsVisitor;
+import org.momut.ooas.visitors.OoaSymbolSortVisitor;
+import org.momut.ooas.visitors.OoaTypeCheckVisitor;
+import org.momut.ooas.visitors.OoaTypeRenameVisitor;
+import org.momut.ooas.visitors.OoaTypesVisitor;
+import org.momut.ooas.visitors.optimisation.OoaRemoveTrivialPrioritizedCompositionVisitor;
+
+public final class CmdlineCompiler
+{
+	public interface CreateVisitor {
+		public IAstVisitor cerate(ParserState aState);
+	}
+
+	public static class Options
+	{
+		public boolean quiet = false;
+		public String fileToParse = "";
+		public String outputToFile = "";
+		public String namedTypePrefix = "";
+		public String namespace = "";
+		public ArrayList<CreateVisitor> pipeLine = new ArrayList<CreateVisitor>();
+	}
+
+	static void displayTitle()
+	{
+		System.out.println();
+		System.out.println("          >> OO-Action System Parser <<");
+		System.out.println();
+		System.out.println();
+	}
+
+
+	/* fire up the parser */
+	static int runAntlrParser(Options options)
+	{
+		ParserState pState;
+		try {
+			pState = new ParserState(options.fileToParse, options.namedTypePrefix);
+			final int result = ooaCustomParser.FirstPass(pState);
+			if (result > 0)
+			{
+				System.out.println(String.format("The parser returned %s errors:", result));
+				for (final ParserError error: pState.listOfParserErrors)
+					System.out.println(String.format("ERROR (%s): %s,%s; %s",
+							error.file(), error.line(), error.column(), error.message()));
+			}
+			else
+			{
+				System.out.println("   Passed: OoaParser");
+				if (options.pipeLine.size() > 0)
+				{
+
+					IAstVisitor visitor = null;
+					for (final CreateVisitor item: options.pipeLine)
+					{
+						visitor = item.cerate(pState);
+						pState.ooaSystem.Accept(visitor);
+						if (pState.listOfParserErrors.size() > 0)
+						{
+							System.out.println(String.format("The parser (%s) returned %s errors:",
+									visitor.returnVisitorName(), pState.listOfParserErrors.size()));
+
+							for (final ParserError error: pState.listOfParserErrors)
+								System.out.println(String.format("ERROR (%s): %s,%s; %s",
+										error.file(), error.line(), error.column(), error.message()));
+							return pState.listOfParserErrors.size();
+						}
+						else
+						{
+							System.out.print("   Passed: ");
+							System.out.println(visitor.returnVisitorName());
+						}
+					}
+					System.out.println();
+					System.out.println(String.format("File %s successfully parsed.", pState.filename));
+					System.out.println();
+
+					if (pState.listOfParserMessages.size() > 0 && !(options.quiet))
+					{
+						System.out.println(String.format("Parser returned %s messages:", pState.listOfParserMessages.size()));
+						for (final ParserMessage message: pState.listOfParserMessages)
+							System.out.println(String.format("Message (%s): %s,%s; %s",
+									message.file(), message.line(), message.column(), message.message()));
+						System.out.println();
+						System.out.println();
+					}
+
+					if (pState.listOfParserWarnings.size() > 0 && !(options.quiet))
+					{
+						System.out.println(String.format("Parser returned %s warnings:", pState.listOfParserWarnings.size()));
+						for (final ParserWarning warning: pState.listOfParserWarnings)
+							System.out.println(String.format("Warning (%s): %s,%s; %s",
+									warning.file(), warning.line(), warning.column(), warning.message()));
+						System.out.println("");
+						System.out.println("");
+					}
+
+					if (!options.outputToFile.equals(""))
+					{
+						System.out.println(String.format("Writing output to %s.", options.outputToFile));
+						final FileWriter fw = new FileWriter(options.outputToFile, false);
+						fw.write(visitor.toString()); // fixme: this should be ascii..
+						fw.close();
+					}
+					else
+						System.out.println(visitor.toString());
+				}
+				else
+				{
+					System.out.println();
+					System.out.println(String.format("File %s successfully parsed.", pState.filename));
+					System.out.println("");
+				}
+			}
+
+			return result;
+		} catch (final IOException e) {
+			e.printStackTrace();
+			return -1;
+		}
+	}
+
+
+	private static void fillPipeLine(Options options) {
+		int index = 0;
+
+		options.pipeLine.add(index++, new CreateVisitor(){
+			@Override
+			public IAstVisitor cerate(ParserState aState) {
+				return new OoaSymbolSortVisitor(aState);
+			}});
+		options.pipeLine.add(index++, new CreateVisitor(){
+			@Override
+			public IAstVisitor cerate(ParserState aState) {
+				return new OoaReplaceOpaqueVisitor(aState);
+			}});
+		options.pipeLine.add(index++, new CreateVisitor(){
+			@Override
+			public IAstVisitor cerate(ParserState aState) {
+				return new OoaTypesVisitor(aState);
+			}});
+		options.pipeLine.add(index++, new CreateVisitor(){
+			@Override
+			public IAstVisitor cerate(ParserState aState) {
+				return new OoaResolveExpressionsVisitor(aState);
+			}});
+		options.pipeLine.add(index++, new CreateVisitor(){
+			@Override
+			public IAstVisitor cerate(ParserState aState) {
+				return new OoaMethodPureClassifierVisitor(aState);
+			}});
+		options.pipeLine.add(index++, new CreateVisitor(){
+			@Override
+			public IAstVisitor cerate(ParserState aState) {
+				return new OoaTypeCheckVisitor(aState);
+			}});
+
+		if (!options.namedTypePrefix.equals(""))
+		{
+			options.pipeLine.add(index++, new CreateVisitor(){
+				@Override
+				public IAstVisitor cerate(ParserState aState) {
+					return new OoaTypeRenameVisitor(aState);
+				}});
+		}
+
+		options.pipeLine.add(index++, new CreateVisitor(){
+			@Override
+			public IAstVisitor cerate(ParserState aState) {
+				return new OoaRemoveTrivialPrioritizedCompositionVisitor(aState);
+			}});
+		options.pipeLine.add(index++, new CreateVisitor(){
+			@Override
+			public IAstVisitor cerate(ParserState aState) {
+				return new OoaActionClassifierVisitor(aState);
+			}});
+
+		options.pipeLine.add(index++, new CreateVisitor(){
+			@Override
+			public IAstVisitor cerate(ParserState aState) {
+				return new OoaObjectInstantiationVisitor(aState, LabelCompression.NoCompression);
+			}});
+	}
+
+
+	/* entry point */
+	public static void main(String[] args)
+	{
+		displayTitle();
+
+		if (args.length != 4) {
+			System.out.println("3 Arguments expected: backend orig/mut inputfile outputfile");
+			System.out.println();
+			System.out.println("   backend    ... 'psym' or 'p'");
+			System.out.println("   orig/mut   ... 'orig' or 'mut'");
+			System.out.println("   input  file or directory ... full path to input .ooas file or");
+			System.out.println("                                directory containing .ooas files");
+			System.out.println("   output file or directory ... full path to output file; will erase or");
+			System.out.println("                                directory (only if also input is a directory)");
+			System.out.println();
+			System.exit(-1);
+		}
+
+		final Options options  = new Options();
+		final boolean symbolic = args[0].toLowerCase().trim().equals("psym");
+		final boolean mutant   = args[1].toLowerCase().trim().equals("mut");
+		options.fileToParse    = args[2];
+		options.outputToFile   = args[3];
+		fillPipeLine(options); // add all basic operations
+		final String namespace = mutant? "asm" : "as";
+		options.namespace      = namespace;
+
+		// add the prolog codegen target...
+		if (symbolic) {
+			options.pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor cerate(ParserState aState) {
+					return new OoaPrologSymbolicVisitor(aState, 35, namespace);
+				}});
+		} else {
+			options.pipeLine.add(new CreateVisitor(){
+				@Override
+				public IAstVisitor cerate(ParserState aState) {
+					return new OoaPrologVisitor(aState, 35, namespace); // "as" ... original, "asm" ... mutant
+				}});
+		}
+		System.out.println(String.format("Running OOAS Compiler... [backend=%s, namespace=%s]", symbolic?"psym":"p", namespace));
+		if (new File(options.fileToParse).isDirectory()) {
+			directoryMode(options);
+		} else {
+			fileMode(options);
+		}
+	}
+
+	/**
+	 * Iterates over all files in a directory if options.fileToParse is a directory
+	 * and runs the antlr parser for each file. the output is stored in the same
+	 * directory if the options.outputToFile is blank or not a directory.
+	 * @param options
+	 */
+	public static void directoryMode(final Options options) {
+		final File input  = new File(options.fileToParse);
+		final File output = new File(options.outputToFile);
+		final List<File> errors = new ArrayList<File>();
+
+		File[] filesToParse = null;
+		final FileFilter filter = new FileFilter() {
+			@Override
+			public final boolean accept(final File myFile) {
+				return myFile.getName().endsWith(".ooas");
+			}
+		};
+
+		System.out.println(String.format("Processing Directory [Input, Output]: %s, %s",
+				input.getAbsolutePath(), output.getAbsoluteFile()));
+
+		filesToParse = input.listFiles(filter);
+
+		int result              = 0;
+		File fileToParse        = null;
+		String inputFileName    = "";
+		String outputFileName   = "";
+		final String outputFileSuffix = "." + options.namespace + ".pl";
+
+		if (filesToParse != null) {
+			for (int i = 0; i < filesToParse.length; ++i) {
+				fileToParse    = filesToParse[i];
+				inputFileName  = fileToParse.getAbsolutePath();
+				outputFileName = fileToParse.getName().substring(0, fileToParse.getName().indexOf(".ooas")).concat(outputFileSuffix);
+
+				if (output != null) {
+					if (!output.isDirectory())
+						output.mkdir();
+					outputFileName = output.getAbsolutePath() + File.separatorChar + outputFileName;
+				}
+				else {
+					// use same directory as input file for output
+					outputFileName = fileToParse.getParent() + File.separatorChar + outputFileName;
+				}
+
+				options.fileToParse  = inputFileName;
+				options.outputToFile = outputFileName;
+
+				System.out.println(String.format("Parsing %s", options.fileToParse));
+				result = runAntlrParser(options);
+				if (result != 0)
+					errors.add(fileToParse);
+			}
+		}
+
+		if (errors.size() > 0) {
+			System.out.println("Following files were not processed correctly:");
+			final Iterator<File> i = errors.iterator();
+			File file = null;
+			while (i.hasNext()) {
+				file = i.next();
+				System.out.println(file.getName());
+			}
+			System.exit(-1);
+		}
+		System.exit(0);
+	}
+
+	/**
+	 * Runs the antlr parser with the given options
+	 * @param options
+	 */
+	public static void fileMode(final Options options) {
+		System.out.println(String.format("Parsing %s.", options.fileToParse));
+		final int result = runAntlrParser(options);
+		System.exit(result);
+	}
+}
Index: trunk/compiler/ooasCompiler/libraries/jna-platform-4.0.0.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/compiler/ooasCompiler/libraries/jna-platform-4.0.0.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/compiler/cppAst/ast/TextEmitter.hpp
===================================================================
--- trunk/compiler/cppAst/ast/TextEmitter.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/TextEmitter.hpp	(revision 2)
@@ -0,0 +1,141 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <string>
+#include <cstdint>
+#include <boost/format.hpp>
+
+
+namespace Ast {
+
+/**
+ * Shameless copy of the Java "CodeEmitter"...
+ */
+
+class TextEmitter
+{
+protected:
+	std::string m_output;
+	unsigned int m_indentLevel;
+	const unsigned int m_indentTabWidth;
+
+public:
+	TextEmitter():
+		m_output (""),
+		m_indentLevel (0),
+		m_indentTabWidth(4)
+	{}
+
+	void indent()
+	{
+		for (unsigned int i = 0; i < m_indentLevel * m_indentTabWidth; i++)
+			m_output += " ";
+	}
+
+	void append(const boost::format& msg) {
+		append(msg.str());
+	}
+
+	void append(std::int64_t num)
+	{
+		m_output += std::to_string(num);
+	}
+
+	void append(const std::string& text)
+	{
+		m_output += text;
+	}
+
+	void append(const char* text)
+	{
+		m_output += text;
+	}
+
+	void appendLineIncIndent(std::string& text)
+	{
+		m_indentLevel++;
+		appendLine(text);
+	}
+
+	void appendLineDecIndent(std::string& text)
+	{
+		if (m_indentLevel > 0)
+		{
+			m_indentLevel--;
+			string::size_type startIndex = m_output.length() - m_indentTabWidth;
+			m_output = m_output.erase(startIndex, std::string::npos);
+		}
+		appendLine(text);
+	}
+
+	void appendLine(const boost::format& msg) {
+		appendLine(msg.str());
+	}
+
+	void appendLine(const char* text)
+	{
+		m_output += text;
+		appendLine();
+	}
+
+	void appendLine(const std::string& text)
+	{
+		appendLine(text.c_str());
+	}
+
+	void appendLine()
+	{
+		m_output += "\n";
+		indent();
+	}
+
+
+
+	void incIndent()
+	{
+		m_indentLevel++;
+	}
+
+	void decIndent()
+	{
+		m_indentLevel--;
+	}
+
+	void clear()
+	{
+		m_output = "";
+	}
+
+
+	std::string& toString()
+	{
+		return m_output;
+	}
+};
+
+} /* namespace Ast */
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/AccessExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/AccessExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/AccessExpression.java	(revision 2)
@@ -0,0 +1,63 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+///////////////////////////////////////////////
+///  Element Access (Point operator):  a.b
+///
+public final class AccessExpression extends BinaryOperator
+{
+	public AccessExpression(IdentifierExpression anIdentifier, Expression child, int line, int pos)
+	{
+		super (ExpressionKind.Access, anIdentifier, child, line, pos);
+	}
+
+	public AccessExpression(Expression anExpression, Expression child, int line, int pos)
+	{
+		super (ExpressionKind.Access, anExpression, child, line, pos);
+	}
+
+	public AccessExpression(AccessExpression toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new AccessExpression(this);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/AstNode.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/AstNode.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/AstNode.java	(revision 2)
@@ -0,0 +1,31 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast;
+
+public abstract class AstNode
+{ }
Index: trunk/compiler/cppAst/ast/expressions/BinaryOperator.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/BinaryOperator.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/BinaryOperator.hpp	(revision 2)
@@ -0,0 +1,74 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/Expression.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class BinaryOperator
+	: public Expression
+{
+protected:
+	Expression* m_left;
+	Expression* m_right;
+
+	BinaryOperator(ExpressionKind kind):
+		Expression(kind),
+		m_left (nullptr),
+		m_right (nullptr)
+	{};
+	BinaryOperator(const BinaryOperator& toCopy):
+		Expression(toCopy),
+		m_left (toCopy.m_left),
+		m_right (toCopy.m_right)
+	{};
+
+	static BinaryOperator* create(ExpressionKind k) {return new BinaryOperator(k);}
+	static BinaryOperator* createCopy(const BinaryOperator& toCopy) {return new BinaryOperator(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef,
+				SymbolTable* symbTabRef, Expression* left, Expression* right)
+	{
+		Expression::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef);
+		m_left = left;
+		m_right = right;
+	}
+
+
+	Expression* left() {return m_left;};
+	Expression* right(){return m_right;};
+	void setRightChild(Expression* child) {m_right = child;};
+	void setLeftChild(Expression* child) {m_left = child;};
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/CompilerConfiguration.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/CompilerConfiguration.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/CompilerConfiguration.java	(revision 2)
@@ -0,0 +1,161 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.momut.ooas.codegen.ast.IAstDuplicator;
+import org.momut.ooas.utils.exceptions.OoasCompilerRuntimeException;
+
+
+public final class CompilerConfiguration {
+	public enum LabelCompression { NoCompression, ActionsMethods, ActionsMethodsObjects, All }
+	public enum Backend {Prolog, PrologSymbolic, Printer, CADP, CopyAST}
+	private boolean configWriteable = true;
+	private int searchDepth = 35;
+	private String nameSpace = "as";
+	private boolean quiet = false;
+	private String namedTypePrefix = "";
+
+	private final boolean streams;
+	// options for non streaming interface
+	private final Backend backend;
+	private final String fileToParse;
+	private final String outputToFile;
+	// options for stream
+	private final InputStream inputStream;
+	private final OutputStream outputStream;
+	private final String unitName;
+
+	// compress options
+	private LabelCompression compression;
+	private IAstDuplicator<?> m_duplicator;
+
+
+	private void checkWriteable() {
+		if (!configWriteable)
+			throw new OoasCompilerRuntimeException("CompilerConfig read-only.");
+	}
+	public boolean isWriteable() {return configWriteable;}
+	void setWriteOnly(){
+		configWriteable = false;
+	}
+
+	public boolean useStreams() {return streams;}
+	public String getUnitName() {return unitName;}
+
+	public String getFileToParse() {
+		if (streams)
+			throw new IllegalArgumentException("OOAS compiler was configured with input/output streams.");
+		return fileToParse;
+	}
+	public String getFileToOutput() {
+		if (streams)
+			throw new IllegalArgumentException("OOAS compiler was configured with input/output streams.");
+		return outputToFile;
+	}
+
+	public InputStream getInputStream() {
+		if (!streams)
+			throw new IllegalArgumentException("OOAS compiler was configured with input/output files.");
+		return inputStream;
+	}
+	public OutputStream getOutputStream() {
+		if (!streams)
+			throw new IllegalArgumentException("OOAS compiler was configured with input/output files.");
+		return outputStream;
+	}
+
+	public Backend getBackend() {return backend;}
+
+	public int getMaxSearchDepth() {return searchDepth;}
+	public CompilerConfiguration withMaxSearchDepth(int maxDepth) {
+		checkWriteable();
+		searchDepth = maxDepth;
+		return this;
+	}
+
+	public String getNameSpace() {return nameSpace;}
+	public CompilerConfiguration withNameSpace(String ns) {
+		checkWriteable();
+		nameSpace = ns;
+		return this;
+	}
+
+	public boolean getQuiet() {return quiet;}
+	public CompilerConfiguration withQuiet(boolean isQuiet){
+		checkWriteable();
+		quiet = isQuiet;
+		return this;
+	}
+
+	public String getNamedTypePrefix() {return namedTypePrefix;}
+	public CompilerConfiguration withNamedTypePrefix(String prfx) {
+		checkWriteable();
+		namedTypePrefix = prfx;
+		return this;
+	}
+
+	public LabelCompression getLabelCompression() { return compression; }
+	public CompilerConfiguration withLabelCompression(LabelCompression compression) {
+		checkWriteable();
+		this.compression = compression;
+		return this;
+	}
+
+	public IAstDuplicator<?> getAstTarget() { return m_duplicator; }
+	public CompilerConfiguration withAstTarget(IAstDuplicator<?> visitor) {
+		m_duplicator = visitor;
+		return this;
+	}
+
+
+	public CompilerConfiguration (String unitName, String parseFile, String outputFileName, Backend be) {
+		fileToParse = parseFile;
+		outputToFile = outputFileName;
+		backend = be;
+		streams = false;
+		inputStream = null;
+		outputStream = null;
+		this.unitName = unitName;
+		compression = LabelCompression.NoCompression;
+	}
+
+	public CompilerConfiguration (String unitName, InputStream input, OutputStream out, Backend be) {
+		fileToParse = unitName;
+		outputToFile = "";
+		backend = be;
+		streams = true;
+		inputStream = input;
+		outputStream = out;
+		this.unitName = unitName;
+		compression = LabelCompression.NoCompression;
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/Expression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/Expression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/Expression.java	(revision 2)
@@ -0,0 +1,256 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.momut.ooas.ast.AstNode;
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.ast.types.ValuedEnumType;
+import org.momut.ooas.math.AbstractOperations;
+import org.momut.ooas.math.AbstractRange;
+import org.momut.ooas.math.DoubleRange;
+import org.momut.ooas.math.IntegerRange;
+import org.momut.ooas.math.SaturatedDoubleOperations;
+import org.momut.ooas.math.SaturatedIntegerOperations;
+import org.momut.ooas.parser.SymbolTable;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.visitors.OoaPrintVisitor;
+
+///////////////////////////////////////////////
+///  Expressions
+///
+/// Note: Since we allow expression of the form
+/// myTuple(a,b) = hd x, where a and b are newly
+/// introduced placeholders, the expression knows
+/// about local variables.
+/// Scoping: Consider following expression
+///     3 > a and myTuple(b,d) = hd e and b < 5
+/// which gives
+///             and
+///          /       \
+///         /         and
+///        /        /     \
+///       >        =        <
+///      / \      /  \     /  \
+///     3   a  (b,d)  e   b    5
+///  the scope of b and d is defined by the binary
+///  expression that has the leaf within its left child
+///  (== the second 'and').
+///  Local variables may only be introduced in constructors
+///  of sets, lists, and tuples. Therefore the type is
+///  known.
+
+
+public abstract class Expression extends AstNode implements IAst
+{
+	protected ExpressionKind m_kind;
+	protected UlyssesType m_type;
+	protected int m_line;
+	protected int m_pos;
+	protected SymbolTable m_freeVariables;
+	protected ArrayList<FunctionIdentifier> m_callTargets;
+
+	public ExpressionKind kind() { return m_kind; }
+	public UlyssesType type() { return m_type; }
+	public int line() { return m_line; }
+	public int pos() { return m_pos; }
+	public SymbolTable freeVariables() { return m_freeVariables; }
+	public List<FunctionIdentifier> callTargets() { return m_callTargets; }
+
+	public Expression(ExpressionKind aKind, int line, int pos)
+	{
+		m_kind = aKind;
+		m_line = line;
+		m_pos = pos;
+		m_callTargets = new ArrayList<FunctionIdentifier>();
+	}
+
+	public Expression(Expression toCopy)
+	{
+		m_kind = toCopy.m_kind;
+		m_line = toCopy.m_line;
+		m_pos = toCopy.m_pos;
+		m_callTargets = new ArrayList<FunctionIdentifier>(toCopy.callTargets());
+		m_type = toCopy.m_type;
+		m_freeVariables = new SymbolTable(toCopy.m_freeVariables);
+	}
+
+	public /*virtual*/ Expression Clone()
+	{
+		throw new NotImplementedException();
+	}
+
+	public void SetType(UlyssesType aType)
+	{
+		if (aType == null)
+			throw new ArgumentException();
+		m_type = aType;
+	}
+
+	public void SetFreeVariables(SymbolTable aSymTab)
+	{
+		m_freeVariables = aSymTab;
+	}
+
+	public ArrayList<ExpressionVariableIdentifier> GetUninitializedFreeVariables()
+	{
+		final ArrayList<ExpressionVariableIdentifier> result = new ArrayList<ExpressionVariableIdentifier>();
+		if (m_freeVariables != null)
+			for(final Identifier v: m_freeVariables.symbolList())
+			{
+				final ExpressionVariableIdentifier id = (ExpressionVariableIdentifier)v;
+				if (id.initialized() == false)
+					result.add(id);
+			}
+		return result;
+	}
+
+
+	@Override
+	public AstNodeTypeEnum nodeType() { return AstNodeTypeEnum.expression; }
+
+	@Override
+	public /*virtual*/ void Accept(IAstVisitor visitor)
+	{
+		throw new NotImplementedException();
+	}
+
+
+	/// <summary>
+	/// Calculates the arithmetic cover, i.e. the return type of the operation, given two types.
+	/// This is different from the cover-method defined at the type level.
+	/// Note: We do saturating operations on the type boundaries.
+	/// </summary>
+	public static UlyssesType ArithmeticCover(UlyssesType type1, UlyssesType type2, ExpressionKind op)
+	{
+		if (!type1.IsNumeric() || (type2 != null && !type2.IsNumeric()))
+			throw new ArgumentException();
+
+		if (type1 instanceof ValuedEnumType)
+			type1 = ((ValuedEnumType)type1).getIntType();
+		if (type2 instanceof ValuedEnumType)
+			type2 = ((ValuedEnumType)type2).getIntType();
+
+		AbstractRange result;
+		AbstractRange rangeType1 = null;
+		AbstractRange rangeType2 = null;
+		AbstractOperations operations;
+		final boolean resultIsFloat = type1.kind() == TypeKind.FloatType
+				|| op == ExpressionKind.div
+				|| (type2 != null && type2.kind() == TypeKind.FloatType);
+		if (resultIsFloat)
+		{
+			rangeType1 = new DoubleRange(
+				type1.kind() == TypeKind.IntType ? ((IntType)type1).rangeHigh() : ((FloatType)type1).high(),
+				type1.kind() == TypeKind.IntType ? ((IntType)type1).rangeLow() : ((FloatType)type1).low());
+			if (type2 != null)
+			{
+				rangeType2 = new DoubleRange(
+					type2.kind() == TypeKind.IntType ? ((IntType)type2).rangeHigh() : ((FloatType)type2).high(),
+					type2.kind() == TypeKind.IntType ? ((IntType)type2).rangeLow() : ((FloatType)type2).low());
+			}
+			operations = new SaturatedDoubleOperations();
+		}
+		else
+		{
+			rangeType1 = new IntegerRange(((IntType)type1).rangeHigh(), ((IntType)type1).rangeLow());
+			rangeType2 = new IntegerRange(((IntType)type2).rangeHigh(), ((IntType)type2).rangeLow());
+			operations = new SaturatedIntegerOperations();
+		}
+
+		switch (op)
+		{
+			case pow:
+			case prod:
+			case unminus:
+			case unplus:
+			case minus:
+			case sum:
+			case div:
+				result = operations.GenericArithmeticCover(rangeType1, rangeType2, op);
+				break;
+
+			case idiv:
+				if (resultIsFloat)
+					throw new ArgumentException();
+				assert(type2 != null);
+				result = operations.GenericArithmeticCover(rangeType1, rangeType2, op);
+				break;
+
+			case mod:
+				if (resultIsFloat)
+					throw new ArgumentException();
+				assert(type2 != null);
+				// FIXME: see http://mathforum.org/library/drmath/view/52343.html; LLVM only supports rem!
+				final boolean isSigned = ((IntegerRange)rangeType2).min < 0 || ((IntegerRange)rangeType1).min < 0;
+				result = new IntegerRange(((IntegerRange)rangeType2).max - 1, isSigned ? -((IntegerRange)rangeType2).max - 1 : 0);
+				break;
+
+			default:
+				throw new NotImplementedException();
+		}
+
+		if (resultIsFloat)
+			return new FloatType(
+					((DoubleRange)result).min,
+					((DoubleRange)result).max,
+					FloatType.defaultPrecision(),
+					null);
+		else
+			// this is crude, but see whether it works..
+			return new IntType(
+					((IntegerRange)result).min,
+					((IntegerRange)result).max,
+					null);
+	}
+
+
+	@Override
+	public String toString()
+	{
+		return toString(new OoaPrintVisitor(null));
+	}
+
+	public String toString(OoaPrintVisitor aFormatter) {
+		this.Accept(aFormatter);
+		return aFormatter.toString();
+	}
+}
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/IScope.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/IScope.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/IScope.java	(revision 2)
@@ -0,0 +1,40 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast;
+
+import org.momut.ooas.ast.identifiers.Identifier;
+
+/* All AST Elements that define some scope */
+public interface IScope extends IAst
+{
+	Identifier ResolveIdentifier(String aName);
+	IScope GetParentScope();
+	void SetParentScope(IScope parentScope);
+
+	void AddIdentifier(Identifier anIdentifier, Object tag);
+}
Index: trunk/compiler/cppAst/ast/expressions/ExistsQuantifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/ExistsQuantifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/ExistsQuantifier.hpp	(revision 2)
@@ -0,0 +1,53 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/Quantifier.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class ExistsQuantifier final
+	: public Quantifier
+{
+protected:
+	ExistsQuantifier():
+		Quantifier(ExpressionKind::exists)
+	{};
+	ExistsQuantifier(const ExistsQuantifier &toCopy):
+		Quantifier(toCopy)
+	{};
+
+	static ExistsQuantifier* create(ExpressionKind) {return new ExistsQuantifier();}
+	static ExistsQuantifier* createCopy(const ExistsQuantifier& toCopy) {return new ExistsQuantifier(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/IAst.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/IAst.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/IAst.java	(revision 2)
@@ -0,0 +1,34 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast;
+
+public interface IAst
+{
+	AstNodeTypeEnum nodeType();
+	void Accept(IAstVisitor visitor);
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ExistsQuantifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ExistsQuantifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ExistsQuantifier.java	(revision 2)
@@ -0,0 +1,55 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+public final class ExistsQuantifier extends Quantifier
+{
+	public ExistsQuantifier(Expression child, int line, int pos)
+	{
+		super (ExpressionKind.exists, child, line, pos);
+	}
+
+	public ExistsQuantifier(ExistsQuantifier toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new ExistsQuantifier(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/LeafExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/LeafExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/LeafExpression.java	(revision 2)
@@ -0,0 +1,68 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+///////////////////////////////////////////////
+///  === Leaf Expressions ===
+///
+public abstract class LeafExpression extends Expression
+{
+	public enum LeafTypeEnum {
+		unset(0),
+		bool(1),
+		integer(2),
+		real(3),
+		chr(4),
+		qval(5),
+		reference(6),
+		identifier(7),
+		type(8),
+		complex(9);
+
+		public final int integerValue; // do not change, this is needed by the backends! i.e. public API
+
+		private LeafTypeEnum(int val) {
+			integerValue = val;
+		}
+	}
+	protected LeafTypeEnum m_valueType;
+
+	public LeafTypeEnum valueType() { return m_valueType; }
+
+	public LeafExpression(LeafTypeEnum avalueType, ExpressionKind aKind, int line, int pos)
+	{
+		super(aKind, line, pos);
+		m_valueType = avalueType;
+	}
+
+	public LeafExpression(LeafExpression toCopy)
+	{
+		super(toCopy);
+		m_valueType = toCopy.m_valueType;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/BinaryOperator.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/BinaryOperator.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/BinaryOperator.java	(revision 2)
@@ -0,0 +1,79 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+///////////////////////////////////////////////
+///  === Binary Operator ===
+///
+public class BinaryOperator extends Expression
+{
+	protected Expression m_left;
+	protected Expression m_right;
+
+	public Expression left() { return m_left; }
+	public Expression right() { return m_right; }
+
+
+	public BinaryOperator(ExpressionKind aKind, Expression left, Expression right, int line, int pos)
+	{
+		super (aKind, line, pos);
+		m_left = left;
+		m_right = right;
+	}
+
+	public BinaryOperator(BinaryOperator toCopy)
+	{
+		super (toCopy);
+		m_left = toCopy.m_left;
+		m_right = toCopy.m_right;
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new BinaryOperator(this);
+	}
+
+	public void SetRightChild(Expression child)
+	{
+		m_right = child;
+	}
+
+	public void SetLeftChild(Expression child)
+	{
+		m_left = child;
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+}
Index: trunk/compiler/cppAst/ast/expressions/Expression.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/Expression.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/Expression.hpp	(revision 2)
@@ -0,0 +1,171 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <base/TiresiasObject.hpp>
+#include <ast/AstElement.hpp>
+#include <ast/types/Type.hpp>
+#include <cstdint>
+#include <ast/Containers.hpp>
+#include <ast/IAstVisitor.hpp>
+#include <base/Exceptions.hpp>
+
+
+namespace Ast {
+
+
+/**
+ * You must not change the assigned values as this
+ * needs to be kept in sync with the definitions in Argos!
+ */
+enum class ExpressionKind : std::uint8_t
+{
+	/*tern.*/
+	conditional = 0,
+	/*map binary*/
+	domresby = 1, domresto = 2, rngresby = 3, rngresto = 4, munion = 5,
+	/*set/list binary*/
+	conc = 6, diff = 7, inter = 8, elemin = 9, notelemin = 10, subset = 11, _union = 12,
+	/*numeric binary*/
+	div = 13, greater = 14, greaterequal = 15, idiv = 16, less = 17, lessequal = 18,
+	minus = 19, mod = 20, pow = 21, prod = 22, sum = 23,
+	/*bool binary*/
+	_and = 24, biimplies = 25, implies = 26, _or = 27,
+	/*other binary*/
+	equal = 28, notequal = 29, seqmod_mapoverride = 30,
+	/*map unary*/
+	dom = 31, range = 32, merge = 33,
+	/*set/list unary*/
+	card = 34, dconc = 35, dinter = 36, dunion = 37, elems = 38, head = 39,
+	inds = 40, len = 41, tail = 42,
+	/*unary numberic*/
+	unminus = 43, unplus = 44, _not = 45, abs = 46,
+	/*unary quantors*/
+	forall = 47, exists = 48,
+	/*Constructors*/
+	ListConstr = 49, SetConstr = 50, MapConstr = 51, TupleConstr = 52, ObjectConstr = 53, QValConstr = 54,
+	/* identifier */
+	Identifier = 55,
+	UnresolvedIdentifier = 56,
+	Type = 57,
+	/* tuple access and method call */
+	TupleMapAccess = 58, Call = 59,
+	/* point operator */
+	Access = 60,
+	/* primed */
+	Primed = 61,
+	/* cast */
+	Cast = 62,
+	/* fold */
+	foldLR = 63,
+	foldRL = 64,
+
+	/* values */
+	Value_Integer = 65,
+	Value_Bool = 66,
+	Value_Reference = 67,
+
+	EXPRESSIONKIND_LAST_ITEM = Value_Reference
+};
+
+#define EXPRESSIONKIND_NR_ITEMS ((std::uint8_t)ExpressionKind::EXPRESSIONKIND_LAST_ITEM + 1)
+
+
+class Expression:
+	public AstElement
+{
+protected:
+	typedef Expression* (*ConstrPtr)(ExpressionKind k);
+	typedef Expression* (*CopyConstrPtr) (const Expression& toCopy);
+
+	ExpressionKind m_kind;
+	Type* m_type;
+	std::int32_t m_line;
+	std::int32_t m_pos;
+	SymbolTable* m_freeVariables;
+	FunctionIdentifierList m_callTargets;
+
+	Expression(ExpressionKind kind):
+		AstElement(AstNodeTypeEnum::expression),
+		m_kind(kind),
+		m_type (nullptr),
+		m_line (-1),
+		m_pos  (-1),
+		m_freeVariables (nullptr)
+	{}
+	Expression(const Expression& toCopy):
+		AstElement(AstNodeTypeEnum::expression),
+		m_kind (toCopy.m_kind),
+		m_type (toCopy.m_type),
+		m_line (toCopy.m_line),
+		m_pos  (toCopy.m_pos),
+		m_freeVariables (toCopy.m_freeVariables)
+	{}
+	~Expression()
+	{}
+
+	static Base::FuncPtr s_exprVmt [2][EXPRESSIONKIND_NR_ITEMS];
+	static Expression* createVirtual(ExpressionKind k);
+	static Expression* createVirtual(const Expression& toCopy);
+public:
+	friend class Ast;
+
+	void init(
+			std::int32_t line,
+			std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef,
+			SymbolTable* symbTabRef)
+	{
+		m_line = line;
+		m_pos = pos;
+		m_type = typeRef;
+		m_callTargets.clear();
+		if (callTargetsIdentifierListRef != nullptr) {
+			for (auto& id: *callTargetsIdentifierListRef) {
+				IdentifierKind kind = id->kind();
+				if (kind != IdentifierKind::MethodIdentifier &&
+				    kind != IdentifierKind::NamedActionIdentifier)
+				{
+					throw new Base::InvalidArgumentException("Calltargets must be methods or actions.");
+				}
+				m_callTargets.push_back((FunctionIdentifier*)id);
+			}
+		}
+		m_freeVariables = symbTabRef;
+	}
+
+
+	ExpressionKind kind() const { return m_kind; };
+	Type* type() const { return m_type; };
+	std::int32_t line() const { return m_line; };
+	std::int32_t pos() const { return m_pos; };
+	SymbolTable* freeVariables() { return m_freeVariables; };
+	FunctionIdentifierList& callTargets() { return m_callTargets; };
+
+	void accept(IAstVisitor& visitor) override;
+};
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/QValConstructor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/QValConstructor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/QValConstructor.java	(revision 2)
@@ -0,0 +1,92 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import java.util.Arrays;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+///////////////////////////////////////////////
+///  Constructor: Qualitative Value
+///
+public final class QValConstructor extends TypeConstructionExpression
+{
+	public enum QValDeriv { DonTCare, Dec, Steady, Inc }
+
+	private Expression[] m_value;
+	private QValDeriv m_derivValue;
+
+	public Expression[] value() { return m_value; }
+	public QValDeriv valueDeriv() { return m_derivValue; }
+
+
+	public QValConstructor(int line, int pos)
+	{
+		super (ExpressionKind.QValConstr, line, pos);
+		m_value = new Expression[1];
+		m_value[0] = null;
+		m_derivValue = QValDeriv.DonTCare;
+	}
+
+	public QValConstructor(QValConstructor toCopy)
+	{
+		super (toCopy);
+		m_value = Arrays.copyOf(toCopy.m_value, toCopy.m_value.length);
+		m_derivValue = toCopy.m_derivValue;
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new QValConstructor(this);
+	}
+
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetValue(Expression aval)
+	{
+		m_value[0] = aval;
+	}
+
+	public void AddRange(Expression toRange)
+	{
+		Expression currVal = m_value[0];
+		m_value = new Expression[2];
+		m_value[0] = currVal;
+		m_value[1] = toRange;
+	}
+
+	public void SetDerivation(QValDeriv newValue)
+	{
+		m_derivValue = newValue;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ExpressionKind.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ExpressionKind.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ExpressionKind.java	(revision 2)
@@ -0,0 +1,76 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+public enum ExpressionKind
+{
+	/*tern.*/
+	conditional(0),
+	/*map binary*/
+	domresby(1), domresto(2), rngresby(3), rngresto(4), munion(5),
+	/*set/list binary*/
+	conc(6), diff(7), inter(8), elemin(9), notelemin(10), subset(11), union(12),
+	/*numeric binary*/
+	div(13), greater(14), greaterequal(15), idiv(16), less(17), lessequal(18),
+	minus(19), mod(20), pow(21), prod(22), sum(23),
+	/*bool binary*/
+	and(24), biimplies(25), implies(26), or(27),
+	/*other binary*/
+	equal(28), notequal(29), seqmod_mapoverride(30),
+	/*map unary*/
+	dom(31), range(32), merge(33),
+	/*set/list unary*/
+	card(34), dconc(35), dinter(36), dunion(37), elems(38), head(39),
+	inds(40), len(41), tail(42),
+	/*unary numberic*/
+	unminus(43), unplus(44), not(45), abs(46),
+	/*unary quantors*/
+	forall(47), exists(48),
+	/*Constructors*/
+	ListConstr(49), SetConstr(50), MapConstr(51), TupleConstr(52), ObjectConstr(53), QValConstr(54),
+	/* identifier */
+	Identifier(55), UnresolvedIdentifier(56), Type(57),
+	/* tuple access and method call */
+	TupleMapAccess(58), Call(59),
+	/* point operator */
+	Access(60),
+	/* primed */
+	Primed(61),
+	/* cast */
+	Cast(62),
+	/* fold */
+	foldLR(63), foldRL(64),
+	/* constant values */
+	Value(65);
+
+	public final int integerValue; // do not change, this is needed by the backends! i.e. public API
+
+	private ExpressionKind(int val) {
+		integerValue = val;
+	}
+}
Index: trunk/compiler/cppAst/ast/expressions/IdentifierExpression.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/IdentifierExpression.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/IdentifierExpression.hpp	(revision 2)
@@ -0,0 +1,72 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/LeafExpression.hpp>
+#include <ast/identifiers/Identifier.hpp>
+
+namespace Ast {
+
+class IdentifierExpression
+	: public LeafExpression
+{
+protected:
+	bool m_self;
+	Identifier* m_identifier;
+
+	IdentifierExpression():
+		LeafExpression(LeafTypeEnum::identifier, ExpressionKind::Identifier),
+		m_self (false),
+		m_identifier (nullptr)
+	{};
+	IdentifierExpression(const IdentifierExpression &toCopy):
+		LeafExpression(toCopy),
+		m_self (toCopy.m_self),
+		m_identifier (toCopy.m_identifier)
+	{};
+
+	static IdentifierExpression* create(ExpressionKind){return new IdentifierExpression();}
+	static IdentifierExpression* createCopy(const IdentifierExpression& toCopy) {return new IdentifierExpression(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef,
+				SymbolTable* symbTabRef, Identifier* identifierRef, bool isSelf)
+	{
+		LeafExpression::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef);
+		m_identifier = identifierRef;
+		m_self = isSelf;
+	}
+
+	Identifier* identifier() {return m_identifier;};
+	bool isSelf() const {return m_self;};
+	void setIsSelf(bool newValue) {m_self = newValue;};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+	void setIdentifier(Identifier* newIdentifier) {m_identifier = newIdentifier;};
+};
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/IdentifierExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/IdentifierExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/IdentifierExpression.java	(revision 2)
@@ -0,0 +1,81 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.Identifier;
+
+///////////////////////////////////////////////
+///  Some identifier
+///
+public class IdentifierExpression extends LeafExpression
+{
+	protected Identifier m_identifier;
+	protected boolean m_self;
+
+	public Identifier identifier() { return m_identifier; }
+	public boolean isSelf() { return m_self; }
+
+	public IdentifierExpression(Identifier anIdentifier, int line, int pos)
+	{
+		super(LeafTypeEnum.identifier, ExpressionKind.Identifier, line, pos);
+		m_identifier = anIdentifier;
+		if (anIdentifier != null)
+			m_type = m_identifier.type();
+		m_self = false;
+	}
+
+	public IdentifierExpression(IdentifierExpression toCopy)
+	{
+		super(toCopy);
+		m_identifier = toCopy.m_identifier;
+		m_self = toCopy.m_self;
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new IdentifierExpression(this);
+	}
+
+	public void setIsSelf(boolean newValue)
+	{
+		m_self = newValue;
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetIdentifier(Identifier newIdentifier)
+	{
+		m_identifier = newIdentifier;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ListConstructor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ListConstructor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ListConstructor.java	(revision 2)
@@ -0,0 +1,129 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import java.util.ArrayList;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.parser.SymbolTable;
+
+///////////////////////////////////////////////
+///  Constructor: List
+///
+public final class ListConstructor extends TypeConstructionExpression implements IScope
+{
+	private ArrayList<Expression> m_elements;
+	private IScope m_parentScope;
+	private final SymbolTable m_comprehensionVars;
+	private Expression m_comprehension;
+	private boolean m_hasComprehension = false;
+
+	public ArrayList<Expression> elements() { return m_elements; }
+	public Expression comprehension() { return m_comprehension; }
+	public boolean hasComprehension() { return m_hasComprehension; }
+	public SymbolTable comprehensionVariables() { return m_comprehensionVars; }
+
+	public ListConstructor(int line, int pos)
+	{
+		super (ExpressionKind.ListConstr, line, pos);
+		m_elements = new ArrayList<Expression>();
+		m_comprehensionVars = new SymbolTable();
+	}
+
+	public ListConstructor(ListConstructor toCopy)
+	{
+		super (toCopy);
+		m_elements = new ArrayList<Expression>(toCopy.m_elements);
+		m_parentScope = toCopy.m_parentScope;
+		m_comprehensionVars = new SymbolTable(toCopy.m_comprehensionVars);
+		m_comprehension = toCopy.m_comprehension;
+		m_hasComprehension = toCopy.m_hasComprehension;
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new ListConstructor(this);
+	}
+
+	public void AddElement(Expression anElement)
+	{
+		m_elements.add(anElement);
+	}
+
+	public void SetComprehension(Expression comprehension)
+	{
+		m_comprehension = comprehension;
+	}
+
+	public void SetHasComprehension(boolean flag)
+	{
+		m_hasComprehension = flag;
+	}
+
+	@Override
+	public Identifier ResolveIdentifier(String aName)
+	{
+		if (m_comprehensionVars.Defined(aName))
+			return m_comprehensionVars.Get(aName);
+		else
+			return null;
+	}
+
+	@Override
+	public IScope GetParentScope()
+	{
+		return m_parentScope;
+	}
+
+	@Override
+	public void SetParentScope(IScope parentScope)
+	{
+		m_parentScope = parentScope;
+	}
+
+	@Override
+	public void AddIdentifier(Identifier anIdentifier, Object tag)
+	{
+		m_comprehensionVars.AddIdentifier(anIdentifier);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetElements(ArrayList<Expression> newElements)
+	{
+		m_elements = newElements;
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ObjectConstructor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ObjectConstructor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ObjectConstructor.java	(revision 2)
@@ -0,0 +1,96 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import java.util.ArrayList;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.types.OoActionSystemInstance;
+import org.momut.ooas.ast.types.OpaqueType;
+
+public final class ObjectConstructor extends TypeConstructionExpression
+{
+	private final ArrayList<OoActionSystemInstance> m_instances;
+	private int m_currentInstance;
+	private String m_fixedObjectName;
+
+	public int currentInstance() { return m_currentInstance; }
+	public ArrayList<OoActionSystemInstance> instances() { return m_instances; }
+	public String givenObjectName() { return m_fixedObjectName; }
+
+	public void ResetCurrentInstance() { m_currentInstance = 0; }
+
+	public ObjectConstructor(OpaqueType aType, int line, int pos)
+	{
+		super (ExpressionKind.ObjectConstr, line, pos);
+		SetType(aType);
+		m_instances = new ArrayList<OoActionSystemInstance>();
+		m_currentInstance = 0;
+	}
+
+	public ObjectConstructor(OpaqueType aType, String aName, int line, int pos)
+	{
+		super (ExpressionKind.ObjectConstr, line, pos);
+		SetType(aType);
+		m_instances = new ArrayList<OoActionSystemInstance>();
+		m_currentInstance = 0;
+		m_fixedObjectName = aName;
+	}
+
+
+	public ObjectConstructor(ObjectConstructor toCopy)
+	{
+		super (toCopy);
+		m_instances = new ArrayList<OoActionSystemInstance>( toCopy.m_instances);
+		m_currentInstance = toCopy.m_currentInstance;
+		m_fixedObjectName = toCopy.m_fixedObjectName;
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new ObjectConstructor(this);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void AddInstance(OoActionSystemInstance anInstance)
+	{
+		m_instances.add(anInstance);
+	}
+
+	public OoActionSystemInstance GetNextInstance()
+	{
+		OoActionSystemInstance result = m_instances.get(m_currentInstance);
+		m_currentInstance++;
+		return result;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/Quantifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/Quantifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/Quantifier.java	(revision 2)
@@ -0,0 +1,87 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.parser.SymbolTable;
+
+///////////////////////////////////////////////
+///  Quantifier
+///
+public abstract class Quantifier extends UnaryOperator implements IScope
+{
+	private final SymbolTable m_symbols;
+	private IScope m_parentScope;
+
+	public SymbolTable symbols() { return m_symbols; }
+
+
+	public Quantifier(ExpressionKind aKind, Expression child, int line, int pos)
+	{
+		super (aKind, child, line, pos);
+		m_symbols = new SymbolTable();
+	}
+
+	public Quantifier(Quantifier toCopy)
+	{
+		super (toCopy);
+		m_symbols = new SymbolTable(toCopy.m_symbols);
+		m_parentScope = toCopy.m_parentScope;
+	}
+
+
+	@Override
+	public Identifier ResolveIdentifier(String aName)
+	{
+		if (m_symbols.Defined(aName))
+			return m_symbols.Get(aName);
+		else
+			return null;
+	}
+
+	@Override
+	public IScope GetParentScope()
+	{
+		return m_parentScope;
+	}
+
+	@Override
+	public void SetParentScope(IScope parentScope)
+	{
+		m_parentScope = parentScope;
+	}
+
+	@Override
+	public void AddIdentifier(Identifier anIdentifier, Object tag)
+	{
+		m_symbols.AddIdentifier(anIdentifier);
+	}
+
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TernaryOperator.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TernaryOperator.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TernaryOperator.java	(revision 2)
@@ -0,0 +1,93 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+
+
+///////////////////////////////////////////////
+///  === Ternary Operator ===
+///
+public final class TernaryOperator extends Expression
+{
+	private Expression m_left;
+	private Expression m_mid;
+	private Expression m_right;
+	private final IScope m_definingScope;
+
+	public Expression left() { return m_left; }
+	public Expression mid() { return m_mid; }
+	public Expression right() { return m_right; }
+	public IScope definingScope() { return m_definingScope; }
+
+	public TernaryOperator(ExpressionKind aKind, Expression left, Expression mid, Expression right, int line, int pos, IScope aScope)
+	{
+		super (aKind, line, pos);
+		m_left = left;
+		m_mid = mid;
+		m_right = right;
+		m_definingScope = aScope;
+	}
+
+	public TernaryOperator(TernaryOperator toCopy)
+	{
+		super (toCopy);
+		m_left = toCopy.m_left;
+		m_mid = toCopy.m_mid;
+		m_right = toCopy.m_right;
+		m_definingScope = toCopy.definingScope();
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new TernaryOperator(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetLeftChild(Expression newExpression)
+	{
+		m_left = newExpression;
+	}
+	public void SetMidChild(Expression newExpression)
+	{
+		m_mid = newExpression;
+	}
+	public void SetRightChild(Expression newExpression)
+	{
+		m_right = newExpression;
+	}
+
+}
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TupleMapAccessExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TupleMapAccessExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TupleMapAccessExpression.java	(revision 2)
@@ -0,0 +1,73 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+
+///////////////////////////////////////////////
+///  Tuple and Map Access "[...]"
+///
+public final class TupleMapAccessExpression extends UnaryOperator
+{
+	private Expression m_argument;
+
+	public Expression argument() { return m_argument; }
+
+	public TupleMapAccessExpression(Expression child, Expression argument, int line, int pos)
+	{
+		super (ExpressionKind.TupleMapAccess, child, line, pos);
+		m_argument = argument;
+	}
+
+	public TupleMapAccessExpression(TupleMapAccessExpression toCopy)
+	{
+		super (toCopy);
+		m_argument = toCopy.m_argument;
+	}
+
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new TupleMapAccessExpression(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetArgument(Expression newarg)
+	{
+		if (newarg == null)
+			throw new ArgumentException();
+		m_argument = newarg;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TypeExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TypeExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TypeExpression.java	(revision 2)
@@ -0,0 +1,59 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.types.UlyssesType;
+
+///////////////////////////////////////////////
+///  Some identifier
+///
+public class TypeExpression extends LeafExpression
+{
+	public TypeExpression(UlyssesType atype, int line, int pos)
+	{
+		super (LeafTypeEnum.type, ExpressionKind.Type, line, pos);
+		m_type = atype;
+	}
+
+	public TypeExpression(TypeExpression toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new TypeExpression(this);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/cppAst/ast/expressions/ObjectConstructor.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/ObjectConstructor.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/ObjectConstructor.hpp	(revision 2)
@@ -0,0 +1,88 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/TypeConstructionExpression.hpp>
+#include <ast/IAstVisitor.hpp>
+#include <ast/types/ActionSystemType.hpp>
+#include <deque>
+#include <cstdint>
+#include <string>
+
+namespace Ast {
+
+class ObjectConstructor final
+	: public TypeConstructionExpression
+{
+protected:
+	/*std::int32_t*/ ActionSystemInstanceList::size_type m_currentInstance;
+	ActionSystemInstanceList m_instances;
+	std::string m_fixedObjectName;
+
+	ObjectConstructor():
+		TypeConstructionExpression(ExpressionKind::ObjectConstr),
+		m_currentInstance (0),
+		m_instances(),
+		m_fixedObjectName ("")
+	{};
+	ObjectConstructor(const ObjectConstructor &toCopy):
+		TypeConstructionExpression(toCopy),
+		m_currentInstance(toCopy.m_currentInstance),
+		m_instances(toCopy.m_instances),
+		m_fixedObjectName (toCopy.m_fixedObjectName)
+	{};
+
+	static ObjectConstructor* create(ExpressionKind){return new ObjectConstructor();}
+	static ObjectConstructor* createCopy(const ObjectConstructor& toCopy){return new ObjectConstructor(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef, SymbolTable* symbTabRef,
+			ActionSystemInstanceList* instanceList, std::uint32_t currentInstance, const char* name)
+	{
+		TypeConstructionExpression::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef);
+		m_instances = std::move(*instanceList);
+		m_currentInstance = currentInstance;
+		m_fixedObjectName = name == nullptr ? "" : name;
+	}
+
+
+	std::uint32_t currentInstance() const {return (std::uint32_t) m_currentInstance;};
+	ActionSystemInstanceList& instances() {return m_instances;};
+	std::string givenObjectName() {return m_fixedObjectName;};
+	void resetCurrentInstance() {m_currentInstance = 0;};
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+	void addInstance(ActionSystemInstance* anInstance) {m_instances.push_back(anInstance);};
+	ActionSystemInstance* GetNextInstance() {
+		ActionSystemInstance* result = m_instances[m_currentInstance];
+		m_currentInstance++;
+		return result;
+	};
+};
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/UnresolvedIdentifierExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/UnresolvedIdentifierExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/UnresolvedIdentifierExpression.java	(revision 2)
@@ -0,0 +1,71 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+
+///////////////////////////////////////////////
+///  Some unresolved identifier
+///
+public final class UnresolvedIdentifierExpression extends IdentifierExpression
+{
+	private final IScope m_scope;
+	private final String m_tokenText;
+
+
+	public String tokenText() { return m_tokenText; }
+	public IScope scope() { return m_scope; }
+
+	public UnresolvedIdentifierExpression(Token identifier, IScope aScope)
+	{
+		super (null, identifier.getLine(), identifier.getCharPositionInLine());
+		m_kind = ExpressionKind.UnresolvedIdentifier;
+		m_tokenText = identifier.getText();
+		m_scope = aScope;
+	}
+
+	public UnresolvedIdentifierExpression(UnresolvedIdentifierExpression toCopy)
+	{
+		super (toCopy);
+		m_scope = toCopy.m_scope;
+		m_tokenText = toCopy.m_tokenText;
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new UnresolvedIdentifierExpression(this);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/AttributeIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/AttributeIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/AttributeIdentifier.java	(revision 2)
@@ -0,0 +1,92 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+
+public final class AttributeIdentifier extends ValueReferenceIdentifier
+{
+	private Expression m_initializer;
+	private final boolean m_isStatic;
+	private final boolean m_isObservable;    // used for qualitative values
+	private final boolean m_isControllable;  // used for qualitative values
+
+	public Expression initializer() { return m_initializer; }
+	public boolean isStatic() { return m_isStatic; }
+	public boolean isObservable() { return m_isObservable; }
+	public boolean isControllable() { return m_isControllable; }
+
+	public AttributeIdentifier(Token aToken,
+			UlyssesType aType,
+			IScope aDefiningScope,
+			Expression anInitializer,
+			boolean isStatic,
+			boolean isObservable,
+			boolean isControllable)
+	{
+		super(aToken, aType, IdentifierKind.AttributeIdentifier, aDefiningScope);
+		m_initializer = anInitializer;
+		m_isStatic = isStatic;
+		m_isControllable = isControllable;
+		m_isObservable = isObservable;
+	}
+
+	public AttributeIdentifier(AttributeIdentifier toCopy)
+	{
+		super(toCopy);
+		m_initializer = toCopy.initializer();
+		m_isStatic = toCopy.m_isStatic;
+		m_isControllable = toCopy.m_isControllable;
+		m_isObservable = toCopy.m_isObservable;
+	}
+
+
+	@Override
+	public /*override*/ Identifier Clone()
+	{
+		return new AttributeIdentifier(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetInitializer(Expression newExpr)
+	{
+		if (newExpr == null)
+			throw new ArgumentException();
+		m_initializer = newExpr;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TupleConstructor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TupleConstructor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TupleConstructor.java	(revision 2)
@@ -0,0 +1,87 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.Identifier;
+
+///////////////////////////////////////////////
+///  Constructor: Tuple
+///
+public final class TupleConstructor extends TypeConstructionExpression
+{
+	private ArrayList<Expression> m_values;
+	private final Identifier m_tupleType;
+	private boolean m_matcher;
+
+	public ArrayList<Expression> values() { return m_values; }
+	public Identifier tupleType() { return m_tupleType; }
+	public boolean isMatcher() { return m_matcher; }
+
+
+	public TupleConstructor(Identifier aType, List<Expression> exprs, int line, int pos)
+	{
+		super (ExpressionKind.TupleConstr, line, pos);
+		m_tupleType = aType;
+		m_values = new ArrayList<Expression>(exprs);
+		m_matcher = false;
+	}
+
+	public TupleConstructor(TupleConstructor toCopy)
+	{
+		super (toCopy);
+		m_values = new ArrayList<Expression>(toCopy.m_values);
+		m_tupleType = toCopy.m_tupleType;
+		m_matcher = toCopy.m_matcher;
+	}
+
+	public void SetIsMatcher(boolean newVal)
+	{
+		m_matcher = newVal;
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new TupleConstructor(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetTupleValues(ArrayList<Expression> values)
+	{
+		m_values = values;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/EnumIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/EnumIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/EnumIdentifier.java	(revision 2)
@@ -0,0 +1,82 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.EnumType;
+
+public final class EnumIdentifier extends ValueIdentifier
+{
+	private int value;
+	private final boolean haveValue;
+
+	public int Value() { return value; }
+	public boolean HaveValue() { return haveValue; }
+
+
+	public EnumIdentifier(Token aToken,
+			EnumType aType,
+			IScope aDefiningScope)
+	{
+		super(aToken, aType, IdentifierKind.EnumIdentifier, aDefiningScope);
+		haveValue = false;
+	}
+
+
+	public EnumIdentifier(Token aToken,
+			int aValue,
+			EnumType aType,
+			IScope aDefiningScope)
+	{
+		super(aToken, aType, IdentifierKind.EnumIdentifier, aDefiningScope);
+		haveValue = true;
+		value = aValue;
+	}
+
+
+	public EnumIdentifier(EnumIdentifier toCopy)
+	{
+		super(toCopy);
+		value = toCopy.value;
+		haveValue = toCopy.haveValue;
+	}
+
+
+	@Override
+	public /*override*/ Identifier Clone()
+	{
+		return this;
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/cppAst/ast/expressions/TernaryOperator.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/TernaryOperator.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/TernaryOperator.hpp	(revision 2)
@@ -0,0 +1,86 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/Expression.hpp>
+#include <ast/IScope.hpp>
+
+namespace Ast {
+
+class TernaryOperator final
+	: public Expression
+{
+protected:
+	Expression* m_left;
+	Expression* m_mid;
+	Expression* m_right;
+	IScope* m_definingScope;
+
+	TernaryOperator(ExpressionKind kind):
+		Expression(kind),
+		m_left (nullptr),
+		m_mid (nullptr),
+		m_right(nullptr),
+		m_definingScope (nullptr)
+	{}
+	TernaryOperator(const TernaryOperator& toCopy):
+		Expression(toCopy),
+		m_left (toCopy.m_left),
+		m_mid (toCopy.m_mid),
+		m_right(toCopy.m_right),
+		m_definingScope (toCopy.m_definingScope)
+	{}
+
+	static TernaryOperator* create(ExpressionKind k){return new TernaryOperator(k);}
+	static TernaryOperator* createCopy(const TernaryOperator& toCopy){return new TernaryOperator(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef,
+				SymbolTable* symbTabRef, Expression* left, Expression* mid,
+				Expression* right, IScope* defScopeRef)
+	{
+		Expression::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef);
+		m_left = left;
+		m_mid = mid;
+		m_right = right;
+		m_definingScope = defScopeRef;
+	}
+
+
+	Expression* left() {return m_left;};
+	Expression* mid() {return m_mid;};
+	Expression* right() {return m_right;};
+	IScope* definingScope() {return m_definingScope;};
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+	void setLeftChild(Expression* newExpression) {m_left = newExpression;};
+	void setMidChild(Expression* newExpression) {m_mid = newExpression;};
+	void setRightChild(Expression* newExpression) {m_right = newExpression;};
+};
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/FunctionIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/FunctionIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/FunctionIdentifier.java	(revision 2)
@@ -0,0 +1,80 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+
+public abstract class FunctionIdentifier extends Scope
+{
+	private Statement m_body;
+	private ArrayList<ParameterIdentifier> m_parameter = new ArrayList<ParameterIdentifier>();
+
+	public Statement body() { return m_body; }
+	public List<ParameterIdentifier> parameter() { return m_parameter; }
+
+
+	public FunctionIdentifier(Token aToken,
+			UlyssesType aType,
+			IdentifierKind aKind,
+			IScope aDefiningScope)
+	{
+		super (aToken, aType, aKind, aDefiningScope);
+	}
+
+	public FunctionIdentifier(FunctionIdentifier toCopy)
+	{
+		super (toCopy);
+		m_body = toCopy.m_body;
+		m_parameter = new ArrayList<ParameterIdentifier>(toCopy.m_parameter);
+	}
+
+	public void SetBody(Statement body)
+	{
+		m_body = body;
+		if (m_body instanceof IScope) {
+			final IScope s = (IScope) m_body;
+			if (s.GetParentScope() == null)
+				s.SetParentScope(this);
+			else if (s.GetParentScope() != this)
+				throw new InternalCompilerException("Internal Error: Methodbody has parent set to different method than it was added to.");
+		}
+	}
+
+	public void AddParameter(ParameterIdentifier aParameter)
+	{
+		m_parameter.add(aParameter);
+		AddIdentifier(aParameter, null);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/IdentifierKind.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/IdentifierKind.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/IdentifierKind.java	(revision 2)
@@ -0,0 +1,51 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+public enum IdentifierKind
+{
+	TypeIdentifier(0),               // some named type
+	EnumIdentifier(1),               // identifier of enumerated type
+	LandmarkIdentifier(2),           // landmark
+	AttributeIdentifier(3),          // global attribute
+	LocalVariableIdentifier(4),      // local variable
+	ParameterIdentifier(5),          // method/named action argument
+	ExpressionVariableIdentifier(6), // var in an expression
+	MethodIdentifier(7),             // a method
+	NamedActionIdentifier(8),        // a named action
+	Module(9),                       // the main module - actually this has no name...
+	List(10),
+	Constant(11),
+	MainModule(12);
+
+	public final int integerValue; // do not change, this is needed by the backends! i.e. public API
+
+	private IdentifierKind(int val) {
+		integerValue = val;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/UnaryOperator.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/UnaryOperator.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/UnaryOperator.java	(revision 2)
@@ -0,0 +1,106 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+
+
+///////////////////////////////////////////////
+///  === Unary Operators ===
+///
+public class UnaryOperator extends Expression
+{
+	private Expression m_child;
+
+	public Expression child() { return m_child; }
+
+	public UnaryOperator(ExpressionKind aKind, Expression child, int line, int pos)
+	{
+		super (aKind, line, pos);
+		m_child = child;
+	}
+
+	public UnaryOperator(UnaryOperator toCopy)
+	{
+		super (toCopy);
+		m_child = toCopy.m_child;
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new UnaryOperator(this);
+	}
+
+	public void SetChild(Expression child)
+	{
+		m_child = child;
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public static Expression CoerceUp(Expression anExpr, UlyssesType target)
+	{
+		if (target == null)
+			throw new ArgumentException();
+
+		if (anExpr.kind() == ExpressionKind.Value
+				&& anExpr.type().kind() == target.kind()
+				&& UlyssesType.TypeEqual(UlyssesType.CoverType(anExpr.type(), target),target))
+		{
+			// if we are widening the range of a type assigned to a value, then just set the
+			// new type and skip constructing a new node.
+			anExpr.SetType(target);
+			return anExpr;
+		}
+		else
+		{
+			final UnaryOperator result = new UnaryOperator(ExpressionKind.Cast, anExpr, anExpr.line(), anExpr.pos());
+			result.SetType(target);
+			return result;
+		}
+	}
+
+	public static Expression TryCoerceUp(Expression anExpr, UlyssesType target)
+	{
+		if (!UlyssesType.TypeEqual(anExpr.type(), target))
+		{
+			return CoerceUp(anExpr, target);
+		}
+		else
+			return anExpr;
+	}
+
+}
+
Index: trunk/compiler/cppAst/ast/expressions/TypeConstructionExpression.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/TypeConstructionExpression.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/TypeConstructionExpression.hpp	(revision 2)
@@ -0,0 +1,43 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/LeafExpression.hpp>
+
+namespace Ast {
+
+class TypeConstructionExpression
+	: public LeafExpression
+{
+protected:
+	TypeConstructionExpression(ExpressionKind kind):
+		LeafExpression(LeafTypeEnum::complex,kind)
+	{};
+	TypeConstructionExpression(const TypeConstructionExpression &toCopy):
+		LeafExpression(toCopy)
+	{};
+};
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/LandmarkIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/LandmarkIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/LandmarkIdentifier.java	(revision 2)
@@ -0,0 +1,60 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.QrType;
+
+public final class LandmarkIdentifier extends ValueIdentifier
+{
+	public LandmarkIdentifier(Token aToken,
+			QrType aType,
+			IScope aDefiningScope)
+	{
+		super(aToken, aType, IdentifierKind.LandmarkIdentifier, aDefiningScope);
+	}
+
+	public LandmarkIdentifier(LandmarkIdentifier toCopy)
+	{
+		super(toCopy);
+	}
+
+	@Override
+	public /*override*/ Identifier Clone()
+	{
+		return this;
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/cppAst/ast/expressions/ValueExpression.hpp
===================================================================
--- trunk/compiler/cppAst/ast/expressions/ValueExpression.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/expressions/ValueExpression.hpp	(revision 2)
@@ -0,0 +1,137 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/expressions/LeafExpression.hpp>
+#include <cstdint>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+template <class T>
+class ValueExpression
+	: public LeafExpression
+{
+protected:
+	T m_value;
+
+	ValueExpression(LeafTypeEnum type, ExpressionKind k):
+		LeafExpression(type, k),
+		m_value ()
+	{};
+	ValueExpression(const ValueExpression &toCopy):
+		LeafExpression(toCopy),
+		m_value(toCopy.m_value)
+	{};
+public:
+	T value() {return m_value;};
+};
+
+class BoolValueExpression final
+	: public ValueExpression<bool>
+{
+protected:
+	BoolValueExpression():
+		ValueExpression(LeafTypeEnum::_bool, ExpressionKind::Value_Bool)
+	{};
+	BoolValueExpression(const BoolValueExpression& toCopy):
+		ValueExpression(toCopy)
+	{};
+
+	static BoolValueExpression* create(ExpressionKind) {return new BoolValueExpression();}
+	static BoolValueExpression* createCopy(const BoolValueExpression& toCopy) {return new BoolValueExpression(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos, Type* typeRef,
+			IdentifierList* callTargetsIdentifierListRef, SymbolTable* symbTabRef, bool value)
+	{
+		Expression::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef);
+		m_value = value;
+	}
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+
+class IntValueExpression final
+	: public ValueExpression<std::int64_t>
+{
+protected:
+	IntValueExpression():
+		ValueExpression(LeafTypeEnum::integer, ExpressionKind::Value_Integer)
+	{};
+	IntValueExpression(const IntValueExpression& toCopy):
+		ValueExpression(toCopy)
+	{};
+
+	static IntValueExpression* create(ExpressionKind) {return new IntValueExpression();}
+	static IntValueExpression* createCopy(const IntValueExpression& toCopy) {return new IntValueExpression(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos,
+			Type* typeRef,IdentifierList* callTargetsIdentifierListRef,
+				SymbolTable* symbTabRef, std::int64_t value)
+	{
+		Expression::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef);
+		m_value = value;
+	}
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+
+class RefValueExpression final
+	: public ValueExpression<void*>
+{
+protected:
+	RefValueExpression():
+		ValueExpression(LeafTypeEnum::reference, ExpressionKind::Value_Reference)
+	{};
+	RefValueExpression(const RefValueExpression& toCopy):
+		ValueExpression(toCopy)
+	{};
+
+	static RefValueExpression* create(ExpressionKind) {return new RefValueExpression();}
+	static RefValueExpression* createCopy(const RefValueExpression& toCopy) {return new RefValueExpression(toCopy);}
+public:
+	friend class Ast;
+	friend class Expression;
+
+	void init(std::int32_t line, std::int32_t pos, Type* typeRef,
+			IdentifierList* callTargetsIdentifierListRef, SymbolTable* symbTabRef, void* value)
+	{
+		Expression::init(line,pos,typeRef,callTargetsIdentifierListRef, symbTabRef);
+		m_value = value;
+	}
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+
+// skip:
+// LeafTypeEnum::real;
+// LeafTypeEnum::chr;
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/MainModule.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/MainModule.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/MainModule.java	(revision 2)
@@ -0,0 +1,61 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.types.ActionSystem;
+
+public final class MainModule extends Module
+{
+	private IdentifierList m_systemDescription;
+	private ActionSystem m_instance;
+
+	public IdentifierList systemDescription() { return m_systemDescription; }
+	public ActionSystem instance() { return m_instance; }
+
+	public MainModule()
+	{
+		m_systemDescription = null;
+	}
+
+	public void SetSystemDescription(IdentifierList aDescr)
+	{
+		m_systemDescription = aDescr;
+	}
+
+	public void SetInstance(ActionSystem anObject)
+	{
+		m_instance = anObject;
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ConstantIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ConstantIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ConstantIdentifier.java	(revision 2)
@@ -0,0 +1,71 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.expressions.Expression;
+
+public final class ConstantIdentifier extends ValueIdentifier
+{
+	private Expression m_value;
+
+	public Expression Value() { return m_value; }
+
+	public ConstantIdentifier(Token aToken,
+			Expression value,
+			IScope aDefiningScope)
+	{
+		super(aToken, null, IdentifierKind.Constant, aDefiningScope);
+		m_value = value;
+	}
+
+	public ConstantIdentifier(ConstantIdentifier toCopy)
+	{
+		super(toCopy);
+		m_value = toCopy.m_value;
+	}
+
+	public void SetValue(Expression aValue)
+	{
+		m_value = aValue;
+	}
+
+	@Override
+	public /*override*/ Identifier Clone()
+	{
+		return this;
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/Module.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/Module.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/Module.java	(revision 2)
@@ -0,0 +1,52 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+public class Module extends Scope
+{
+	//protected List<OpaqueType> m_typesToFixUp;
+	//protected List<Expression> m_referencesToResolve;
+
+	//public List<OpaqueType> typesToFixUp { get { return m_typesToFixUp; } }
+	//public List<Expression> referencesToResolve { get { return m_referencesToResolve; } }
+
+	public Module()
+	{
+		super (".Module", null, IdentifierKind.Module, null);
+		//m_typesToFixUp = new List<OpaqueType>();
+		// m_referencesToResolve = new List<Expression>();
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/NondetIdentifierList.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/NondetIdentifierList.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/NondetIdentifierList.java	(revision 2)
@@ -0,0 +1,51 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+
+public final class NondetIdentifierList extends IdentifierList
+{
+	public NondetIdentifierList()
+	{
+		super (IdentifierListType.nondeterministic);
+	}
+
+	public NondetIdentifierList(IdentifierList aParent)
+	{
+		super (IdentifierListType.nondeterministic);
+		if (aParent != null)
+			aParent.AddElement(this);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/cppAst/ast/identifiers/EnumIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/EnumIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/EnumIdentifier.hpp	(revision 2)
@@ -0,0 +1,76 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#pragma once
+
+#include <cstdint>
+#include <ast/identifiers/ValueIdentifier.hpp>
+#include <ast/IScope.hpp>
+#include <ast/types/Type.hpp>
+
+namespace Ast {
+
+class EnumIdentifier final
+	: public ValueIdentifier
+{
+protected:
+	std::int32_t m_value;
+	bool m_haveValue;
+
+	EnumIdentifier() :
+		ValueIdentifier(IdentifierKind::EnumIdentifier),
+		m_value (-1),
+		m_haveValue (false)
+	{};
+
+	EnumIdentifier(const EnumIdentifier& toCopy) :
+		ValueIdentifier (toCopy),
+		m_value (toCopy.m_value),
+		m_haveValue (toCopy.m_haveValue)
+	{};
+
+	static EnumIdentifier* create() {return new EnumIdentifier();}
+	static EnumIdentifier* createCopy(const EnumIdentifier& toCopy) {return new EnumIdentifier(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	std::int32_t value() const { return m_value; };
+	bool haveValue() const { return m_haveValue; };
+
+	void init(std::int32_t line, std::int32_t col, const char* text,
+			IScope* scopeRef, Type* typeRef, bool haveValue,
+			std::int32_t value)
+	{
+		ValueIdentifier::init(line, col, text, scopeRef, typeRef);
+		m_value = value;
+		m_haveValue = haveValue;
+	}
+
+	void accept(IAstVisitor& visitor) override
+	{
+		visitor.visit(this);
+	}
+};
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/PrioIdentifierList.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/PrioIdentifierList.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/PrioIdentifierList.java	(revision 2)
@@ -0,0 +1,50 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+public final class PrioIdentifierList extends IdentifierList
+{
+	public PrioIdentifierList()
+	{
+		super (IdentifierListType.prioritized);
+	}
+
+	public PrioIdentifierList(IdentifierList aParent)
+	{
+		super (IdentifierListType.prioritized);
+		if (aParent != null)
+			aParent.AddElement(this);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/Identifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/Identifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/Identifier.java	(revision 2)
@@ -0,0 +1,142 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.AstNode;
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+
+/* ABSTRACT class Identifier.
+ * */
+public abstract class Identifier extends AstNode implements IAst, Comparable<Identifier>
+{
+	protected int m_line;
+	protected int m_column;
+	protected IScope m_definingScope;
+	protected IdentifierKind m_identifierKind;
+	protected String m_tokenText;
+	protected UlyssesType m_Type;
+
+	// basic attributes of an Identifier
+	public final IdentifierKind kind() { return m_identifierKind; } // kind of identifier
+	public final UlyssesType type() { return m_Type; }   // type of identifier
+	public final IScope definingScope() { return m_definingScope; } // scope where it's defined
+
+	// from lexer
+	public final String tokenText() { return m_tokenText; }
+	public final int line() { return m_line; }
+	public final int column() { return m_column; }
+
+	@Override
+	public AstNodeTypeEnum nodeType() { return AstNodeTypeEnum.identifier; }
+
+
+	public Identifier(Token aToken,
+			UlyssesType aType,
+			IdentifierKind aKind,
+			IScope aDefiningScope)
+	{
+		m_tokenText = aToken.getText();
+		m_line = aToken.getLine();
+		m_column = aToken.getCharPositionInLine();
+		m_Type = aType;
+		m_identifierKind = aKind;
+		m_definingScope = aDefiningScope;
+	}
+
+	public Identifier(String name, UlyssesType aType, IdentifierKind aKind, IScope aDefiningScope)
+	{
+		m_tokenText = name;
+		m_line = 0;
+		m_column = 0;
+		m_Type = aType;
+		m_identifierKind = aKind;
+		m_definingScope = aDefiningScope;
+	}
+
+	public Identifier(Identifier toCopy)
+	{
+		m_tokenText = toCopy.m_tokenText;
+		m_line = toCopy.m_line;
+		m_column = toCopy.m_column;
+		m_Type = toCopy.m_Type;
+		m_identifierKind = toCopy.m_identifierKind;
+		m_definingScope = toCopy.m_definingScope;
+	}
+
+	public /*virtual*/ Identifier Clone()
+	{
+		throw new NotImplementedException();
+	}
+
+
+	@Override
+	public /*virtual*/ void Accept(IAstVisitor visitor)
+	{
+		throw new NotImplementedException();
+	}
+
+	public final void SetType(UlyssesType aType)
+	{
+		if (aType == null)
+			throw new ArgumentException("New type can not be null.");
+
+		m_Type = aType;
+	}
+
+	public final void SetTokenText(String aText)
+	{
+		m_tokenText = aText;
+	}
+
+	@Override
+	public /*override*/ String toString()
+	{
+		return tokenText();
+	}
+
+	@Override
+	public int compareTo(Identifier obj)
+	{
+		return tokenText().compareTo(obj.toString());
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (obj instanceof Identifier)
+			return tokenText() == ((Identifier) obj).tokenText();
+		else
+			return false;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/SelfTypeIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/SelfTypeIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/SelfTypeIdentifier.java	(revision 2)
@@ -0,0 +1,47 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.UlyssesType;
+
+public final class SelfTypeIdentifier extends TypeIdentifier
+{
+	public SelfTypeIdentifier(String aName,
+			UlyssesType aType,
+			IScope aDefiningScope)
+	{
+		super (aName, aType, aDefiningScope);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/TypeIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/TypeIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/TypeIdentifier.java	(revision 2)
@@ -0,0 +1,92 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.UlyssesType;
+
+///////////////////////////////////////////////
+///  Type Identifier
+///
+
+public class TypeIdentifier extends Identifier
+{
+	public String prefix = "";
+
+	protected TypeIdentifier(Token aToken,
+			UlyssesType aType,
+			IdentifierKind someKind,
+			IScope aDefiningScope)
+	{
+		super (aToken, aType, someKind, aDefiningScope);
+	}
+
+	protected TypeIdentifier(String aToken,
+			UlyssesType aType,
+			IdentifierKind someKind,
+			IScope aDefiningScope)
+	{
+		super (aToken, aType, someKind, aDefiningScope);
+	}
+
+
+	public TypeIdentifier(Token aToken,
+			UlyssesType aType,
+			IScope aDefiningScope)
+	{
+		super (aToken, aType, IdentifierKind.TypeIdentifier, aDefiningScope);
+	}
+
+
+	public TypeIdentifier(String aName,
+			UlyssesType aType,
+			IScope aDefiningScope)
+	{
+		super (aName, aType, IdentifierKind.TypeIdentifier, aDefiningScope);
+	}
+
+	public TypeIdentifier(TypeIdentifier toCopy)
+	{
+		super (toCopy);
+		this.prefix = toCopy.prefix;
+	}
+
+	@Override
+	public /*override*/ Identifier Clone()
+	{
+		return new TypeIdentifier(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ValueIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ValueIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ValueIdentifier.java	(revision 2)
@@ -0,0 +1,47 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.UlyssesType;
+
+///////////////////////////////////////////////
+///  Value Identifiers
+///
+public abstract class ValueIdentifier extends Identifier {
+	public ValueIdentifier(Token aToken,
+			UlyssesType aType,
+			IdentifierKind aKind,
+			IScope aDefiningScope)
+	{
+		super(aToken, aType, aKind, aDefiningScope);
+	}
+
+	public ValueIdentifier(ValueIdentifier toCopy) { super(toCopy); }
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/LocalVariableIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/LocalVariableIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/LocalVariableIdentifier.java	(revision 2)
@@ -0,0 +1,67 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.UlyssesType;
+
+
+public class LocalVariableIdentifier extends ValueReferenceIdentifier
+{
+	public LocalVariableIdentifier(Token aToken,
+			UlyssesType aType,
+			IScope aDefiningScope)
+	{
+		super (aToken, aType, IdentifierKind.LocalVariableIdentifier, aDefiningScope);
+	}
+
+	public LocalVariableIdentifier(LocalVariableIdentifier toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Identifier Clone()
+	{
+		return new LocalVariableIdentifier(this);
+	}
+
+	public LocalVariableIdentifier(String name, UlyssesType aType, IdentifierKind aKind, IScope aDefiningScope)
+	{
+		super (name, aType, aKind, aDefiningScope);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/AbortStatement.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/AbortStatement.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/AbortStatement.java	(revision 2)
@@ -0,0 +1,55 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+public final class AbortStatement extends Statement
+{
+	public AbortStatement(int aline, int apos)
+	{
+		super (StatementKind.Abort, aline, apos);
+	}
+
+	public AbortStatement(AbortStatement toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		return new AbortStatement(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/cppAst/ast/identifiers/Identifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/Identifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/Identifier.hpp	(revision 2)
@@ -0,0 +1,119 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <cstdint>
+#include <string>
+
+#include <ast/AstElement.hpp>
+#include <ast/IScope.hpp>
+#include <base/TiresiasObject.hpp>
+
+
+namespace Ast {
+
+using namespace std;
+
+/**
+ * You must not change the assigned values as this
+ * needs to be kept in sync with the definitions in Argos!
+ */
+enum class IdentifierKind : std::uint8_t
+{
+	TypeIdentifier = 0,               // some named type
+	EnumIdentifier = 1,               // identifier of enumerated type
+	LandmarkIdentifier = 2,           // landmark
+	AttributeIdentifier = 3,          // global attribute
+	LocalVariableIdentifier = 4,      // local variable
+	ParameterIdentifier = 5,          // method/named action argument
+	ExpressionVariableIdentifier = 6, // var in an expression
+	MethodIdentifier = 7,             // a method
+	NamedActionIdentifier = 8,        // a named action
+	Module = 9,                       // the main module - actually this has no name...
+	List_Normal = 10,
+	Constant = 11,
+	MainModule = 12,
+	List_Nondeterministic = 13,
+	List_Seqential = 14,
+	List_Prioritized = 15,
+	IDENTIFIERKIND_LAST_ITEM = List_Prioritized
+};
+
+#define IDENTIFIERKIND_NR_ITEMS ((std::uint8_t)IdentifierKind::IDENTIFIERKIND_LAST_ITEM + 1)
+
+class Type; // forward
+
+class Identifier
+	: public AstElement
+{
+protected:
+	typedef Identifier* (*ConstrPtr)();
+	typedef Identifier* (*CopyConstrPtr)(const Identifier& toCopy);
+
+	IdentifierKind m_identifierKind;
+	int32_t m_line;
+	int32_t m_column;
+	IScope* m_definingScope;
+	Type*   m_type;
+	string  m_tokenText;
+
+	static Base::FuncPtr s_idVmt [2][IDENTIFIERKIND_NR_ITEMS];
+	static Identifier* createVirtual(IdentifierKind aType); // virtual constructor used by Ast
+	static Identifier* createVirtual(const Identifier& toCopy); // virtual copy constructor used by Ast
+public:
+	friend class Ast;
+	Identifier(IdentifierKind identifierKind);
+	Identifier(const Identifier& toCopy);
+	~Identifier() override;
+
+	IdentifierKind kind() const   { return m_identifierKind; };
+	Type* type() const			  { return m_type; };
+	int32_t line() const          { return m_line; };
+	int32_t column() const        { return m_column; };
+	IScope* definingScope() const { return m_definingScope; };
+	string tokenText() const      { return m_tokenText; };
+	string toString() const       { return tokenText(); };
+	string fullyQualifiedName() const;
+
+	void setType(Type* aType) { m_type = aType; };
+	void setTokenText(string aText)  { m_tokenText = aText; };
+
+	void init(std::int32_t line, std::int32_t col, const char* text,
+				IScope* scopeRef, Type* typeRef)
+	{
+		m_line = line;
+		m_column = col;
+		m_tokenText = text;
+		m_definingScope = scopeRef;
+		m_type = typeRef;
+	}
+
+
+	void accept(IAstVisitor& visitor);
+	virtual Identifier* clone() const;
+};
+}
+#include <ast/types/Type.hpp>
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/NamedActionIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/NamedActionIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/NamedActionIdentifier.java	(revision 2)
@@ -0,0 +1,59 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.UlyssesType;
+
+public final class NamedActionIdentifier extends FunctionIdentifier
+{
+	public NamedActionIdentifier(Token aToken,
+			UlyssesType aType,
+			IScope aDefiningScope)
+	{
+		super (aToken, aType, IdentifierKind.NamedActionIdentifier, aDefiningScope);
+	}
+
+	public NamedActionIdentifier(NamedActionIdentifier toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Identifier Clone()
+	{
+		return new NamedActionIdentifier(this);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Block.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Block.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Block.java	(revision 2)
@@ -0,0 +1,142 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import java.util.LinkedList;
+
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.parser.SymbolTable;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+
+///////////////////////////////////////////////
+///  Blocks
+///
+public abstract class Block extends Statement implements IScope
+{
+	private final SymbolTable m_symbols;
+	private LinkedList<Statement> m_statements;
+	private Expression m_filter; /*gets transformed to guarded command in resolvevisitor!*/
+	private IScope m_parentScope;
+
+	public SymbolTable symbols() { return m_symbols; }
+	public LinkedList<Statement> statements() { return m_statements; }
+	public Expression filter() { return m_filter; }
+
+	public Block(StatementKind aKind, int aline, int apos)
+	{
+		super (aKind, aline, apos);
+		m_symbols = new SymbolTable();
+		m_statements = new LinkedList<Statement>();
+	}
+
+	public Block(Block toCopy)
+	{
+		super (toCopy);
+		m_symbols = new SymbolTable(toCopy.m_symbols);
+		m_statements = new LinkedList<Statement>(toCopy.m_statements);
+		m_parentScope = toCopy.m_parentScope;
+		m_filter = toCopy.m_filter;
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		throw new NotImplementedException();
+	}
+
+	public void AddStatement(Statement toAdd)
+	{
+		m_statements.addLast(toAdd);
+		checkParentScope(toAdd);
+	}
+
+	private void checkParentScope(Statement toAdd) {
+		if (toAdd instanceof IScope) {
+			final IScope child = (IScope) toAdd;
+			if (child.GetParentScope() == null)
+				child.SetParentScope(this);
+			else if (child.GetParentScope() != this)
+				throw new InternalCompilerException("Internal error: Statement added to block has parent set to different object.");
+		}
+	}
+
+	public void SetStatements(LinkedList<Statement> newStatements)
+	{
+		m_statements = newStatements;
+		for (final Statement s: newStatements)
+			checkParentScope(s);
+	}
+
+	public void AddIdentifier(Identifier anIdentifier)
+	{
+		m_symbols.AddIdentifier(anIdentifier);
+	}
+
+	@Override
+	public Identifier ResolveIdentifier(String aName)
+	{
+		if (m_symbols.Defined(aName))
+			return m_symbols.Get(aName);
+		else
+			return null;
+	}
+
+	@Override
+	public IScope GetParentScope()
+	{
+		return m_parentScope;
+	}
+
+	@Override
+	public void SetParentScope(IScope parentScope)
+	{
+		if (parentScope == null)
+			System.out.println("");
+		m_parentScope = parentScope;
+	}
+
+	@Override
+	public void AddIdentifier(Identifier anIdentifier, Object tag)
+	{
+		m_symbols.AddIdentifier(anIdentifier);
+	}
+
+
+	public void SetFilter(Expression sexpr)
+	{
+		m_filter = sexpr;
+	}
+
+	/** Checks whether there are no local variables etc. for this block */
+	public boolean isSimpleBlock() {
+		return m_symbols.size() == 0 && m_filter == null;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Call.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Call.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Call.java	(revision 2)
@@ -0,0 +1,72 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.expressions.Expression;
+
+///////////////////////////////////////////////
+///  Methodcall
+///
+public final class Call extends Statement
+{
+	private Expression m_callExpression;
+
+	public Expression callExpression() { return m_callExpression; }
+
+	public Call(Expression callExpression, int aline, int apos)
+	{
+		super (StatementKind.MethodCall, aline, apos);
+		m_callExpression = callExpression;
+	}
+
+	public Call(Call toCopy)
+	{
+		super (toCopy);
+		m_callExpression = toCopy.m_callExpression;
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		return new Call(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetCallExpression(Expression newExpression)
+	{
+		//if (newExpression == null)
+			//    throw new ArgumentException();
+		m_callExpression = newExpression;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/Scope.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/Scope.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/Scope.java	(revision 2)
@@ -0,0 +1,95 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.parser.SymbolTable;
+
+///////////////////////////////////////////////
+///  Scope Identifiers
+///
+public abstract class Scope extends TypeIdentifier implements IScope
+{
+	protected SymbolTable m_symbolTable;
+
+	public Scope(Token aToken,
+			UlyssesType aType,
+			IdentifierKind aKind,
+			IScope aDefiningScope)
+	{
+		super (aToken, aType, aKind, aDefiningScope);
+		m_symbolTable = new SymbolTable();
+	}
+
+
+	public Scope(String aName,
+			UlyssesType aType,
+			IdentifierKind aKind,
+			IScope aDefiningScope)
+	{
+		super (aName, aType, aKind, aDefiningScope);
+		m_symbolTable = new SymbolTable();
+	}
+
+	public Scope(Scope toCopy)
+	{
+		super (toCopy);
+		m_symbolTable = toCopy.symbolTable();
+	}
+
+
+	public SymbolTable symbolTable() { return m_symbolTable; }
+
+	@Override
+	public IScope GetParentScope()
+	{
+		return m_definingScope;
+	}
+
+	@Override
+	public void SetParentScope(IScope parentScope)
+	{
+		m_definingScope = parentScope;
+	}
+
+	public /*virtual*/ void AddIdentifier(Identifier anIdentifier, Object tag)
+	{
+		m_symbolTable.AddIdentifier(anIdentifier);
+	}
+
+	public Identifier ResolveIdentifier(String aName)
+	{
+		if (m_symbolTable.Defined(aName))
+			return m_symbolTable.Get(aName);
+		else
+			return null;
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/PrioBlock.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/PrioBlock.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/PrioBlock.java	(revision 2)
@@ -0,0 +1,62 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+public final class PrioBlock extends Block
+{
+	public PrioBlock(int aline, int apos)
+	{
+		super (StatementKind.PrioBlock, aline, apos);
+	}
+
+	public PrioBlock(Block aParent, int aline, int apos)
+	{
+		super (StatementKind.PrioBlock, aline, apos);
+		if (aParent != null)
+			aParent.AddStatement(this);
+	}
+
+	public PrioBlock(PrioBlock toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		return new PrioBlock(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/cppAst/ast/identifiers/MethodIdentifier.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/MethodIdentifier.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/MethodIdentifier.hpp	(revision 2)
@@ -0,0 +1,52 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/identifiers/FunctionIdentifier.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class MethodIdentifier final
+	: public FunctionIdentifier
+{
+protected:
+	MethodIdentifier():
+		FunctionIdentifier(IdentifierKind::MethodIdentifier)
+	{};
+	MethodIdentifier(const MethodIdentifier& toCopy):
+		FunctionIdentifier(toCopy)
+	{};
+
+	static MethodIdentifier* create() {return new MethodIdentifier();}
+	static MethodIdentifier* createCopy(const MethodIdentifier& toCopy) {return new MethodIdentifier(toCopy);}
+public:
+	friend class Ast;
+	friend class Identifier;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/KillStatement.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/KillStatement.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/KillStatement.java	(revision 2)
@@ -0,0 +1,65 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.Identifier;
+
+public final class KillStatement extends Statement
+{
+	public Identifier someOne;
+
+	public KillStatement(Identifier toKill, int aline, int apos)
+	{
+		super (StatementKind.Kill, aline, apos);
+		someOne = toKill;
+	}
+
+	public KillStatement(KillStatement toCopy)
+	{
+		super (toCopy);
+		someOne = toCopy.someOne;
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		return new KillStatement(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetIdentifier(Identifier target)
+	{
+		someOne = target;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Statement.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Statement.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Statement.java	(revision 2)
@@ -0,0 +1,76 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import org.momut.ooas.ast.AstNode;
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+
+///////////////////////////////////////////////
+///  basic Statement
+///
+public abstract class Statement extends AstNode implements IAst
+{
+	private final StatementKind m_kind;
+	private final int m_line;
+	private final int m_pos;
+
+	public StatementKind kind() { return m_kind; }
+	public int line() { return m_line; }
+	public int pos()  { return m_pos; }
+
+	public Statement(StatementKind aKind, int aline, int apos)
+	{
+		m_kind = aKind;
+		m_line = aline;
+		m_pos = apos;
+	}
+
+	public Statement(Statement toCopy)
+	{
+		m_kind = toCopy.m_kind;
+		m_line = toCopy.m_line;
+		m_pos = toCopy.m_pos;
+	}
+
+	public /*virtual*/ Statement Clone()
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public AstNodeTypeEnum nodeType() { return AstNodeTypeEnum.statement; }
+
+	@Override
+	public /*virtual*/ void Accept(IAstVisitor visitor)
+	{
+		throw new NotImplementedException();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/UnspecIdentifierList.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/UnspecIdentifierList.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/UnspecIdentifierList.java	(revision 2)
@@ -0,0 +1,50 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+public final class UnspecIdentifierList extends IdentifierList
+{
+	public UnspecIdentifierList()
+	{
+		super (IdentifierListType.normal);
+	}
+
+	public UnspecIdentifierList(IdentifierList aParent)
+	{
+		super (IdentifierListType.normal);
+		if (aParent != null)
+			aParent.AddElement(this);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/cppAst/ast/identifiers/Scope.hpp
===================================================================
--- trunk/compiler/cppAst/ast/identifiers/Scope.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/identifiers/Scope.hpp	(revision 2)
@@ -0,0 +1,63 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/IScope.hpp>
+#include <ast/identifiers/TypeIdentifier.hpp>
+#include <ast/SymbolTable.hpp>
+#include <string>
+
+namespace Ast {
+
+class Scope :
+	public TypeIdentifier,
+	public IScope
+{
+protected:
+	SymbolTable* m_symbolTable;
+
+	Scope(IdentifierKind id): TypeIdentifier(id), m_symbolTable (nullptr) {};
+	Scope(const Scope& toCopy): TypeIdentifier(toCopy), m_symbolTable (toCopy.m_symbolTable) {};
+
+public:
+
+	void init (std::int32_t line, std::int32_t col, const char* text,
+			IScope* scopeRef, Type* typeRef, const char* prefix,
+			SymbolTable* symbolTableRef)
+	{
+		TypeIdentifier::init(line,col,text,scopeRef,typeRef, prefix);
+		m_symbolTable = symbolTableRef;
+	}
+
+	SymbolTable* symbolTable() const        {return m_symbolTable;}
+	IScope* getParentScope() const override {return m_definingScope;};
+	Identifier* resolveIdentifier(const std::string& aName) const override { return m_symbolTable->get(aName); };
+	std::string getScopeName() const override {return toString();}
+
+	void setParentScope(IScope* parentScope) override { m_definingScope = parentScope; };
+	void addIdentifier(Identifier* anIdentifier, void* /*tag*/) override { m_symbolTable->addIdentifier(anIdentifier);};
+};
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/SeqBlock.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/SeqBlock.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/SeqBlock.java	(revision 2)
@@ -0,0 +1,63 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+public final class SeqBlock extends Block
+{
+	public SeqBlock(int aline, int apos)
+	{
+		super (StatementKind.SeqBlock, aline, apos);
+	}
+
+	public SeqBlock(Block aParent, int aline, int apos)
+	{
+		super (StatementKind.SeqBlock, aline, apos);
+		if (aParent != null)
+			aParent.AddStatement(this);
+	}
+
+	public SeqBlock(SeqBlock toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		return new SeqBlock(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Assignment.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Assignment.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/Assignment.java	(revision 2)
@@ -0,0 +1,129 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import java.util.LinkedList;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.parser.SymbolTable;
+
+///////////////////////////////////////////////
+///  Assignment
+///
+public final class Assignment extends Statement implements IScope
+{
+	private final LinkedList<Expression> m_places;
+	private final LinkedList<Expression> m_values;
+	private Expression m_nondetExpression;
+	private IScope m_parentScope;
+	private final SymbolTable m_symbols; // needed for nondeterminsitic assignment (we most likely will have new variables)
+
+	public LinkedList<Expression> places() { return m_places; }
+	public LinkedList<Expression> values() { return m_values; }
+	public Expression nondetExpression() { return m_nondetExpression; }
+	public SymbolTable symbols() { return m_symbols; }
+
+	public Assignment(Expression place, Expression value, Expression nondetExpression, int aline, int apos)
+	{
+		super (StatementKind.Assignment, aline, apos);
+		m_places = new LinkedList<Expression>();
+		m_values = new LinkedList<Expression>();
+		if (place != null)
+			m_places.addFirst(place);
+		if (value != null)
+			m_values.addFirst(value);
+		m_nondetExpression = nondetExpression;
+		m_symbols = new SymbolTable();
+	}
+
+	public Assignment(Assignment toCopy)
+	{
+		super (toCopy);
+		m_places = new LinkedList<Expression>(toCopy.m_places);
+		m_values = new LinkedList<Expression>(toCopy.m_values);
+		m_nondetExpression = toCopy.m_nondetExpression;
+		m_symbols = new SymbolTable(toCopy.symbols());
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		return new Assignment(this);
+	}
+
+	public void AddPlace(Expression aPlace)
+	{
+		m_places.addLast(aPlace);
+	}
+
+	public void AddValue(Expression aValue)
+	{
+		m_values.addLast(aValue);
+	}
+
+	public void SetNondetExpression(Expression anExpr)
+	{
+		m_nondetExpression = anExpr;
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public Identifier ResolveIdentifier(String aName)
+	{
+		if (m_symbols.Defined(aName))
+			return m_symbols.Get(aName);
+		else
+			return null;
+	}
+
+	@Override
+	public IScope GetParentScope()
+	{
+		return m_parentScope;
+	}
+
+	@Override
+	public void SetParentScope(IScope parentScope)
+	{
+		m_parentScope = parentScope;
+	}
+
+	@Override
+	public void AddIdentifier(Identifier anIdentifier, Object tag)
+	{
+		m_symbols.AddIdentifier(anIdentifier);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/BoolType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/BoolType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/BoolType.java	(revision 2)
@@ -0,0 +1,55 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+
+///////////////////////////////////////////////
+///  Simple Type: Bool
+///
+public final class BoolType extends UlyssesType
+{
+	public BoolType(TypeIdentifier anIdentifier)
+	{
+		super(TypeKind.BoolType, anIdentifier);
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public String AnonymousName()
+	{
+		return "bool";
+	}
+}
+
Index: trunk/compiler/cppAst/ast/serialize/ProtoBufAstTraversal.cpp
===================================================================
--- trunk/compiler/cppAst/ast/serialize/ProtoBufAstTraversal.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/serialize/ProtoBufAstTraversal.cpp	(revision 2)
@@ -0,0 +1,1023 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#include "ProtoBufAstTraversal.hpp"
+#include <tiresias.h>
+#include <cstdint>
+#include <iostream>
+#include <fstream>
+#include <boost/format.hpp>
+
+namespace Ast {
+
+ProtoBufAstTraversal::ProtoBufAstTraversal (CallContext* context) :
+		m_context(context)
+{}
+
+ProtoBufAstTraversal::~ProtoBufAstTraversal () {}
+
+void* ProtoBufAstTraversal::deserialize(){
+	GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+	// read in the serialized AST
+	serialize::PBAstTraversal traversal;
+	std::fstream input(m_context->m_astLocation, std::ios::in | std::ios::binary);
+	if (!traversal.ParseFromIstream(&input)) {
+		std::cerr << "Failed to parse seralized ast from " << m_context->m_astLocation << std::endl;
+		throw;
+	}
+
+	return doDeserialize(traversal);
+}
+
+
+void* ProtoBufAstTraversal::deserialize(const std::uint8_t * buffer, std::uint32_t size) {
+	GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+	// read in the serialized AST
+	serialize::PBAstTraversal traversal;
+	if (!traversal.ParseFromArray(buffer, size)) {
+		std::cerr << "Failed to parse seralized ast from memory buffer." << std::endl;
+		throw;
+	}
+
+	return doDeserialize(traversal);
+}
+
+void* ProtoBufAstTraversal::doDeserialize(serialize::PBAstTraversal & traversal) {
+	// Function calls may be passed a null reference, which has no UUID assigned.
+	// Instead it is tagged "NULL" and must be mapped to a nullptr manually.
+	m_objects[0] = (void*) nullptr;
+
+	for(int i = 0; i < traversal.calls_size(); i++){
+		const serialize::PBFunctionCall& call = traversal.calls(i);
+
+		if(call.has_allocate())
+			allocate(call);
+		else if (call.has_add())
+			add(call);
+		else if (call.has_identifier())
+			identifier(call);
+		else if (call.has_type())
+			type(call);
+		else if (call.has_statement())
+			statement(call);
+		else if (call.has_expression())
+			expression(call);
+	}
+
+	void* result = m_objects.at(traversal.main_module());
+
+	// Delete all global objects allocated by libprotobuf.
+	google::protobuf::ShutdownProtobufLibrary();
+
+	return result;
+}
+
+
+/**
+ * Calls to allocation functions, like create identifier etc
+ * */
+void ProtoBufAstTraversal::allocate(const serialize::PBFunctionCall& call){
+	void* object;
+
+	int i = 0;
+	switch (call.allocate()) {
+		case serialize::PBAllocation::TIRESIAS_CREATE_IDENTIFIER :
+		{
+			// DLL void* TIRESIAS_CREATE_IDENTIFIER(void* context, std::int32_t ordinal, std::int32_t subOrd);
+			object = TIRESIAS_CREATE_IDENTIFIER (m_context
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value());
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CREATE_TYPE :
+		{
+			// DLL void* TIRESIAS_CREATE_TYPE(void* context, std::int32_t ordinal);
+			object = TIRESIAS_CREATE_TYPE (m_context
+					, call.parameters(i++).int32_value());
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CREATE_STATEMENT :
+		{
+			// DLL void* TIRESIAS_CREATE_STATEMENT(void* context, std::int32_t ordinal);
+			object = TIRESIAS_CREATE_STATEMENT (m_context
+					, call.parameters(i++).int32_value());
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CREATE_EXPRESSION :
+		{
+			// DLL void* TIRESIAS_CREATE_EXPRESSION(void* context, std::int32_t ordinal, std::int32_t subOrd);
+			object = TIRESIAS_CREATE_EXPRESSION (m_context
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value());
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CREATE_IDENTIFIERLIST :
+		{
+			object = TIRESIAS_CREATE_IDENTIFIERLIST (m_context);
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CREATE_TYPELIST :
+		{
+			object = TIRESIAS_CREATE_TYPELIST (m_context);
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CREATE_STATEMENTLIST :
+		{
+			object = TIRESIAS_CREATE_STATEMENTLIST (m_context);
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CREATE_EXPRESSIONLIST :
+		{
+			object = TIRESIAS_CREATE_EXPRESSIONLIST (m_context);
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CREATE_SYMBTAB :
+		{
+			object = TIRESIAS_CREATE_SYMBTAB (m_context);
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CREATE_PARAMLIST :
+		{
+			object = TIRESIAS_CREATE_PARAMLIST (m_context);
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE :
+		{
+			object = TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE (m_context);
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST :
+		{
+			object = TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST (m_context);
+			break;
+		}
+		case serialize::PBAllocation::TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE :
+		{
+			// DLL void* TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE(void* context, void* astelement);
+			object = TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		default:
+			m_context->logError("Unknown value for enum PBAllocation.");
+			abort();
+	}
+
+	std::uint64_t id = call.return_value().return_id();
+	m_objects[id] = object;
+}
+
+/**
+ * Calls to functions that add objects to containers, like add identifier to symboltable etc.
+ * */
+void ProtoBufAstTraversal::add(const serialize::PBFunctionCall& call){
+	int i = 0;
+	switch (call.add()) {
+		case serialize::PBAdd::TIRESIAS_ADD_IDENTIFIERTOLIST :
+		{
+			// DLL bool TIRESIAS_ADD_IDENTIFIERTOLIST(void* context, void* idList, void* idRef);
+			TIRESIAS_ADD_IDENTIFIERTOLIST (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBAdd::TIRESIAS_ADD_TYPETOLIST :
+		{
+			// DLL bool TIRESIAS_ADD_TYPETOLIST(void* context, void* typeList, void* type);
+			TIRESIAS_ADD_TYPETOLIST (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBAdd::TIRESIAS_ADD_STATEMENTTOLIST :
+		{
+			// DLL bool TIRESIAS_ADD_STATEMENTTOLIST(void* context, void* stmtList, void* stmntRef);
+			TIRESIAS_ADD_STATEMENTTOLIST (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBAdd::TIRESIAS_ADD_EXPRESSIONTOLIST :
+		{
+			// DLL bool TIRESIAS_ADD_EXPRESSIONTOLIST(void* context, void* exprList, void* exprRef);
+			TIRESIAS_ADD_EXPRESSIONTOLIST (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBAdd::TIRESIAS_ADD_IDTOSYMBTAB :
+		{
+			// DLL bool TIRESIAS_ADD_IDTOSYMBTAB(void* context, void* symbolTable, void* identifier);
+			TIRESIAS_ADD_IDTOSYMBTAB (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBAdd::TIRESIAS_ADD_PARAMTOLIST :
+		{
+			// DLL bool TIRESIAS_ADD_PARAMTOLIST(void* context, void* parameterList, void* par);
+			TIRESIAS_ADD_PARAMTOLIST (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBAdd::TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST :
+		{
+			// DLL bool TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST(void* context, void* objectsList, void* instanceRef);
+			TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBAdd::TIRESIAS_ADD_IDENTIFIERTOBLOCK :
+		{
+			// DLL bool TIRESIAS_ADD_IDENTIFIERTOBLOCK(void* context, void* idList, void* idRef);
+			TIRESIAS_ADD_IDENTIFIERTOBLOCK (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		default:
+			m_context->logError("Unknown value for enum PBAdd.");
+			abort();
+	}
+}
+
+/**
+ * Calls to functions that initialize the various subtypes of Identifier.
+ * */
+void ProtoBufAstTraversal::identifier(const serialize::PBFunctionCall& call){
+	int i = 0;
+	switch (call.identifier()) {
+		case serialize::PBIdentifiers::TIRESIAS_INIT_ENUMIDENTIFIER :
+		{
+	//		DLL bool TIRESIAS_INIT_ENUMIDENTIFIER(void* context,
+	//				void* enumId, std::int32_t line, std::int32_t col, const char* text,
+	//				void* scopeRef, void* typeRef, bool haveValue, std::int32_t value);
+			TIRESIAS_INIT_ENUMIDENTIFIER (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value()
+					, call.parameters(i++).int32_value());
+			break;
+		}
+		case serialize::PBIdentifiers::TIRESIAS_INIT_CONSTIDENTIFIER :
+		{
+	//		DLL bool TIRESIAS_INIT_CONSTIDENTIFIER(void* context,
+	//				void* constId, std::int32_t line, std::int32_t col, const char* text,
+	//				void* scopeRef, void* typeRef, void* valueRef);
+			TIRESIAS_INIT_CONSTIDENTIFIER (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBIdentifiers::TIRESIAS_INIT_ATTRIDENTIFIER :
+		{
+	//		DLL bool TIRESIAS_INIT_ATTRIDENTIFIER(void* context,
+	//				void* attrId, std::int32_t line, std::int32_t col, const char* text,
+	//				void* scopeRef, void* typeRef, void* initRef,
+	//				bool isStatic, bool isControllable, bool isObservable);
+			TIRESIAS_INIT_ATTRIDENTIFIER (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value()
+					, call.parameters(i++).bool_value()
+					, call.parameters(i++).bool_value());
+			break;
+		}
+		case serialize::PBIdentifiers::TIRESIAS_INIT_EXPRVARIDENTIFIER :
+		{
+	//		DLL bool TIRESIAS_INIT_EXPRVARIDENTIFIER(void* context,
+	//				void* exprVarId, std::int32_t line, std::int32_t col, const char* text,
+	//				void* scopeRef, void* typeRef, bool initialized);
+			TIRESIAS_INIT_EXPRVARIDENTIFIER (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value());
+			break;
+		}
+		case serialize::PBIdentifiers::TIRESIAS_INIT_PARAMIDENTIFIER :
+		{
+	//		DLL bool TIRESIAS_INIT_PARAMIDENTIFIER(void* context,
+	//				void* paramId, std::int32_t line, std::int32_t column, const char* text,
+	//				void* scopeRef, void* typeRef);
+			TIRESIAS_INIT_PARAMIDENTIFIER (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBIdentifiers::TIRESIAS_INIT_LOCVARIDENTIFIER :
+		{
+	//		DLL bool TIRESIAS_INIT_LOCVARIDENTIFIER(void* context,
+	//				void* locVarId, std::int32_t line, std::int32_t column, const char* text,
+	//				void* scopeRef, void* typeRef);
+			TIRESIAS_INIT_LOCVARIDENTIFIER (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBIdentifiers::TIRESIAS_INIT_TYPEIDENTIFIER :
+		{
+	//		DLL bool TIRESIAS_INIT_TYPEIDENTIFIER(void* context,
+	//				void* typeId, std::int32_t line, std::int32_t column, const char* text,
+	//				void* scopeRef, void* typeRef, const char* prefix);
+			TIRESIAS_INIT_TYPEIDENTIFIER (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).literal_value().c_str());
+			break;
+		}
+		case serialize::PBIdentifiers::TIRESIAS_INIT_SELFIDENTIFIER :
+		{
+	//		DLL bool TIRESIAS_INIT_SELFIDENTIFIER(void* context,
+	//				void* typeId, std::int32_t line, std::int32_t column, const char* text,
+	//				void* scopeRef, void* typeRef, const char* prefix);
+			TIRESIAS_INIT_SELFIDENTIFIER (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).literal_value().c_str());
+			break;
+		}
+		case serialize::PBIdentifiers::TIRESIAS_INIT_METHODIDENTIFIER :
+		{
+	//		DLL bool TIRESIAS_INIT_METHODIDENTIFIER(void* context,
+	//				void* methodId, std::int32_t line, std::int32_t column, const char* text,
+	//				void* scopeRef, void* typeRef, const char* prefix, void* parameterListRef,
+	//				void* symbolTableRef, void* bodyRef);
+			TIRESIAS_INIT_METHODIDENTIFIER (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBIdentifiers::TIRESIAS_INIT_MODULE :
+		{
+	//		DLL bool TIRESIAS_INIT_MODULE(void* context, void* moduleId,
+	//				int line, int column, const char* text, void* scopeRef,
+	//				void* typeRef, const char* prefix, void* symTabRef);
+			TIRESIAS_INIT_MODULE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBIdentifiers::TIRESIAS_INIT_MAINMODULE :
+		{
+	//		DLL bool TIRESIAS_INIT_MAINMODULE(void* context,
+	//				void* moduleId, int line, int column, const char* text,
+	//				void* scopeRef, void* typeRef, const char* prefix,
+	//				void* symTabRef, void* identifierListRef);
+			TIRESIAS_INIT_MAINMODULE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).literal_value().c_str()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		default:
+			m_context->logError("Unknown value for enum PBIdentifiers.");
+			abort();
+	}
+}
+
+/**
+ * Calls to functions that initialize the various subtypes of Type.
+ * */
+void ProtoBufAstTraversal::type(const serialize::PBFunctionCall& call){
+	int i = 0;
+	switch (call.type()) {
+		case serialize::PBTypes::TIRESIAS_INIT_INTTYPE :
+		{
+	//		DLL bool TIRESIAS_INIT_INTTYPE(void* context, void* typeId,
+	//				void* identifierRef, bool anonymousType, std::int32_t low,
+	//				std::int32_t high);
+			TIRESIAS_INIT_INTTYPE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value()
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value());
+			break;
+		}
+		case serialize::PBTypes::TIRESIAS_INIT_BOOLTYPE :
+		{
+	//		DLL bool TIRESIAS_INIT_BOOLTYPE(void* context, void* typeId,
+	//				void* identifierRef, bool anonymousType);
+			TIRESIAS_INIT_BOOLTYPE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value());
+
+			break;
+		}
+		case serialize::PBTypes::TIRESIAS_INIT_VALUEDENUMTYPE :
+		{
+	//		DLL bool TIRESIAS_INIT_VALUEDENUMTYPE(void* context,
+	//				void* typeId, void* identifierRef,
+	//				bool anonymousType, void* symTabRef, void* intTypeRef);
+			TIRESIAS_INIT_VALUEDENUMTYPE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBTypes::TIRESIAS_INIT_ENUMTYPE :
+		{
+	//		DLL bool TIRESIAS_INIT_ENUMTYPE(void* context, void* typeId,
+	//				void* identifierRef, bool anonymousType,
+	//				void* symTabRef);
+			TIRESIAS_INIT_ENUMTYPE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value()
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBTypes::TIRESIAS_INIT_LISTTYPE :
+		{
+	//		DLL bool TIRESIAS_INIT_LISTTYPE(void* context, void* typeId,
+	//				void* identifierRef, bool anonymousType,
+	//				void* innerTypeRef, std::uint32_t maxNumberOfElements);
+			TIRESIAS_INIT_LISTTYPE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).uint32_value());
+			break;
+		}
+		case serialize::PBTypes::TIRESIAS_INIT_TUPLETYPE :
+		{
+	//		DLL bool TIRESIAS_INIT_TUPLETYPE(void* context, void* typeId,
+	//				void* identifierRef, bool anonymousType,
+	//				void* typeListRef);
+			TIRESIAS_INIT_TUPLETYPE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value()
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBTypes::TIRESIAS_INIT_FUNCTIONTYPE :
+		{
+	//		DLL bool TIRESIAS_INIT_FUNCTIONTYPE(void* context,
+	//				void* typeId, void* identifierRef,
+	//				bool anonymousType, void* paramTypeListRef,
+	//				void* returnTypeRef, std::int32_t functionKind, bool isPure);
+			TIRESIAS_INIT_FUNCTIONTYPE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).bool_value());
+			break;
+		}
+		case serialize::PBTypes::TIRESIAS_INIT_ACTIONSYSTEMINSTANCE :
+		{
+	//		DLL bool TIRESIAS_INIT_ACTIONSYSTEMINSTANCE(void* context,
+	//				void* instance, void* typeRef, const char* name,
+	//				std::int32_t numOfCreatedObjs, void* parentInstanceRef);
+			TIRESIAS_INIT_ACTIONSYSTEMINSTANCE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).literal_value().c_str()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBTypes::TIRESIAS_INIT_ACTIONSYSTEMTYPE :
+		{
+	//		DLL bool TIRESIAS_INIT_ACTIONSYSTEMTYPE(void* context,
+	//				void* typeId, void* identifierRef,
+	//				bool anonymousType, void* baseTypeRef,
+	//				void* parentScopeRef, void* doOdBlockRef,
+	//				void* symTab, void* objectsListRef,
+	//				void* derivedObjectsListRef, bool autoConstruction,
+	//				bool isInSystemDescription);
+			TIRESIAS_INIT_ACTIONSYSTEMTYPE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value()
+					, call.parameters(i++).bool_value());
+			break;
+		}
+		case serialize::PBTypes::TIRESIAS_INIT_NULLTYPE :
+		{
+	//		DLL bool TIRESIAS_INIT_NULLTYPE(void* context, void* typeId,
+	//				void* identifierRef, bool anonymousType);
+			TIRESIAS_INIT_NULLTYPE (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value());
+			break;
+		}
+		default:
+			m_context->logError("Unknown value for enum PBTypes.");
+			abort();
+
+	}
+}
+
+/**
+ * Calls to functions that initialize the various subtypes of Statement.
+ * */
+void ProtoBufAstTraversal::statement(const serialize::PBFunctionCall& call){
+	int i = 0;
+	switch (call.statement()) {
+		case serialize::PBStatements::TIRESIAS_INIT_SKIP :
+		{
+	//		DLL bool TIRESIAS_INIT_SKIP(void* context, void* stmnt,
+	//				std::int32_t line, std::int32_t col);
+			TIRESIAS_INIT_SKIP (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value());
+			break;
+		}
+		case serialize::PBStatements::TIRESIAS_INIT_BREAK :
+		{
+	//		DLL bool TIRESIAS_INIT_BREAK(void* context, void* stmnt,
+	//				std::int32_t line, std::int32_t col);
+			TIRESIAS_INIT_BREAK (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value());
+			break;
+		}
+		case serialize::PBStatements::TIRESIAS_INIT_ABORT :
+		{
+	//		DLL bool TIRESIAS_INIT_ABORT(void* context, void* stmnt,
+	//				std::int32_t line, std::int32_t col);
+			TIRESIAS_INIT_ABORT (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value());
+			break;
+		}
+		case serialize::PBStatements::TIRESIAS_INIT_NONDETBLOCK :
+		{
+	//		DLL bool TIRESIAS_INIT_NONDETBLOCK(void* context, void* block,
+	//				std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
+	//				void* scopeRef);
+			TIRESIAS_INIT_NONDETBLOCK (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBStatements::TIRESIAS_INIT_SEQBLOCK :
+		{
+	//		DLL bool TIRESIAS_INIT_SEQBLOCK(void* context, void* block,
+	//				std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
+	//				void* scopeRef, void* filterExprRef);
+			TIRESIAS_INIT_SEQBLOCK (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBStatements::TIRESIAS_INIT_PRIOBLOCK :
+		{
+	//		DLL bool TIRESIAS_INIT_PRIOBLOCK(void* context, void* block,
+	//				std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
+	//				void* scopeRef);
+			TIRESIAS_INIT_PRIOBLOCK (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBStatements::TIRESIAS_INIT_GUARDEDCOMMAND :
+		{
+	//		DLL bool TIRESIAS_INIT_GUARDEDCOMMAND(void* context,
+	//				void* stmt, std::int32_t line, std::int32_t pos, void* scopeRef,
+	//				void* guardExprRef, void* bodyRef);
+			TIRESIAS_INIT_GUARDEDCOMMAND (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBStatements::TIRESIAS_INIT_ASSIGNMENT :
+		{
+	//		DLL bool TIRESIAS_INIT_ASSIGNMENT(void* context, void* stmt,
+	//				std::int32_t line, std::int32_t pos, void* scopeRef, void* nonDetExprRef,
+	//				void* placeExprListRef, void* valueExprListRef,
+	//				void* symTabRef);
+			TIRESIAS_INIT_ASSIGNMENT (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBStatements::TIRESIAS_INIT_CALL :
+		{
+	//		DLL bool TIRESIAS_INIT_CALL(void* context, void* stmt,
+	//				std::int32_t line, std::int32_t pos, void* callExprRef);
+			TIRESIAS_INIT_CALL (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		default:
+			m_context->logError("Unknown value for enum PBStatements.");
+			abort();
+	}
+}
+
+/**
+ * Calls to functions that initialize the various subtypes of Expression.
+ * */
+void ProtoBufAstTraversal::expression(const serialize::PBFunctionCall& call){
+	int i = 0;
+	switch (call.expression()) {
+		case serialize::PBExpressions::TIRESIAS_INIT_TYPEEXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_TYPEEXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef);
+			TIRESIAS_INIT_TYPEEXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_IDENTIFIEREXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_IDENTIFIEREXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* identifierRef, bool isSelf);
+			TIRESIAS_INIT_IDENTIFIEREXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value());
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_UNARYEXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_UNARYEXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* child);
+			TIRESIAS_INIT_UNARYEXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_BINARYEXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_BINARYEXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* left, void* right);
+			TIRESIAS_INIT_BINARYEXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_TERNARYEXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_TERNARYEXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* left, void* mid, void* right, void* defScopeRef);
+			TIRESIAS_INIT_TERNARYEXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_INTVALUEEXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_INTVALUEEXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				std::int32_t value);
+			TIRESIAS_INIT_INTVALUEEXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value());
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_BOOLVALUEEXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_BOOLVALUEEXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				bool value);
+			TIRESIAS_INIT_BOOLVALUEEXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value());
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_REFVALUEEXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_REFVALUEEXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,void* object);
+			TIRESIAS_INIT_REFVALUEEXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_LISTCONSTRUCTOR :
+		{
+	//		DLL bool TIRESIAS_INIT_LISTCONSTRUCTOR(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* exprList, void* symTab, void* parentScope,
+	//				void* comprehension, bool hasComprehension);
+			TIRESIAS_INIT_LISTCONSTRUCTOR (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value());
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_SETCONSTRUCTOR :
+		{
+	//		DLL bool TIRESIAS_INIT_SETCONSTRUCTOR(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* exprList, void* symTab, void* parentScope,
+	//				void* comprehension, bool hasComprehension);
+			TIRESIAS_INIT_SETCONSTRUCTOR (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value());
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_TUPLECONSTRUCTOR :
+		{
+	//		DLL bool TIRESIAS_INIT_TUPLECONSTRUCTOR(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* exprList, void* tupleTypeId, bool isMatcher);
+			TIRESIAS_INIT_TUPLECONSTRUCTOR (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).bool_value());
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_ACCESSEXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_ACCESSEXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* left, void* right);
+			TIRESIAS_INIT_ACCESSEXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* child, void* argument);
+			TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_CALLEXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_CALLEXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* child, void* argumentList, void* scopeRef);
+			TIRESIAS_INIT_CALLEXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_QUANTIFIEREXPRESSION :
+		{
+	//		DLL bool TIRESIAS_INIT_QUANTIFIEREXPRESSION(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* child, void* symTabRef, void* scopeRef);
+			TIRESIAS_INIT_QUANTIFIEREXPRESSION (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value()));
+			break;
+		}
+		case serialize::PBExpressions::TIRESIAS_INIT_OBJECTCONSTRUCTOR :
+		{
+	//		DLL bool TIRESIAS_INIT_OBJECTCONSTRUCTOR(void* context,
+	//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+	//				void* callTargetsIdentifierListRef, void* symbTabRef,
+	//				void* instanceList, std::uint32_t currentInstance, const char* name);
+			TIRESIAS_INIT_OBJECTCONSTRUCTOR (m_context
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).int32_value()
+					, call.parameters(i++).int32_value()
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, m_objects.at(call.parameters(i++).uint64_value())
+					, call.parameters(i++).uint32_value()
+					, call.parameters(i++).literal_value().c_str());
+			break;
+		}
+		default:
+			m_context->logError("Unknown value for enum PBExpressions.");
+			abort();
+	}
+}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/GuardedCommand.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/GuardedCommand.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/GuardedCommand.java	(revision 2)
@@ -0,0 +1,129 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+
+///////////////////////////////////////////////
+///  Guarded Command
+///
+public final class GuardedCommand extends Statement implements IScope
+{
+	private Expression m_guard;
+	private Statement m_body;
+	private boolean m_isQualitative;
+	private IScope m_parentScope;
+
+	public Expression guard() { return m_guard; }
+	public Statement body() { return m_body; }
+	public boolean isQualitative() { return m_isQualitative; }
+
+
+	public GuardedCommand(Expression aGuard, Block aBlock, int aline, int apos)
+	{
+		super (StatementKind.GuardedCommand, aline, apos);
+		m_guard = aGuard;
+		m_isQualitative = false;
+		m_body = aBlock;
+		checkBody();
+	}
+
+	public GuardedCommand(GuardedCommand toCopy)
+	{
+		super (toCopy);
+		m_guard = toCopy.m_guard;
+		m_body = toCopy.m_body;
+		m_isQualitative = toCopy.m_isQualitative;
+		m_parentScope = toCopy.m_parentScope;
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		return new GuardedCommand(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetGuard(Expression newGuard)
+	{
+		if (newGuard == null)
+			throw new ArgumentException();
+		m_guard = newGuard;
+	}
+
+	public void SetBody(Statement newBody)
+	{
+		if (newBody == null)
+			throw new ArgumentException();
+		m_body = newBody;
+		checkBody();
+	}
+
+	private void checkBody() {
+		if (m_body instanceof IScope) {
+			final IScope s = (IScope) m_body;
+			if (s.GetParentScope() == null)
+				s.SetParentScope(this);
+			else if (s.GetParentScope() != this)
+				throw new InternalCompilerException("Internal Error: GuardedCommandBody has parent set to different method than it was added to.");
+		}
+	}
+
+	public void SetIsQualitative(boolean newVal)
+	{
+		m_isQualitative = newVal;
+	}
+
+	@Override
+	public Identifier ResolveIdentifier(String aName) {
+		return null;
+	}
+	@Override
+	public IScope GetParentScope() {
+		return m_parentScope;
+	}
+	@Override
+	public void SetParentScope(IScope parentScope) {
+		m_parentScope = parentScope;
+	}
+	@Override
+	public void AddIdentifier(Identifier anIdentifier, Object tag) {
+		throw new InternalCompilerException("Cannot add identifier to guarded command.");
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/FunctionType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/FunctionType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/FunctionType.java	(revision 2)
@@ -0,0 +1,127 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import java.util.LinkedList;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+///////////////////////////////////////////////
+///  Complex Type: Function
+///
+public final class FunctionType extends UlyssesType
+{
+	public enum FunctionTypeEnum {
+		Observable (0),
+		Controllable (1),
+		Continuous (2),
+		Internal (3),
+		Method (4);
+
+		public final int integerValue; // do not change, this is needed by the backends! i.e. public API
+
+		private FunctionTypeEnum(int val) {
+			integerValue = val;
+		}
+	}
+
+	private Boolean m_miracleSafe = null;
+	private boolean m_pure;
+	private LinkedList<UlyssesType> m_parameter;
+	private UlyssesType m_returnType;
+	private final FunctionTypeEnum m_functionType;
+
+	public Boolean isMiracleSafe() { return m_miracleSafe; }
+	public boolean isPureFunction() { return m_pure; }
+	public LinkedList<UlyssesType> parameter() { return m_parameter; }
+	public UlyssesType returnType() { return m_returnType; }
+	public FunctionTypeEnum functionType() { return m_functionType; }
+
+	public FunctionType(FunctionTypeEnum functionType, LinkedList<UlyssesType> parameter, UlyssesType returnType)
+	{
+		super (TypeKind.FunctionType, null);
+		if (parameter != null)
+			m_parameter = parameter;
+		else
+			m_parameter = new LinkedList<UlyssesType>();
+		m_returnType = returnType;
+		m_functionType = functionType;
+		m_miracleSafe = null;
+		m_pure = false;
+	}
+
+
+	public void AddParameterType(UlyssesType aType)
+	{
+		m_parameter.addLast(aType);
+	}
+
+	public void SetReturnType(UlyssesType aType)
+	{
+		m_returnType = aType;
+	}
+
+	public void SetMiracleSafe(boolean newValue)
+	{
+		m_miracleSafe = newValue;
+	}
+
+	public void SetIsPureFunction(boolean newValue)
+	{
+		m_pure = newValue;
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public /*override*/ String AnonymousName()
+	{
+		final StringBuilder result = new StringBuilder();
+		result.append("fun_");
+		result.append(m_functionType.toString());
+		result.append("_");
+		for (final UlyssesType sym: m_parameter)
+		{
+			result.append(sym.toString());
+			result.append("_");
+		}
+		result.append("_");
+		if (m_returnType != null)
+			result.append(m_returnType.toString());
+		else
+			result.append("void");
+// the anonymous name MUST stay the same!
+//		result.append("_");
+//		result.append(m_pure);
+		return result.toString();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/ActionSystem.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/ActionSystem.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/ActionSystem.java	(revision 2)
@@ -0,0 +1,53 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import java.util.ArrayList;
+
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+
+
+///////////////////////////////////////////////
+///  Not really a type - this is the structure for the instantiated action system
+///  (all the objects flattened)
+///
+
+public final class ActionSystem extends OoActionSystemType
+{
+	private final ArrayList<OoActionSystemType> m_types;
+
+	public ArrayList<OoActionSystemType> types() { return m_types; }
+
+
+	public ActionSystem()
+	{
+		super(false, null, null);
+		m_types = new ArrayList<OoActionSystemType>();
+		m_identifier = new TypeIdentifier("__system", this, null);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/QualitativeConstraintStatement.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/QualitativeConstraintStatement.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/QualitativeConstraintStatement.java	(revision 2)
@@ -0,0 +1,114 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+
+///////////////////////////////////////////////
+///  Qualitative Constraints
+///
+public final class QualitativeConstraintStatement extends Statement
+{
+	public enum QualitativeConstraintOperation { Equal, Deriv, Sum, Prod, Diff }
+
+	private Identifier m_variable0;
+	private Identifier m_variable1;
+	private Identifier m_variable2;
+	private final QualitativeConstraintOperation m_operation;
+	public boolean tag = false; // says that this is an obs assignment (important for prolog code target)
+
+	public Identifier variable0() { return m_variable0; }
+	public Identifier variable1() { return m_variable1; }
+	public Identifier variable2() { return m_variable2; }
+	public QualitativeConstraintOperation operation() { return m_operation; }
+
+	public QualitativeConstraintStatement(Identifier var0, Identifier var1, QualitativeConstraintOperation op, int aline, int apos)
+	{
+		super (StatementKind.QualConstraint, aline, apos);
+		if (op == QualitativeConstraintOperation.Diff
+				|| op == QualitativeConstraintOperation.Prod
+				|| op == QualitativeConstraintOperation.Sum)
+			throw new ArgumentException();
+		m_variable0 = var0;
+		m_variable1 = var1;
+		m_variable2 = null;
+		m_operation = op;
+	}
+
+	public QualitativeConstraintStatement(QualitativeConstraintStatement toCopy)
+	{
+		super (toCopy);
+		m_variable0 = toCopy.m_variable0;
+		m_variable1 = toCopy.m_variable1;
+		m_variable2 = toCopy.m_variable2;
+		m_operation = toCopy.m_operation;
+		tag = toCopy.tag;
+	}
+
+
+	public QualitativeConstraintStatement(Identifier var0, Identifier var1, Identifier var2, QualitativeConstraintOperation op, int aline, int apos)
+	{
+		super (StatementKind.QualConstraint, aline, apos);
+		if (op == QualitativeConstraintOperation.Deriv
+				|| op == QualitativeConstraintOperation.Equal)
+			throw new ArgumentException();
+		m_variable0 = var0;
+		m_variable1 = var1;
+		m_variable2 = var2;
+		m_operation = op;
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		return new QualitativeConstraintStatement(this);
+	}
+
+	public void SetVariable0(Identifier newVal)
+	{
+		m_variable0 = newVal;
+	}
+
+	public void SetVariable1(Identifier newVal)
+	{
+		m_variable1 = newVal;
+	}
+
+	public void SetVariable2(Identifier newVal)
+	{
+		m_variable2 = newVal;
+	}
+}
Index: trunk/compiler/cppAst/ast/serialize/gen/Record.pb.cc
===================================================================
--- trunk/compiler/cppAst/ast/serialize/gen/Record.pb.cc	(nonexistent)
+++ trunk/compiler/cppAst/ast/serialize/gen/Record.pb.cc	(revision 2)
@@ -0,0 +1,1646 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: Record.proto
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "Record.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// @@protoc_insertion_point(includes)
+
+namespace serialize {
+
+namespace {
+
+const ::google::protobuf::Descriptor* PBParameter_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+  PBParameter_reflection_ = NULL;
+const ::google::protobuf::Descriptor* PBReturnValue_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+  PBReturnValue_reflection_ = NULL;
+const ::google::protobuf::Descriptor* PBFunctionCall_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+  PBFunctionCall_reflection_ = NULL;
+const ::google::protobuf::Descriptor* PBAstTraversal_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+  PBAstTraversal_reflection_ = NULL;
+const ::google::protobuf::EnumDescriptor* PBReturnType_descriptor_ = NULL;
+
+}  // namespace
+
+
+void protobuf_AssignDesc_Record_2eproto() {
+  protobuf_AddDesc_Record_2eproto();
+  const ::google::protobuf::FileDescriptor* file =
+    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+      "Record.proto");
+  GOOGLE_CHECK(file != NULL);
+  PBParameter_descriptor_ = file->message_type(0);
+  static const int PBParameter_offsets_[5] = {
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBParameter, uint64_value_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBParameter, literal_value_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBParameter, bool_value_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBParameter, int32_value_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBParameter, uint32_value_),
+  };
+  PBParameter_reflection_ =
+    new ::google::protobuf::internal::GeneratedMessageReflection(
+      PBParameter_descriptor_,
+      PBParameter::default_instance_,
+      PBParameter_offsets_,
+      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBParameter, _has_bits_[0]),
+      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBParameter, _unknown_fields_),
+      -1,
+      ::google::protobuf::DescriptorPool::generated_pool(),
+      ::google::protobuf::MessageFactory::generated_factory(),
+      sizeof(PBParameter));
+  PBReturnValue_descriptor_ = file->message_type(1);
+  static const int PBReturnValue_offsets_[2] = {
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBReturnValue, return_type_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBReturnValue, return_id_),
+  };
+  PBReturnValue_reflection_ =
+    new ::google::protobuf::internal::GeneratedMessageReflection(
+      PBReturnValue_descriptor_,
+      PBReturnValue::default_instance_,
+      PBReturnValue_offsets_,
+      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBReturnValue, _has_bits_[0]),
+      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBReturnValue, _unknown_fields_),
+      -1,
+      ::google::protobuf::DescriptorPool::generated_pool(),
+      ::google::protobuf::MessageFactory::generated_factory(),
+      sizeof(PBReturnValue));
+  PBFunctionCall_descriptor_ = file->message_type(2);
+  static const int PBFunctionCall_offsets_[8] = {
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBFunctionCall, add_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBFunctionCall, allocate_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBFunctionCall, identifier_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBFunctionCall, type_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBFunctionCall, statement_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBFunctionCall, expression_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBFunctionCall, parameters_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBFunctionCall, return_value_),
+  };
+  PBFunctionCall_reflection_ =
+    new ::google::protobuf::internal::GeneratedMessageReflection(
+      PBFunctionCall_descriptor_,
+      PBFunctionCall::default_instance_,
+      PBFunctionCall_offsets_,
+      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBFunctionCall, _has_bits_[0]),
+      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBFunctionCall, _unknown_fields_),
+      -1,
+      ::google::protobuf::DescriptorPool::generated_pool(),
+      ::google::protobuf::MessageFactory::generated_factory(),
+      sizeof(PBFunctionCall));
+  PBAstTraversal_descriptor_ = file->message_type(3);
+  static const int PBAstTraversal_offsets_[2] = {
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBAstTraversal, calls_),
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBAstTraversal, main_module_),
+  };
+  PBAstTraversal_reflection_ =
+    new ::google::protobuf::internal::GeneratedMessageReflection(
+      PBAstTraversal_descriptor_,
+      PBAstTraversal::default_instance_,
+      PBAstTraversal_offsets_,
+      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBAstTraversal, _has_bits_[0]),
+      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PBAstTraversal, _unknown_fields_),
+      -1,
+      ::google::protobuf::DescriptorPool::generated_pool(),
+      ::google::protobuf::MessageFactory::generated_factory(),
+      sizeof(PBAstTraversal));
+  PBReturnType_descriptor_ = file->enum_type(0);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
+                 &protobuf_AssignDesc_Record_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+  protobuf_AssignDescriptorsOnce();
+  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+    PBParameter_descriptor_, &PBParameter::default_instance());
+  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+    PBReturnValue_descriptor_, &PBReturnValue::default_instance());
+  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+    PBFunctionCall_descriptor_, &PBFunctionCall::default_instance());
+  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+    PBAstTraversal_descriptor_, &PBAstTraversal::default_instance());
+}
+
+}  // namespace
+
+void protobuf_ShutdownFile_Record_2eproto() {
+  delete PBParameter::default_instance_;
+  delete PBParameter_reflection_;
+  delete PBReturnValue::default_instance_;
+  delete PBReturnValue_reflection_;
+  delete PBFunctionCall::default_instance_;
+  delete PBFunctionCall_reflection_;
+  delete PBAstTraversal::default_instance_;
+  delete PBAstTraversal_reflection_;
+}
+
+void protobuf_AddDesc_Record_2eproto() {
+  static bool already_here = false;
+  if (already_here) return;
+  already_here = true;
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+  ::serialize::protobuf_AddDesc_FunctionNames_2eproto();
+  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+    "\n\014Record.proto\022\tserialize\032\023FunctionNames"
+    ".proto\"y\n\013PBParameter\022\024\n\014uint64_value\030\001 "
+    "\001(\004\022\025\n\rliteral_value\030\002 \001(\t\022\022\n\nbool_value"
+    "\030\003 \001(\010\022\023\n\013int32_value\030\004 \001(\005\022\024\n\014uint32_va"
+    "lue\030\005 \001(\r\"P\n\rPBReturnValue\022,\n\013return_typ"
+    "e\030\001 \002(\0162\027.serialize.PBReturnType\022\021\n\tretu"
+    "rn_id\030\002 \001(\004\"\340\002\n\016PBFunctionCall\022\035\n\003add\030\001 "
+    "\001(\0162\020.serialize.PBAdd\022)\n\010allocate\030\002 \001(\0162"
+    "\027.serialize.PBAllocation\022,\n\nidentifier\030\003"
+    " \001(\0162\030.serialize.PBIdentifiers\022 \n\004type\030\004"
+    " \001(\0162\022.serialize.PBTypes\022*\n\tstatement\030\005 "
+    "\001(\0162\027.serialize.PBStatements\022,\n\nexpressi"
+    "on\030\006 \001(\0162\030.serialize.PBExpressions\022*\n\npa"
+    "rameters\030\007 \003(\0132\026.serialize.PBParameter\022."
+    "\n\014return_value\030\010 \002(\0132\030.serialize.PBRetur"
+    "nValue\"O\n\016PBAstTraversal\022(\n\005calls\030\001 \003(\0132"
+    "\031.serialize.PBFunctionCall\022\023\n\013main_modul"
+    "e\030\002 \002(\004*6\n\014PBReturnType\022\024\n\020type_voidPoin"
+    "ter\020\001\022\020\n\014type_boolean\020\002BH\n0at.ac.ait.mom"
+    "ut.ooas.argos.codegen.serialize.genB\024Rec"
+    "ordedAstTraversal", 817);
+  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+    "Record.proto", &protobuf_RegisterTypes);
+  PBParameter::default_instance_ = new PBParameter();
+  PBReturnValue::default_instance_ = new PBReturnValue();
+  PBFunctionCall::default_instance_ = new PBFunctionCall();
+  PBAstTraversal::default_instance_ = new PBAstTraversal();
+  PBParameter::default_instance_->InitAsDefaultInstance();
+  PBReturnValue::default_instance_->InitAsDefaultInstance();
+  PBFunctionCall::default_instance_->InitAsDefaultInstance();
+  PBAstTraversal::default_instance_->InitAsDefaultInstance();
+  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_Record_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_Record_2eproto {
+  StaticDescriptorInitializer_Record_2eproto() {
+    protobuf_AddDesc_Record_2eproto();
+  }
+} static_descriptor_initializer_Record_2eproto_;
+const ::google::protobuf::EnumDescriptor* PBReturnType_descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return PBReturnType_descriptor_;
+}
+bool PBReturnType_IsValid(int value) {
+  switch(value) {
+    case 1:
+    case 2:
+      return true;
+    default:
+      return false;
+  }
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int PBParameter::kUint64ValueFieldNumber;
+const int PBParameter::kLiteralValueFieldNumber;
+const int PBParameter::kBoolValueFieldNumber;
+const int PBParameter::kInt32ValueFieldNumber;
+const int PBParameter::kUint32ValueFieldNumber;
+#endif  // !_MSC_VER
+
+PBParameter::PBParameter()
+  : ::google::protobuf::Message() {
+  SharedCtor();
+}
+
+void PBParameter::InitAsDefaultInstance() {
+}
+
+PBParameter::PBParameter(const PBParameter& from)
+  : ::google::protobuf::Message() {
+  SharedCtor();
+  MergeFrom(from);
+}
+
+void PBParameter::SharedCtor() {
+  _cached_size_ = 0;
+  uint64_value_ = GOOGLE_ULONGLONG(0);
+  literal_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+  bool_value_ = false;
+  int32_value_ = 0;
+  uint32_value_ = 0u;
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+PBParameter::~PBParameter() {
+  SharedDtor();
+}
+
+void PBParameter::SharedDtor() {
+  if (literal_value_ != &::google::protobuf::internal::kEmptyString) {
+    delete literal_value_;
+  }
+  if (this != default_instance_) {
+  }
+}
+
+void PBParameter::SetCachedSize(int size) const {
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* PBParameter::descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return PBParameter_descriptor_;
+}
+
+const PBParameter& PBParameter::default_instance() {
+  if (default_instance_ == NULL) protobuf_AddDesc_Record_2eproto();
+  return *default_instance_;
+}
+
+PBParameter* PBParameter::default_instance_ = NULL;
+
+PBParameter* PBParameter::New() const {
+  return new PBParameter;
+}
+
+void PBParameter::Clear() {
+  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    uint64_value_ = GOOGLE_ULONGLONG(0);
+    if (has_literal_value()) {
+      if (literal_value_ != &::google::protobuf::internal::kEmptyString) {
+        literal_value_->clear();
+      }
+    }
+    bool_value_ = false;
+    int32_value_ = 0;
+    uint32_value_ = 0u;
+  }
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+  mutable_unknown_fields()->Clear();
+}
+
+bool PBParameter::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+  ::google::protobuf::uint32 tag;
+  while ((tag = input->ReadTag()) != 0) {
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // optional uint64 uint64_value = 1;
+      case 1: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
+                 input, &uint64_value_)));
+          set_has_uint64_value();
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(18)) goto parse_literal_value;
+        break;
+      }
+
+      // optional string literal_value = 2;
+      case 2: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+         parse_literal_value:
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_literal_value()));
+          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+            this->literal_value().data(), this->literal_value().length(),
+            ::google::protobuf::internal::WireFormat::PARSE);
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(24)) goto parse_bool_value;
+        break;
+      }
+
+      // optional bool bool_value = 3;
+      case 3: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+         parse_bool_value:
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+                 input, &bool_value_)));
+          set_has_bool_value();
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(32)) goto parse_int32_value;
+        break;
+      }
+
+      // optional int32 int32_value = 4;
+      case 4: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+         parse_int32_value:
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+                 input, &int32_value_)));
+          set_has_int32_value();
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(40)) goto parse_uint32_value;
+        break;
+      }
+
+      // optional uint32 uint32_value = 5;
+      case 5: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+         parse_uint32_value:
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
+                 input, &uint32_value_)));
+          set_has_uint32_value();
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectAtEnd()) return true;
+        break;
+      }
+
+      default: {
+      handle_uninterpreted:
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+          return true;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+  return true;
+#undef DO_
+}
+
+void PBParameter::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // optional uint64 uint64_value = 1;
+  if (has_uint64_value()) {
+    ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->uint64_value(), output);
+  }
+
+  // optional string literal_value = 2;
+  if (has_literal_value()) {
+    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+      this->literal_value().data(), this->literal_value().length(),
+      ::google::protobuf::internal::WireFormat::SERIALIZE);
+    ::google::protobuf::internal::WireFormatLite::WriteString(
+      2, this->literal_value(), output);
+  }
+
+  // optional bool bool_value = 3;
+  if (has_bool_value()) {
+    ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->bool_value(), output);
+  }
+
+  // optional int32 int32_value = 4;
+  if (has_int32_value()) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->int32_value(), output);
+  }
+
+  // optional uint32 uint32_value = 5;
+  if (has_uint32_value()) {
+    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->uint32_value(), output);
+  }
+
+  if (!unknown_fields().empty()) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        unknown_fields(), output);
+  }
+}
+
+::google::protobuf::uint8* PBParameter::SerializeWithCachedSizesToArray(
+    ::google::protobuf::uint8* target) const {
+  // optional uint64 uint64_value = 1;
+  if (has_uint64_value()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->uint64_value(), target);
+  }
+
+  // optional string literal_value = 2;
+  if (has_literal_value()) {
+    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+      this->literal_value().data(), this->literal_value().length(),
+      ::google::protobuf::internal::WireFormat::SERIALIZE);
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        2, this->literal_value(), target);
+  }
+
+  // optional bool bool_value = 3;
+  if (has_bool_value()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->bool_value(), target);
+  }
+
+  // optional int32 int32_value = 4;
+  if (has_int32_value()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->int32_value(), target);
+  }
+
+  // optional uint32 uint32_value = 5;
+  if (has_uint32_value()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->uint32_value(), target);
+  }
+
+  if (!unknown_fields().empty()) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        unknown_fields(), target);
+  }
+  return target;
+}
+
+int PBParameter::ByteSize() const {
+  int total_size = 0;
+
+  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    // optional uint64 uint64_value = 1;
+    if (has_uint64_value()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::UInt64Size(
+          this->uint64_value());
+    }
+
+    // optional string literal_value = 2;
+    if (has_literal_value()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::StringSize(
+          this->literal_value());
+    }
+
+    // optional bool bool_value = 3;
+    if (has_bool_value()) {
+      total_size += 1 + 1;
+    }
+
+    // optional int32 int32_value = 4;
+    if (has_int32_value()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::Int32Size(
+          this->int32_value());
+    }
+
+    // optional uint32 uint32_value = 5;
+    if (has_uint32_value()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::UInt32Size(
+          this->uint32_value());
+    }
+
+  }
+  if (!unknown_fields().empty()) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        unknown_fields());
+  }
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = total_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+  return total_size;
+}
+
+void PBParameter::MergeFrom(const ::google::protobuf::Message& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  const PBParameter* source =
+    ::google::protobuf::internal::dynamic_cast_if_available<const PBParameter*>(
+      &from);
+  if (source == NULL) {
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+    MergeFrom(*source);
+  }
+}
+
+void PBParameter::MergeFrom(const PBParameter& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    if (from.has_uint64_value()) {
+      set_uint64_value(from.uint64_value());
+    }
+    if (from.has_literal_value()) {
+      set_literal_value(from.literal_value());
+    }
+    if (from.has_bool_value()) {
+      set_bool_value(from.bool_value());
+    }
+    if (from.has_int32_value()) {
+      set_int32_value(from.int32_value());
+    }
+    if (from.has_uint32_value()) {
+      set_uint32_value(from.uint32_value());
+    }
+  }
+  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void PBParameter::CopyFrom(const ::google::protobuf::Message& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void PBParameter::CopyFrom(const PBParameter& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool PBParameter::IsInitialized() const {
+
+  return true;
+}
+
+void PBParameter::Swap(PBParameter* other) {
+  if (other != this) {
+    std::swap(uint64_value_, other->uint64_value_);
+    std::swap(literal_value_, other->literal_value_);
+    std::swap(bool_value_, other->bool_value_);
+    std::swap(int32_value_, other->int32_value_);
+    std::swap(uint32_value_, other->uint32_value_);
+    std::swap(_has_bits_[0], other->_has_bits_[0]);
+    _unknown_fields_.Swap(&other->_unknown_fields_);
+    std::swap(_cached_size_, other->_cached_size_);
+  }
+}
+
+::google::protobuf::Metadata PBParameter::GetMetadata() const {
+  protobuf_AssignDescriptorsOnce();
+  ::google::protobuf::Metadata metadata;
+  metadata.descriptor = PBParameter_descriptor_;
+  metadata.reflection = PBParameter_reflection_;
+  return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int PBReturnValue::kReturnTypeFieldNumber;
+const int PBReturnValue::kReturnIdFieldNumber;
+#endif  // !_MSC_VER
+
+PBReturnValue::PBReturnValue()
+  : ::google::protobuf::Message() {
+  SharedCtor();
+}
+
+void PBReturnValue::InitAsDefaultInstance() {
+}
+
+PBReturnValue::PBReturnValue(const PBReturnValue& from)
+  : ::google::protobuf::Message() {
+  SharedCtor();
+  MergeFrom(from);
+}
+
+void PBReturnValue::SharedCtor() {
+  _cached_size_ = 0;
+  return_type_ = 1;
+  return_id_ = GOOGLE_ULONGLONG(0);
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+PBReturnValue::~PBReturnValue() {
+  SharedDtor();
+}
+
+void PBReturnValue::SharedDtor() {
+  if (this != default_instance_) {
+  }
+}
+
+void PBReturnValue::SetCachedSize(int size) const {
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* PBReturnValue::descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return PBReturnValue_descriptor_;
+}
+
+const PBReturnValue& PBReturnValue::default_instance() {
+  if (default_instance_ == NULL) protobuf_AddDesc_Record_2eproto();
+  return *default_instance_;
+}
+
+PBReturnValue* PBReturnValue::default_instance_ = NULL;
+
+PBReturnValue* PBReturnValue::New() const {
+  return new PBReturnValue;
+}
+
+void PBReturnValue::Clear() {
+  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    return_type_ = 1;
+    return_id_ = GOOGLE_ULONGLONG(0);
+  }
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+  mutable_unknown_fields()->Clear();
+}
+
+bool PBReturnValue::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+  ::google::protobuf::uint32 tag;
+  while ((tag = input->ReadTag()) != 0) {
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // required .serialize.PBReturnType return_type = 1;
+      case 1: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::serialize::PBReturnType_IsValid(value)) {
+            set_return_type(static_cast< ::serialize::PBReturnType >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(1, value);
+          }
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(16)) goto parse_return_id;
+        break;
+      }
+
+      // optional uint64 return_id = 2;
+      case 2: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+         parse_return_id:
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
+                 input, &return_id_)));
+          set_has_return_id();
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectAtEnd()) return true;
+        break;
+      }
+
+      default: {
+      handle_uninterpreted:
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+          return true;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+  return true;
+#undef DO_
+}
+
+void PBReturnValue::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // required .serialize.PBReturnType return_type = 1;
+  if (has_return_type()) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      1, this->return_type(), output);
+  }
+
+  // optional uint64 return_id = 2;
+  if (has_return_id()) {
+    ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->return_id(), output);
+  }
+
+  if (!unknown_fields().empty()) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        unknown_fields(), output);
+  }
+}
+
+::google::protobuf::uint8* PBReturnValue::SerializeWithCachedSizesToArray(
+    ::google::protobuf::uint8* target) const {
+  // required .serialize.PBReturnType return_type = 1;
+  if (has_return_type()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+      1, this->return_type(), target);
+  }
+
+  // optional uint64 return_id = 2;
+  if (has_return_id()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->return_id(), target);
+  }
+
+  if (!unknown_fields().empty()) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        unknown_fields(), target);
+  }
+  return target;
+}
+
+int PBReturnValue::ByteSize() const {
+  int total_size = 0;
+
+  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    // required .serialize.PBReturnType return_type = 1;
+    if (has_return_type()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->return_type());
+    }
+
+    // optional uint64 return_id = 2;
+    if (has_return_id()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::UInt64Size(
+          this->return_id());
+    }
+
+  }
+  if (!unknown_fields().empty()) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        unknown_fields());
+  }
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = total_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+  return total_size;
+}
+
+void PBReturnValue::MergeFrom(const ::google::protobuf::Message& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  const PBReturnValue* source =
+    ::google::protobuf::internal::dynamic_cast_if_available<const PBReturnValue*>(
+      &from);
+  if (source == NULL) {
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+    MergeFrom(*source);
+  }
+}
+
+void PBReturnValue::MergeFrom(const PBReturnValue& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    if (from.has_return_type()) {
+      set_return_type(from.return_type());
+    }
+    if (from.has_return_id()) {
+      set_return_id(from.return_id());
+    }
+  }
+  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void PBReturnValue::CopyFrom(const ::google::protobuf::Message& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void PBReturnValue::CopyFrom(const PBReturnValue& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool PBReturnValue::IsInitialized() const {
+  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
+
+  return true;
+}
+
+void PBReturnValue::Swap(PBReturnValue* other) {
+  if (other != this) {
+    std::swap(return_type_, other->return_type_);
+    std::swap(return_id_, other->return_id_);
+    std::swap(_has_bits_[0], other->_has_bits_[0]);
+    _unknown_fields_.Swap(&other->_unknown_fields_);
+    std::swap(_cached_size_, other->_cached_size_);
+  }
+}
+
+::google::protobuf::Metadata PBReturnValue::GetMetadata() const {
+  protobuf_AssignDescriptorsOnce();
+  ::google::protobuf::Metadata metadata;
+  metadata.descriptor = PBReturnValue_descriptor_;
+  metadata.reflection = PBReturnValue_reflection_;
+  return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int PBFunctionCall::kAddFieldNumber;
+const int PBFunctionCall::kAllocateFieldNumber;
+const int PBFunctionCall::kIdentifierFieldNumber;
+const int PBFunctionCall::kTypeFieldNumber;
+const int PBFunctionCall::kStatementFieldNumber;
+const int PBFunctionCall::kExpressionFieldNumber;
+const int PBFunctionCall::kParametersFieldNumber;
+const int PBFunctionCall::kReturnValueFieldNumber;
+#endif  // !_MSC_VER
+
+PBFunctionCall::PBFunctionCall()
+  : ::google::protobuf::Message() {
+  SharedCtor();
+}
+
+void PBFunctionCall::InitAsDefaultInstance() {
+  return_value_ = const_cast< ::serialize::PBReturnValue*>(&::serialize::PBReturnValue::default_instance());
+}
+
+PBFunctionCall::PBFunctionCall(const PBFunctionCall& from)
+  : ::google::protobuf::Message() {
+  SharedCtor();
+  MergeFrom(from);
+}
+
+void PBFunctionCall::SharedCtor() {
+  _cached_size_ = 0;
+  add_ = 0;
+  allocate_ = 0;
+  identifier_ = 1;
+  type_ = 1;
+  statement_ = 3;
+  expression_ = 4;
+  return_value_ = NULL;
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+PBFunctionCall::~PBFunctionCall() {
+  SharedDtor();
+}
+
+void PBFunctionCall::SharedDtor() {
+  if (this != default_instance_) {
+    delete return_value_;
+  }
+}
+
+void PBFunctionCall::SetCachedSize(int size) const {
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* PBFunctionCall::descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return PBFunctionCall_descriptor_;
+}
+
+const PBFunctionCall& PBFunctionCall::default_instance() {
+  if (default_instance_ == NULL) protobuf_AddDesc_Record_2eproto();
+  return *default_instance_;
+}
+
+PBFunctionCall* PBFunctionCall::default_instance_ = NULL;
+
+PBFunctionCall* PBFunctionCall::New() const {
+  return new PBFunctionCall;
+}
+
+void PBFunctionCall::Clear() {
+  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    add_ = 0;
+    allocate_ = 0;
+    identifier_ = 1;
+    type_ = 1;
+    statement_ = 3;
+    expression_ = 4;
+    if (has_return_value()) {
+      if (return_value_ != NULL) return_value_->::serialize::PBReturnValue::Clear();
+    }
+  }
+  parameters_.Clear();
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+  mutable_unknown_fields()->Clear();
+}
+
+bool PBFunctionCall::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+  ::google::protobuf::uint32 tag;
+  while ((tag = input->ReadTag()) != 0) {
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // optional .serialize.PBAdd add = 1;
+      case 1: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::serialize::PBAdd_IsValid(value)) {
+            set_add(static_cast< ::serialize::PBAdd >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(1, value);
+          }
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(16)) goto parse_allocate;
+        break;
+      }
+
+      // optional .serialize.PBAllocation allocate = 2;
+      case 2: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+         parse_allocate:
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::serialize::PBAllocation_IsValid(value)) {
+            set_allocate(static_cast< ::serialize::PBAllocation >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(2, value);
+          }
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(24)) goto parse_identifier;
+        break;
+      }
+
+      // optional .serialize.PBIdentifiers identifier = 3;
+      case 3: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+         parse_identifier:
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::serialize::PBIdentifiers_IsValid(value)) {
+            set_identifier(static_cast< ::serialize::PBIdentifiers >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(3, value);
+          }
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(32)) goto parse_type;
+        break;
+      }
+
+      // optional .serialize.PBTypes type = 4;
+      case 4: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+         parse_type:
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::serialize::PBTypes_IsValid(value)) {
+            set_type(static_cast< ::serialize::PBTypes >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(4, value);
+          }
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(40)) goto parse_statement;
+        break;
+      }
+
+      // optional .serialize.PBStatements statement = 5;
+      case 5: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+         parse_statement:
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::serialize::PBStatements_IsValid(value)) {
+            set_statement(static_cast< ::serialize::PBStatements >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(5, value);
+          }
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(48)) goto parse_expression;
+        break;
+      }
+
+      // optional .serialize.PBExpressions expression = 6;
+      case 6: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+         parse_expression:
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::serialize::PBExpressions_IsValid(value)) {
+            set_expression(static_cast< ::serialize::PBExpressions >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(6, value);
+          }
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(58)) goto parse_parameters;
+        break;
+      }
+
+      // repeated .serialize.PBParameter parameters = 7;
+      case 7: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+         parse_parameters:
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+                input, add_parameters()));
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(58)) goto parse_parameters;
+        if (input->ExpectTag(66)) goto parse_return_value;
+        break;
+      }
+
+      // required .serialize.PBReturnValue return_value = 8;
+      case 8: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+         parse_return_value:
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+               input, mutable_return_value()));
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectAtEnd()) return true;
+        break;
+      }
+
+      default: {
+      handle_uninterpreted:
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+          return true;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+  return true;
+#undef DO_
+}
+
+void PBFunctionCall::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // optional .serialize.PBAdd add = 1;
+  if (has_add()) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      1, this->add(), output);
+  }
+
+  // optional .serialize.PBAllocation allocate = 2;
+  if (has_allocate()) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      2, this->allocate(), output);
+  }
+
+  // optional .serialize.PBIdentifiers identifier = 3;
+  if (has_identifier()) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      3, this->identifier(), output);
+  }
+
+  // optional .serialize.PBTypes type = 4;
+  if (has_type()) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      4, this->type(), output);
+  }
+
+  // optional .serialize.PBStatements statement = 5;
+  if (has_statement()) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      5, this->statement(), output);
+  }
+
+  // optional .serialize.PBExpressions expression = 6;
+  if (has_expression()) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      6, this->expression(), output);
+  }
+
+  // repeated .serialize.PBParameter parameters = 7;
+  for (int i = 0; i < this->parameters_size(); i++) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      7, this->parameters(i), output);
+  }
+
+  // required .serialize.PBReturnValue return_value = 8;
+  if (has_return_value()) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      8, this->return_value(), output);
+  }
+
+  if (!unknown_fields().empty()) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        unknown_fields(), output);
+  }
+}
+
+::google::protobuf::uint8* PBFunctionCall::SerializeWithCachedSizesToArray(
+    ::google::protobuf::uint8* target) const {
+  // optional .serialize.PBAdd add = 1;
+  if (has_add()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+      1, this->add(), target);
+  }
+
+  // optional .serialize.PBAllocation allocate = 2;
+  if (has_allocate()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+      2, this->allocate(), target);
+  }
+
+  // optional .serialize.PBIdentifiers identifier = 3;
+  if (has_identifier()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+      3, this->identifier(), target);
+  }
+
+  // optional .serialize.PBTypes type = 4;
+  if (has_type()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+      4, this->type(), target);
+  }
+
+  // optional .serialize.PBStatements statement = 5;
+  if (has_statement()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+      5, this->statement(), target);
+  }
+
+  // optional .serialize.PBExpressions expression = 6;
+  if (has_expression()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+      6, this->expression(), target);
+  }
+
+  // repeated .serialize.PBParameter parameters = 7;
+  for (int i = 0; i < this->parameters_size(); i++) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      WriteMessageNoVirtualToArray(
+        7, this->parameters(i), target);
+  }
+
+  // required .serialize.PBReturnValue return_value = 8;
+  if (has_return_value()) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      WriteMessageNoVirtualToArray(
+        8, this->return_value(), target);
+  }
+
+  if (!unknown_fields().empty()) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        unknown_fields(), target);
+  }
+  return target;
+}
+
+int PBFunctionCall::ByteSize() const {
+  int total_size = 0;
+
+  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    // optional .serialize.PBAdd add = 1;
+    if (has_add()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->add());
+    }
+
+    // optional .serialize.PBAllocation allocate = 2;
+    if (has_allocate()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->allocate());
+    }
+
+    // optional .serialize.PBIdentifiers identifier = 3;
+    if (has_identifier()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->identifier());
+    }
+
+    // optional .serialize.PBTypes type = 4;
+    if (has_type()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
+    }
+
+    // optional .serialize.PBStatements statement = 5;
+    if (has_statement()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->statement());
+    }
+
+    // optional .serialize.PBExpressions expression = 6;
+    if (has_expression()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->expression());
+    }
+
+    // required .serialize.PBReturnValue return_value = 8;
+    if (has_return_value()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+          this->return_value());
+    }
+
+  }
+  // repeated .serialize.PBParameter parameters = 7;
+  total_size += 1 * this->parameters_size();
+  for (int i = 0; i < this->parameters_size(); i++) {
+    total_size +=
+      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+        this->parameters(i));
+  }
+
+  if (!unknown_fields().empty()) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        unknown_fields());
+  }
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = total_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+  return total_size;
+}
+
+void PBFunctionCall::MergeFrom(const ::google::protobuf::Message& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  const PBFunctionCall* source =
+    ::google::protobuf::internal::dynamic_cast_if_available<const PBFunctionCall*>(
+      &from);
+  if (source == NULL) {
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+    MergeFrom(*source);
+  }
+}
+
+void PBFunctionCall::MergeFrom(const PBFunctionCall& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  parameters_.MergeFrom(from.parameters_);
+  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    if (from.has_add()) {
+      set_add(from.add());
+    }
+    if (from.has_allocate()) {
+      set_allocate(from.allocate());
+    }
+    if (from.has_identifier()) {
+      set_identifier(from.identifier());
+    }
+    if (from.has_type()) {
+      set_type(from.type());
+    }
+    if (from.has_statement()) {
+      set_statement(from.statement());
+    }
+    if (from.has_expression()) {
+      set_expression(from.expression());
+    }
+    if (from.has_return_value()) {
+      mutable_return_value()->::serialize::PBReturnValue::MergeFrom(from.return_value());
+    }
+  }
+  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void PBFunctionCall::CopyFrom(const ::google::protobuf::Message& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void PBFunctionCall::CopyFrom(const PBFunctionCall& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool PBFunctionCall::IsInitialized() const {
+  if ((_has_bits_[0] & 0x00000080) != 0x00000080) return false;
+
+  if (has_return_value()) {
+    if (!this->return_value().IsInitialized()) return false;
+  }
+  return true;
+}
+
+void PBFunctionCall::Swap(PBFunctionCall* other) {
+  if (other != this) {
+    std::swap(add_, other->add_);
+    std::swap(allocate_, other->allocate_);
+    std::swap(identifier_, other->identifier_);
+    std::swap(type_, other->type_);
+    std::swap(statement_, other->statement_);
+    std::swap(expression_, other->expression_);
+    parameters_.Swap(&other->parameters_);
+    std::swap(return_value_, other->return_value_);
+    std::swap(_has_bits_[0], other->_has_bits_[0]);
+    _unknown_fields_.Swap(&other->_unknown_fields_);
+    std::swap(_cached_size_, other->_cached_size_);
+  }
+}
+
+::google::protobuf::Metadata PBFunctionCall::GetMetadata() const {
+  protobuf_AssignDescriptorsOnce();
+  ::google::protobuf::Metadata metadata;
+  metadata.descriptor = PBFunctionCall_descriptor_;
+  metadata.reflection = PBFunctionCall_reflection_;
+  return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
+const int PBAstTraversal::kCallsFieldNumber;
+const int PBAstTraversal::kMainModuleFieldNumber;
+#endif  // !_MSC_VER
+
+PBAstTraversal::PBAstTraversal()
+  : ::google::protobuf::Message() {
+  SharedCtor();
+}
+
+void PBAstTraversal::InitAsDefaultInstance() {
+}
+
+PBAstTraversal::PBAstTraversal(const PBAstTraversal& from)
+  : ::google::protobuf::Message() {
+  SharedCtor();
+  MergeFrom(from);
+}
+
+void PBAstTraversal::SharedCtor() {
+  _cached_size_ = 0;
+  main_module_ = GOOGLE_ULONGLONG(0);
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+PBAstTraversal::~PBAstTraversal() {
+  SharedDtor();
+}
+
+void PBAstTraversal::SharedDtor() {
+  if (this != default_instance_) {
+  }
+}
+
+void PBAstTraversal::SetCachedSize(int size) const {
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* PBAstTraversal::descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return PBAstTraversal_descriptor_;
+}
+
+const PBAstTraversal& PBAstTraversal::default_instance() {
+  if (default_instance_ == NULL) protobuf_AddDesc_Record_2eproto();
+  return *default_instance_;
+}
+
+PBAstTraversal* PBAstTraversal::default_instance_ = NULL;
+
+PBAstTraversal* PBAstTraversal::New() const {
+  return new PBAstTraversal;
+}
+
+void PBAstTraversal::Clear() {
+  if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
+    main_module_ = GOOGLE_ULONGLONG(0);
+  }
+  calls_.Clear();
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+  mutable_unknown_fields()->Clear();
+}
+
+bool PBAstTraversal::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+  ::google::protobuf::uint32 tag;
+  while ((tag = input->ReadTag()) != 0) {
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // repeated .serialize.PBFunctionCall calls = 1;
+      case 1: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+         parse_calls:
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+                input, add_calls()));
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectTag(10)) goto parse_calls;
+        if (input->ExpectTag(16)) goto parse_main_module;
+        break;
+      }
+
+      // required uint64 main_module = 2;
+      case 2: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+         parse_main_module:
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
+                 input, &main_module_)));
+          set_has_main_module();
+        } else {
+          goto handle_uninterpreted;
+        }
+        if (input->ExpectAtEnd()) return true;
+        break;
+      }
+
+      default: {
+      handle_uninterpreted:
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+          return true;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+  return true;
+#undef DO_
+}
+
+void PBAstTraversal::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // repeated .serialize.PBFunctionCall calls = 1;
+  for (int i = 0; i < this->calls_size(); i++) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      1, this->calls(i), output);
+  }
+
+  // required uint64 main_module = 2;
+  if (has_main_module()) {
+    ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->main_module(), output);
+  }
+
+  if (!unknown_fields().empty()) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        unknown_fields(), output);
+  }
+}
+
+::google::protobuf::uint8* PBAstTraversal::SerializeWithCachedSizesToArray(
+    ::google::protobuf::uint8* target) const {
+  // repeated .serialize.PBFunctionCall calls = 1;
+  for (int i = 0; i < this->calls_size(); i++) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      WriteMessageNoVirtualToArray(
+        1, this->calls(i), target);
+  }
+
+  // required uint64 main_module = 2;
+  if (has_main_module()) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->main_module(), target);
+  }
+
+  if (!unknown_fields().empty()) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        unknown_fields(), target);
+  }
+  return target;
+}
+
+int PBAstTraversal::ByteSize() const {
+  int total_size = 0;
+
+  if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
+    // required uint64 main_module = 2;
+    if (has_main_module()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::UInt64Size(
+          this->main_module());
+    }
+
+  }
+  // repeated .serialize.PBFunctionCall calls = 1;
+  total_size += 1 * this->calls_size();
+  for (int i = 0; i < this->calls_size(); i++) {
+    total_size +=
+      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+        this->calls(i));
+  }
+
+  if (!unknown_fields().empty()) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        unknown_fields());
+  }
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = total_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+  return total_size;
+}
+
+void PBAstTraversal::MergeFrom(const ::google::protobuf::Message& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  const PBAstTraversal* source =
+    ::google::protobuf::internal::dynamic_cast_if_available<const PBAstTraversal*>(
+      &from);
+  if (source == NULL) {
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+    MergeFrom(*source);
+  }
+}
+
+void PBAstTraversal::MergeFrom(const PBAstTraversal& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  calls_.MergeFrom(from.calls_);
+  if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
+    if (from.has_main_module()) {
+      set_main_module(from.main_module());
+    }
+  }
+  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void PBAstTraversal::CopyFrom(const ::google::protobuf::Message& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void PBAstTraversal::CopyFrom(const PBAstTraversal& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool PBAstTraversal::IsInitialized() const {
+  if ((_has_bits_[0] & 0x00000002) != 0x00000002) return false;
+
+  for (int i = 0; i < calls_size(); i++) {
+    if (!this->calls(i).IsInitialized()) return false;
+  }
+  return true;
+}
+
+void PBAstTraversal::Swap(PBAstTraversal* other) {
+  if (other != this) {
+    calls_.Swap(&other->calls_);
+    std::swap(main_module_, other->main_module_);
+    std::swap(_has_bits_[0], other->_has_bits_[0]);
+    _unknown_fields_.Swap(&other->_unknown_fields_);
+    std::swap(_cached_size_, other->_cached_size_);
+  }
+}
+
+::google::protobuf::Metadata PBAstTraversal::GetMetadata() const {
+  protobuf_AssignDescriptorsOnce();
+  ::google::protobuf::Metadata metadata;
+  metadata.descriptor = PBAstTraversal_descriptor_;
+  metadata.reflection = PBAstTraversal_reflection_;
+  return metadata;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+}  // namespace serialize
+
+// @@protoc_insertion_point(global_scope)
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/NullType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/NullType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/NullType.java	(revision 2)
@@ -0,0 +1,53 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+///////////////////////////////////////////////
+///  Special type: null
+///
+public final class NullType extends UlyssesType
+{
+	public NullType()
+	{
+		super(TypeKind.Null, null);
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public String AnonymousName()
+	{
+		return "null";
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/EnumType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/EnumType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/EnumType.java	(revision 2)
@@ -0,0 +1,91 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.parser.SymbolTable;
+import org.momut.ooas.utils.exceptions.SymbolAlreadyDefinedException;
+
+///////////////////////////////////////////////
+///  Simple Type: Enumeration
+///
+public class EnumType extends UlyssesType
+{
+	protected SymbolTable m_enumSymbols;
+	protected ArrayList<EnumIdentifier> m_listOfEnumSymbols;
+
+	public SymbolTable symbolTable() { return m_enumSymbols; }
+	public ArrayList<EnumIdentifier> listOfEnumSymbols() { return m_listOfEnumSymbols; }
+
+	public EnumType(TypeIdentifier anIdentifier)
+	{
+		super (TypeKind.EnumeratedType, anIdentifier);
+		m_enumSymbols = new SymbolTable();
+		m_listOfEnumSymbols = new ArrayList<EnumIdentifier>();
+	}
+
+	public void AddEnumSymbol(EnumIdentifier aSymbol)
+	{
+		if (m_enumSymbols.Defined(aSymbol.tokenText()))
+			throw new SymbolAlreadyDefinedException(aSymbol.tokenText());
+
+		m_enumSymbols.AddIdentifier(aSymbol);
+		m_listOfEnumSymbols.add(aSymbol);
+		Collections.sort(m_listOfEnumSymbols, new Comparator<EnumIdentifier>() {
+			@Override
+			public int compare(EnumIdentifier o1, EnumIdentifier o2) {
+				return o1.tokenText().compareTo(o2.tokenText());
+			}
+		});
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public /*override*/ String AnonymousName()
+	{
+		final StringBuilder result = new StringBuilder();
+		result.append("enum_");
+		for (final EnumIdentifier sym: m_listOfEnumSymbols)
+		{
+			result.append(sym.tokenText());
+			result.append("_");
+		}
+		return result.toString();
+	}
+}
Index: trunk/compiler/cppAst/ast/statements/Block.hpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/Block.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/Block.hpp	(revision 2)
@@ -0,0 +1,99 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/statements/Statement.hpp>
+#include <ast/SymbolTable.hpp>
+#include <deque>
+
+namespace Ast {
+
+class Block:
+	public Statement,
+	public IScope
+{
+protected:
+	SymbolTable* m_symbols;
+	StatementList m_statements;
+	Expression* m_filter;
+	IScope* m_parentScope;
+
+	Block(StatementKind kind):
+		Statement(kind),
+		m_symbols (nullptr),
+		m_statements (),
+		m_filter (nullptr),
+		m_parentScope (nullptr)
+	{}
+	Block(const Block& toCopy):
+		Statement(toCopy),
+		m_symbols (toCopy.m_symbols),
+		m_statements (toCopy.m_statements),
+		m_filter (toCopy.m_filter),
+		m_parentScope (toCopy.m_parentScope)
+	{}
+
+public:
+	void init(std::int32_t line, std::int32_t col, SymbolTable* symTabRef,
+				StatementList* stmtListRef, IScope* scopeRef)
+	{
+		init(line,col,symTabRef,stmtListRef,scopeRef,nullptr);
+	}
+	void init(std::int32_t line, std::int32_t col, SymbolTable* symTabRef,
+				StatementList* stmtListRef, IScope* scopeRef, Expression* filter)
+	{
+		Statement::init(line,col);
+		m_symbols = symTabRef;
+		m_statements = std::move(*stmtListRef);
+		m_parentScope = scopeRef;
+		m_filter = filter;
+	}
+
+
+	SymbolTable* symbols() const {return m_symbols;};
+	Expression* filter() const {return m_filter;};
+	StatementList& statements() {return m_statements;};
+
+	void addStatement(Statement* toAdd){
+		IScope* childScope = toAdd->asScope();
+		if (childScope != nullptr)
+			childScope->setParentScope((IScope*)this);
+		m_statements.push_back(toAdd);
+	};
+	void setFilter(Expression* sexpr) {m_filter = sexpr;};
+	bool isSimpleBlock() {return m_symbols->size() == 0 && m_filter == nullptr;};
+
+	Identifier* resolveIdentifier(const std::string& aName) const override { return m_symbols->get(aName); };
+	IScope* getParentScope() const {return m_parentScope;};
+	std::string getScopeName() const override {return "";}
+
+	void setParentScope(IScope* parentScope) {m_parentScope = parentScope;};
+	void addIdentifier(Identifier* anIdentifier, void* /*tag*/) {m_symbols->addIdentifier(anIdentifier);};
+
+	IScope* asScope() final {return (IScope*)this;}
+};
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/QrType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/QrType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/QrType.java	(revision 2)
@@ -0,0 +1,85 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import java.util.ArrayList;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.parser.SymbolTable;
+import org.momut.ooas.utils.exceptions.SymbolAlreadyDefinedException;
+
+///////////////////////////////////////////////
+///  Complex Type: QrType
+///  behaves somewhat similar to an enumerated type..
+///
+public final class QrType extends UlyssesType
+{
+	private final SymbolTable m_qspaceSymbols;
+	private final ArrayList<LandmarkIdentifier> m_listOfQspaceSymbols;
+
+	public SymbolTable symbolTable() { return m_qspaceSymbols; }
+	public ArrayList<LandmarkIdentifier> landmarks() { return m_listOfQspaceSymbols; }
+
+	public QrType(TypeIdentifier anIdentifier)
+	{
+		super(TypeKind.QrType, anIdentifier);
+		m_listOfQspaceSymbols = new ArrayList<LandmarkIdentifier>();
+		m_qspaceSymbols = new SymbolTable();
+	}
+
+	public void AddLandmark(LandmarkIdentifier aLandmark)
+	{
+		if (m_qspaceSymbols.Defined(aLandmark.tokenText()))
+			throw new SymbolAlreadyDefinedException(aLandmark.tokenText());
+
+		m_qspaceSymbols.AddIdentifier(aLandmark);
+		m_listOfQspaceSymbols.add(aLandmark);
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public /*override*/ String AnonymousName()
+	{
+		StringBuilder result = new StringBuilder();
+		result.append("qr_");
+		for (LandmarkIdentifier sym: m_listOfQspaceSymbols)
+		{
+			result.append(sym.tokenText());
+			result.append("_");
+		}
+		return result.toString();
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/StatementKind.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/StatementKind.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/StatementKind.java	(revision 2)
@@ -0,0 +1,49 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+public enum StatementKind
+{
+	GuardedCommand(0),
+	MethodCall(1),
+	Assignment(2),
+	SeqBlock(3),
+	NondetBlock(4),
+	PrioBlock(5),
+	Skip(6),
+	Abort(7),
+	Kill(8),
+	QualConstraint(9),
+	Break (10);
+
+	public final int integerValue; // do not change, this is needed by the backends! i.e. public API
+
+	private StatementKind(int val) {
+		integerValue = val;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/ListType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/ListType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/ListType.java	(revision 2)
@@ -0,0 +1,73 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+
+///////////////////////////////////////////////
+///  Complex Type: List
+///
+public final class ListType extends UlyssesType
+{
+	private UlyssesType m_innerType;
+	private final int m_maxNumberOfElements;
+
+	public UlyssesType innerType() { return m_innerType; }
+	public int maxNumberOfElements() { return m_maxNumberOfElements; }
+
+	public ListType(UlyssesType elemType, int max, TypeIdentifier anIdentifier)
+	{
+		super(TypeKind.ListType, anIdentifier);
+		m_innerType = elemType;
+		m_maxNumberOfElements = max;
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetInnerType(UlyssesType newType)
+	{
+		if (newType == null)
+			throw new ArgumentException();
+		m_innerType = newType;
+	}
+
+	@Override
+	public /*override*/ String AnonymousName()
+	{
+		return String.format("list_%s_%s",
+				m_maxNumberOfElements,
+				m_innerType != null ? m_innerType.toString() : "uninit");
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/CharType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/CharType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/CharType.java	(revision 2)
@@ -0,0 +1,45 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+
+public final class CharType extends IntType
+{
+	public CharType(TypeIdentifier anIdentifier)
+	{
+		super(0, 255, anIdentifier);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/cppAst/ast/statements/NondetBlock.hpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/NondetBlock.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/NondetBlock.hpp	(revision 2)
@@ -0,0 +1,47 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/statements/Block.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class NondetBlock final
+	: public Block
+{
+protected:
+	NondetBlock() : Block(StatementKind::NondetBlock) {}
+	NondetBlock(const NondetBlock& toCopy): Block(toCopy) {}
+
+	static NondetBlock* create() {return new NondetBlock();}
+	static NondetBlock* createCopy(const NondetBlock& toCopy) {return new NondetBlock(toCopy);}
+public:
+	friend class Ast;
+	friend class Statement;
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/OoActionSystemType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/OoActionSystemType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/OoActionSystemType.java	(revision 2)
@@ -0,0 +1,159 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import java.util.ArrayList;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.parser.SymbolTable;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+
+public class OoActionSystemType extends UlyssesType implements IScope
+{
+	private final boolean m_autoCons;
+	private OoActionSystemType m_baseType;
+	private Block m_doOdBlock;
+	private IScope m_parentScope;
+	private final SymbolTable m_symbols;
+	private final ArrayList<OoActionSystemInstance> m_objects;
+	private final ArrayList<OoActionSystemInstance> m_derivedObjects;
+	private boolean m_isInSystemDescription;
+
+	public Block doOdBlock() { return m_doOdBlock; }
+	public boolean autoConstruction() { return m_autoCons; }
+	public OoActionSystemType baseType() { return m_baseType; }
+	public SymbolTable symbols() { return m_symbols; }
+	public ArrayList<OoActionSystemInstance> objects() { return m_objects; }
+	public ArrayList<OoActionSystemInstance> derivedObjects() { return m_derivedObjects; }
+	public boolean isInSystemDescription() { return m_isInSystemDescription; }
+
+	public OoActionSystemType(
+			boolean autoCons,
+			OoActionSystemType refinedSystem,
+			TypeIdentifier typeName)
+	{
+		super(TypeKind.OoActionSystemType, typeName);
+		m_symbols = new SymbolTable();
+		m_autoCons = autoCons;
+		m_baseType = refinedSystem;
+		m_objects = new ArrayList<OoActionSystemInstance>();
+		m_derivedObjects = new ArrayList<OoActionSystemInstance>();
+		m_isInSystemDescription = false;
+	}
+
+	public final void SetDoOdBlock(Block anArg)
+	{
+		m_doOdBlock = anArg;
+		if (anArg.GetParentScope() == null)
+			anArg.SetParentScope(this);
+		else if (anArg.GetParentScope() != this)
+			throw new InternalCompilerException("Internal Error: Do-Od block has different parent set.");
+	}
+
+
+	@Override
+	public IScope GetParentScope()
+	{
+		return m_parentScope;
+	}
+
+	@Override
+	public void SetParentScope(IScope parentScope)
+	{
+		m_parentScope = parentScope;
+	}
+
+	public Identifier ResolveLocal(String aName)
+	{
+		if (m_symbols.Defined(aName))
+			return m_symbols.Get(aName);
+		else
+			return null;
+	}
+
+	@Override
+	public Identifier ResolveIdentifier(String aName)
+	{
+		Identifier result = ResolveLocal(aName);
+		if ((result == null) && (m_baseType != null))
+			result = m_baseType.ResolveIdentifier(aName);
+		return result;
+	}
+
+	@Override
+	public void AddIdentifier(Identifier anIdentifier, Object tag)
+	{
+		m_symbols.AddIdentifier(anIdentifier);
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetBaseType(OoActionSystemType newType)
+	{
+		if (newType == null)
+			throw new ArgumentException();
+		m_baseType = newType;
+	}
+
+	public SymbolTable getAllSymbols()
+	{
+		OoActionSystemType system;
+		final ArrayList<OoActionSystemType> inheritance = new ArrayList<OoActionSystemType>();
+		system = this;
+		while (system != null)
+		{
+			inheritance.add(0, system);
+			system = system.baseType();
+		}
+		final SymbolTable result = new SymbolTable();
+		for (final OoActionSystemType ooas: inheritance)
+			result.AddSymbolTable(ooas.symbols());
+		result.Replace("self", this.symbols().Get("self"));
+		return result;
+	}
+
+	@Override
+	public /*override*/ String AnonymousName()
+	{
+		return String.format("class_%s", Math.abs((long) this.hashCode())); //FIXME: should be unit!
+	}
+
+	public final void SetIsInSystemDescription(boolean p)
+	{
+		m_isInSystemDescription = p;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/IntType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/IntType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/IntType.java	(revision 2)
@@ -0,0 +1,64 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+
+///////////////////////////////////////////////
+///  Simple Type: Int
+///
+public class IntType extends UlyssesType
+{
+	protected int m_low;
+	protected int m_high;
+
+	public int rangeLow() { return m_low; }
+	public int rangeHigh() { return m_high; }
+
+	public IntType(int low, int high, TypeIdentifier anIdentifier)
+	{
+		super(TypeKind.IntType, anIdentifier);
+		m_low = low;
+		m_high = high;
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public String AnonymousName()
+	{
+		return String.format("int_%s_%s",
+			m_low < 0 ? "m" + String.valueOf(m_low * (-1)) : String.valueOf(m_low),
+			m_high);
+	}
+}
Index: trunk/compiler/cppAst/ast/statements/Statement.cpp
===================================================================
--- trunk/compiler/cppAst/ast/statements/Statement.cpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/statements/Statement.cpp	(revision 2)
@@ -0,0 +1,87 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+#include "Statement.hpp"
+#include <base/Exceptions.hpp>
+#include <ast/statements/GuardedCommand.hpp>
+#include <ast/statements/Call.hpp>
+#include <ast/statements/Assignment.hpp>
+#include <ast/statements/SeqBlock.hpp>
+#include <ast/statements/NondetBlock.hpp>
+#include <ast/statements/PrioBlock.hpp>
+#include <ast/statements/Skip.hpp>
+#include <ast/statements/Abort.hpp>
+#include <ast/statements/Break.hpp>
+//#include <Kill.hpp>
+
+namespace Ast {
+
+static void abstractError() {
+	throw new Base::NotImplementedException();
+}
+
+Base::FuncPtr Statement::s_stmntVmt [2][STATEMENTKIND_NR_ITEMS] =
+{
+		{
+				/* GuardedCommand = 0 */  (Base::FuncPtr)&GuardedCommand::create,
+				/* Call = 1 */            (Base::FuncPtr)&Call::create,
+				/* Assignment = 2 */      (Base::FuncPtr)&Assignment::create,
+				/* SeqBlock = 3 */        (Base::FuncPtr)&SeqBlock::create,
+				/* NondetBlock = 4 */     (Base::FuncPtr)&NondetBlock::create,
+				/* PrioBlock = 5 */       (Base::FuncPtr)&PrioBlock::create,
+				/* Skip = 6 */            (Base::FuncPtr)&Skip::create,
+				/* Abort = 7 */           (Base::FuncPtr)&Abort::create,
+				/* Kill = 8 */                           &abstractError,
+				/* QualConstraint = 9 */                 &abstractError,
+				/* Break = 10 */          (Base::FuncPtr)&Break::create
+		},
+		{
+				/* GuardedCommand = 0 */  (Base::FuncPtr)&GuardedCommand::createCopy,
+				/* Call = 1 */            (Base::FuncPtr)&Call::createCopy,
+				/* Assignment = 2 */      (Base::FuncPtr)&Assignment::createCopy,
+				/* SeqBlock = 3 */        (Base::FuncPtr)&SeqBlock::createCopy,
+				/* NondetBlock = 4 */     (Base::FuncPtr)&NondetBlock::createCopy,
+				/* PrioBlock = 5 */       (Base::FuncPtr)&PrioBlock::createCopy,
+				/* Skip = 6 */            (Base::FuncPtr)&Skip::createCopy,
+				/* Abort = 7 */           (Base::FuncPtr)&Abort::createCopy,
+				/* Kill = 8 */                           &abstractError,
+				/* QualConstraint = 9 */                 &abstractError,
+				/* Break = 10 */          (Base::FuncPtr)&Break::createCopy
+		}
+};
+
+
+void Statement::accept(IAstVisitor& ) {throw new Base::NotImplementedException();};
+
+Statement* Statement::createVirtual(StatementKind aType) {
+	return (std::uint8_t)aType < STATEMENTKIND_NR_ITEMS ? ((ConstrPtr)s_stmntVmt[0][(int)aType])() : nullptr;
+}
+
+Statement* Statement::createVirtual(const Statement& toCopy) {
+	std::uint8_t atype ((std::uint8_t)toCopy.kind());
+	return ((CopyConstrPtr)s_stmntVmt[1][atype])(toCopy);
+}
+
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/TypeKind.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/TypeKind.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/TypeKind.java	(revision 2)
@@ -0,0 +1,52 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+public enum TypeKind
+{
+	IntType(0),
+	BoolType(1),
+	FloatType(2),
+	EnumeratedType(3),
+	ListType(4),
+	MapType(5),
+	QrType(6),
+	TupleType(7),
+	FunctionType(8),
+	OoActionSystemType(9),
+	OpaqueType(10),
+	Null(11),
+	Any(12),
+	ValuedEnumeratedType (13); // this is not used here but only defined for the c++ backend..
+
+	public final int integerValue; // do not change, this is needed by the backends! i.e. public API
+
+	private TypeKind(int val) {
+		integerValue = val;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/OoActionSystemInstance.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/OoActionSystemInstance.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/OoActionSystemInstance.java	(revision 2)
@@ -0,0 +1,61 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import org.momut.ooas.codegen.java.ActionSystemClass;
+
+
+///////////////////////////////////////////////
+///  Complex Type: OoActionSystem
+///
+
+public final class OoActionSystemInstance
+{
+	// pointer to type
+	public OoActionSystemType Type;
+	// name of the current object
+	public String Name;
+	// counts the number of objects that have been created by this object
+	public int numberOfCreatedObjects;
+	// pointer to a C# instance of this object
+	public ActionSystemClass Instance; // FIXME: this breaks layering.
+	// pointer to the object that created us
+	public OoActionSystemInstance ParentObject;
+
+	public OoActionSystemInstance(String aName, OoActionSystemType aType, ActionSystemClass anInstance, OoActionSystemInstance aParentObj)
+	{
+		Name = aName;
+		Type = aType;
+		ParentObject = aParentObj;
+		Instance = anInstance;
+		numberOfCreatedObjects = 0;
+		if (ParentObject != null)
+			ParentObject.numberOfCreatedObjects++;
+	}
+}
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/ValuedEnumType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/ValuedEnumType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/ValuedEnumType.java	(revision 2)
@@ -0,0 +1,80 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+
+public class ValuedEnumType extends EnumType
+{
+	private IntType intType = null;
+
+	public ValuedEnumType(TypeIdentifier anIdentifier)
+	{
+		super (anIdentifier);
+	}
+
+	public IntType getIntType()
+	{
+		if (intType == null) {
+			int min = Integer.MAX_VALUE;
+			int max = Integer.MIN_VALUE;
+			for (Identifier x: symbolTable().symbolList())
+			{
+				EnumIdentifier id = (EnumIdentifier)x;
+				if (id.Value() > max)
+					max = id.Value();
+				if (id.Value() < min)
+					min = id.Value();
+			}
+			intType = new IntType(min, max, null);
+		}
+		return intType;
+	}
+
+	@Override
+	public /*override*/ String AnonymousName()
+	{
+		StringBuilder result = new StringBuilder();
+		result.append("enum_");
+		for (EnumIdentifier sym: m_listOfEnumSymbols)
+		{
+			result.append(sym.tokenText());
+			if (sym.Value() < 0)
+			{
+				result.append("m");
+				result.append(sym.Value() * (-1));
+			}
+			else
+				result.append(sym.Value());
+			result.append("_");
+		}
+		return result.toString();
+	}
+}
Index: trunk/compiler/cppAst/ast/types/BoolType.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/BoolType.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/BoolType.hpp	(revision 2)
@@ -0,0 +1,49 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/types/Type.hpp>
+#include <ast/IAstVisitor.hpp>
+
+namespace Ast {
+
+class BoolType final
+	: public Type
+{
+protected:
+	BoolType(): Type(TypeKind::BoolType) {};
+	BoolType(const BoolType &toCopy): Type(toCopy) {};
+
+	static BoolType* create() {return new BoolType();}
+	static BoolType* createCopy(const BoolType& toCopy) {return new BoolType(toCopy);}
+public:
+	friend class Ast;
+	friend class Type;
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/IAstDuplicator.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/IAstDuplicator.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/IAstDuplicator.java	(revision 2)
@@ -0,0 +1,547 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.ast;
+
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.statements.StatementKind;
+import org.momut.ooas.ast.types.TypeKind;
+
+/**
+ * Defines a low-level interface that can be used to copy
+ * the OOAS AST. Initially defined for the C++ backend.
+ *
+ * @author willibald
+ */
+
+public interface IAstDuplicator<T> {
+
+	/** Allocate an identifier */
+	T createIdentifier(IdentifierKind kind, int subOrd);
+	/** Allocate a type */
+	T createType(TypeKind kind);
+	/** Allocate an expression */
+	T createExpression(ExpressionKind kind, int subOrd);
+	/** Allocate a statement */
+	T createStatement(StatementKind kind);
+	/** Allocate a new action system instance object */
+	T createActionSystemInstance();
+	/** Allocate a new symbol table */
+	T createSymbolTable();
+	/** Allocate a new list for method/function parameters */
+	T createParameterList();
+	/** Allocate a new list for types */
+	T createTypeList();
+	/** Allocate a new list for action system instances */
+	T createActionSystemInstanceList();
+	/** Allocate a new statement list */
+	T createStatementList();
+	/** Allocate a new expression list */
+	T createExpressionList();
+	/** Allocate a new list of identifiers */
+	T createIdentifierList();
+
+	/** Cast an AstElement object to IScope */
+	T castToIScope(T input);
+
+	/** Adds an identifier to a symbol table */
+	boolean addIdentifierToSymbolTable(T symbolTable, T identifier);
+	/** Adds a parameter identifier to a parameter list */
+	boolean addParameterIdentifierToList(T parameterList, T param);
+	/** Adds a type to a type-list */
+	boolean addTypeToList(T typeList, T type);
+	/** Adds an instance (ref) to a instance list */
+	boolean addActionSystemInstanceToList(T objectsList, T instanceRef);
+	/** Adds an identifier to an identifier block */
+	boolean addIdentifierToBlock(T idBlock, T idRef);
+	/** Adds a statement to a statement list */
+	boolean addStatementToList(T stmtList, T stmntRef);
+	/** Adds an expression to an expression list */
+	boolean addExpressionToList(T exprList, T exprRef);
+	/** Adds an identifier to an identifier list */
+	boolean addIdentifierToList(T idList, T idRef);
+
+	/** Initialize an EnumIdentifier */
+	boolean initEnumIdentifier(
+			T enumId,
+			int line,
+			int col,
+			String text,
+			T scopeRef,
+			T typeRef,
+			boolean haveValue,
+			int value);
+
+	/** Initialize an ConstantIdentifier*/
+	boolean initConstantIdentifier(
+			T constId,
+			int line,
+			int col,
+			String text,
+			T scopeRef,
+			T typeRef,
+			T valueRef);
+
+	/** Initialize an AttributeIdentifier */
+	boolean initAttributeIdentifier(
+			T attrId,
+			int line,
+			int col,
+			String text,
+			T scopeRef,
+			T typeRef,
+			T initRef,
+			boolean isStatic,
+			boolean isControllable,
+			boolean isObservable);
+
+	/** Initialize an ExpressionVarIdentifier */
+	boolean initExprVarIdentifier(
+			T exprVarId,
+			int line,
+			int col,
+			String text,
+			T scopeRef,
+			T typeRef,
+			boolean initialized);
+
+	/** Initialize a ParamIdentifier */
+	boolean initParamIdentifier(
+			T paramId,
+			int line,
+			int column,
+			String text,
+			T scopeRef,
+			T typeRef);
+
+	/** Initialize a LocalVarIdentifier */
+	boolean initLocalVarIdentifier(
+			T locVarId,
+			int line,
+			int column,
+			String text,
+			T scopeRef,
+			T typeRef);
+
+	/** Initialize a TypeIdentifier */
+	boolean initTypeIdentifier(
+			T typeId,
+			int line,
+			int column,
+			String text,
+			T scopeRef,
+			T typeRef,
+			String prefix);
+
+	/** Special version of the TypeIdentifier: */
+	boolean initSelfIdentifier(
+			T typeId,
+			int line,
+			int column,
+			String text,
+			T scopeRef,
+			T typeRef,
+			String prefix);
+
+	/** Initialize a MethodIdentifier */
+	boolean initMethodIdentifier(
+			T methodId,
+			int line,
+			int column,
+			String text,
+			T scopeRef,
+			T typeRef,
+			String prefix,
+			T parameterListRef,
+			T symbolTableRef,
+			T bodyRef);
+
+	/** Initialize a Module */
+	boolean initModule(
+			T moduleId,
+			int line,
+			int column,
+			String text,
+			T scopeRef,
+			T typeRef,
+			String prefix,
+			T symTabRef);
+
+	/** Initialize the Main Module */
+	boolean initMainModule(
+			T moduleId,
+			int line,
+			int column,
+			String text,
+			T scopeRef,
+			T typeRef,
+			String prefix,
+			T symTabRef,
+			T identifierListRef);
+
+	/** Initialize an integer type */
+	boolean initIntType(
+			T typeId,
+			T identifierRef,
+			boolean anonymousType,
+			int low,
+			int high);
+
+	/** Initialize a bool type */
+	boolean initBoolType(
+			T typeId,
+			T identifierRef,
+			boolean anonymousType);
+
+	/** Initialize a valued enum type */
+	boolean initValuedEnumType(
+			T typeId,
+			T identifierRef,
+			boolean anonymousType,
+			T symTabRef,
+			T intTypeRef);
+
+	/** Initialize a normal enum type */
+	boolean initEnumType(
+			T typeId,
+			T identifierRef,
+			boolean anonymousType,
+			T symTabRef);
+
+	/** Initialize a list type */
+	boolean initListType(
+			T typeId,
+			T identifierRef,
+			boolean anonymousType,
+			T innerTypeRef,
+			int maxNumberOfElements);
+
+	/** Initialize a tuple type */
+	boolean initTupleType(
+			T typeId,
+			T identifierRef,
+			boolean anonymousType,
+			T typeListRef);
+
+	/** Initialize a function type */
+	boolean initFunctionType(
+			T typeId,
+			T identifierRef,
+			boolean anonymousType,
+			T paramTypeListRef,
+			T returnTypeRef,
+			int functionKind,
+			boolean isPure);
+
+	/** Initialize an action system instance */
+	boolean initActionSystemInstance(
+			T instance,
+			T typeRef,
+			String name,
+			int numOfCreatedObjs,
+			T parentInstanceRef);
+
+	/** Initialize an action system type */
+	boolean initActionSystemType(
+			T typeId,
+			T identifierRef,
+			boolean anonymousType,
+			T baseTypeRef,
+			T parentScopeRef,
+			T doOdBlockRef,
+			T symTab,
+			T objectsListRef,
+			T derivedObjectsListRef,
+			boolean autoConstruction,
+			boolean isInSystemDescription);
+
+	/** Initialize a null-type */
+	boolean initNullType(
+			T typeId,
+			T identifierRef,
+			boolean anonymousType);
+
+	/** Initialize a skip statement */
+	boolean initSkipStatement(
+			T stmnt,
+			int line,
+			int col);
+
+	/** Initialize a break statement */
+	boolean initBreakStatement(
+			T stmnt,
+			int line,
+			int col);
+
+	/** Initialize an abort statement */
+	boolean initAbortStatement(
+			T stmnt,
+			int line,
+			int col);
+
+	/** Initialize a nondet block */
+	boolean initNondetBlock(
+			T block,
+			int line,
+			int col,
+			T symTabRef,
+			T stmtListRef,
+			T scopeRef);
+
+	/** Initialize a nondet block */
+	boolean initSeqBlock(
+			T block,
+			int line,
+			int col,
+			T symTabRef,
+			T stmtListRef,
+			T scopeRef,
+			T filterExprRef);
+
+	/** Initialize a nondet block */
+	boolean initPrioBlock(
+			T block,
+			int line,
+			int col,
+			T symTabRef,
+			T stmtListRef,
+			T scopeRef);
+
+	/** Initialize a guarded command */
+	boolean initGuardedCommand(
+			T stmt,
+			int line,
+			int pos,
+			T scopeRef,
+			T guardExprRef,
+			T bodyRef);
+
+	/** Initialize an assignment statement */
+	boolean initAssignment(
+			T stmt,
+			int line,
+			int pos,
+			T scopeRef,
+			T nonDetExprRef,
+			T placeExprListRef,
+			T valueExprListRef,
+			T symTabRef);
+
+	/** Initialize a call expression */
+	boolean initCall(
+			T stmt,
+			int line,
+			int pos,
+			T callExprRef);
+
+	/** Initialize a type expression */
+	boolean initTypeExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef);
+
+	/** Initialize an identifier expression */
+	boolean initIdentifierExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T identifierRef,
+			boolean isSelf);
+
+	/** Initialize a unary operator */
+	boolean initUnaryExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T child);
+
+	/** Initialize a binary expression */
+	boolean initBinaryExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T left,
+			T right);
+
+	/** Initialize a ternary expression */
+	boolean initTernaryExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T left,
+			T mid,
+			T right,
+			T defScopeRef);
+
+	/** Initialize an IntValue expression */
+	boolean initIntValueExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			int value);
+
+	/** Initialize a BoolValue expression */
+	boolean initBoolValueExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			boolean value);
+
+	/** Initialize a RefValue expression */
+	boolean initNullValueExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef);
+
+	/** Initialize a ListConstructor expression */
+	boolean initListConstructor(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T exprList,
+			T symTab,
+			T parentScope,
+			T comprehension,
+			boolean hasComprehension);
+
+	/** Initialize a SetConstructor expression */
+	boolean initSetConstructor(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T exprList,
+			T symTab,
+			T parentScope,
+			T comprehension,
+			boolean hasComprehension);
+
+	/** Initialize a TupleConstructor expression */
+	boolean initTupleConstructor(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T exprList,
+			T tupleTypeId,
+			boolean isMatcher);
+
+	/** Initialize an access expression */
+	boolean initAccessExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T left,
+			T right);
+
+	/** Initialize a tuple/map access expression */
+	boolean initTupleMapAccessExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T child,
+			T argument);
+
+	/** Initialize a tuple/map access expression */
+	boolean initCallExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T child,
+			T argumentList,
+			T scopeRef);
+
+	/** Initialize a quantifier expression */
+	boolean initQuantifierExpression(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T child,
+			T symTabRef,
+			T scopeRef);
+
+	/** Initialize an object constructor expression */
+	boolean initObjectConstructor(
+			T expr,
+			int line,
+			int pos,
+			T typeRef,
+			T callTargetsIdentifierListRef,
+			T symbTabRef,
+			T instanceList,
+			int currentInstance,
+			String name);
+
+
+	/** Sets the top level structure of the AST - the main module. */
+	void setMainModule(MainModule mainModule, T id);
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/TupleType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/TupleType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/TupleType.java	(revision 2)
@@ -0,0 +1,74 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import java.util.LinkedList;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+
+///////////////////////////////////////////////
+///  Complex Type: TupleType
+///
+public final class TupleType extends UlyssesType
+{
+	private final LinkedList<UlyssesType> m_innerTypes;
+
+	public LinkedList<UlyssesType> innerTypes() { return m_innerTypes; }
+
+	public TupleType(TypeIdentifier anIdentifier)
+	{
+		super(TypeKind.TupleType, anIdentifier);
+		m_innerTypes = new LinkedList<UlyssesType>();
+	}
+
+	public void AddType(UlyssesType aType)
+	{
+		m_innerTypes.addLast(aType);
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public /*override*/ String AnonymousName()
+	{
+		StringBuilder result = new StringBuilder();
+		result.append("tuple_");
+		for (UlyssesType inner: m_innerTypes)
+		{
+			result.append(inner.toString());
+			result.append("_");
+		}
+		return result.toString();
+	}
+
+}
Index: trunk/compiler/cppAst/ast/types/IntType.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/IntType.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/IntType.hpp	(revision 2)
@@ -0,0 +1,131 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <cstdint>
+#include <ast/types/Type.hpp>
+#include <ast/IAstVisitor.hpp>
+#include <boost/format.hpp>
+#include <iostream>
+
+namespace Ast {
+
+class IntType
+	: public Type
+{
+protected:
+	std::int64_t m_low;
+	std::int64_t m_high;
+
+	IntType(): Type(TypeKind::IntType), m_low (0), m_high(0) {}
+
+	IntType(const IntType& toCopy):
+		Type(toCopy),
+		m_low (toCopy.m_low),
+		m_high(toCopy.m_high)
+	{}
+	static IntType* create() {return new IntType();}
+	static IntType* createCopy(const IntType& toCopy) {return new IntType(toCopy);}
+public:
+	friend class Ast;
+	friend class Type;
+
+	void init(TypeIdentifier* id, bool anonymousType, std::int64_t low, std::int64_t high)
+	{
+		Type::init(id,anonymousType);
+		m_low = low;
+		m_high = high;
+	}
+
+	int64_t rangeLow() const {return m_low;};
+	int64_t rangeHigh() const {return m_high;};
+
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+
+	static bool firstTypeLessRange(IntType* first, IntType* second) {
+		return first->m_low > second->m_low || first->m_high < second->m_high;
+	}
+
+	bool isSigned() override {return m_low < 0;}
+
+	uint32_t bitwidth() override {
+		if (m_low == INT64_MIN || m_high == INT64_MAX)
+			return 64;
+
+		std::uint32_t result = 0;
+		if (m_low < 0 && m_high > 0) {
+			std::uint32_t bitsforlow = (std::uint32_t) std::floor(std::log2(std::abs(m_low))) + 1;
+			std::uint32_t bitsforhigh = (std::uint32_t) std::floor(std::log2(std::abs(m_high))) + 1;
+			if (bitsforlow <= bitsforhigh)
+				result = bitsforhigh + 1; // we need one additional bit to represent the negative numbers
+			else
+				result = bitsforlow;      // positive values are included
+		} else {
+			std::uint64_t maxAbs = (std::uint64_t) std::max(std::abs(m_low), std::abs(m_high));
+			result = (std::uint32_t) std::floor(std::log2(maxAbs)) + 1;
+		}
+
+		// check the result!
+		if (isSigned()) {
+			std::int64_t maxVal = (std::int64_t)(((std::uint64_t)1 << result) - 1);
+			std::int64_t minVal = (std::int64_t)(((std::uint64_t)-1 << result));
+			if (maxVal < m_high) {
+				std::cout << " Error converting type (max wrong): "
+						<< " low: " << m_low
+						<< " high: " << m_high
+						<< " bits: " << result
+						<< std::endl;
+				abort();
+			}
+			if (minVal > m_low) {
+				std::cout << " Error converting type (min wrong): "
+						<< " low: " << m_low
+						<< " high: " << m_high
+						<< " bits: " << result
+						<< std::endl;
+				abort();
+			}
+		} else {
+			std::uint64_t maxVal = (((std::uint64_t)1 << result)-1);
+			if (maxVal < (std::uint64_t)m_high) {
+				std::cout << " Error converting unsigned type (max wrong): "
+						<< " low: " << m_low
+						<< " high: " << m_high
+						<< " bits: " << result
+						<< std::endl;
+				abort();
+			}
+		}
+//		std::cout << " Mapping int type " << toString() << ": "
+//				<< " low: " << m_low
+//				<< " high: " << m_high
+//				<< " bits: " << result
+//				<< std::endl;
+
+		return result;
+	}
+};
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/AstProtoBufRecorder.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/AstProtoBufRecorder.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/AstProtoBufRecorder.java	(revision 2)
@@ -0,0 +1,1205 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.ast.protobuf;
+
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.statements.StatementKind;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.codegen.ast.IAstDuplicator;
+import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd;
+import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation;
+import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions;
+import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers;
+import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements;
+import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes;
+import org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal;
+import org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall;
+import org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter;
+import org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType;
+import org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+
+import com.google.protobuf.Message;
+
+
+/**
+ * INFO: Methods with return type boolean always return true. Originally the methods depended on the C++ backend
+ * but in this approach we are independent of the backend. (The return value was discarded in the frontend anyway.)
+ * */
+public class AstProtoBufRecorder implements IAstDuplicator<Long> {
+
+	private final PBAstTraversal.Builder m_traversal;
+	private boolean m_initialized;
+	private Long count = new Long(1); //IDs start with 1, so that 0 is reserved for nullptr
+
+	public AstProtoBufRecorder(){
+		m_traversal = PBAstTraversal.newBuilder();
+	}
+
+	public Message getAst(){
+		if(!m_initialized)
+			throw new InternalCompilerException("No AST available. (Must set MainModule first.)");
+		return m_traversal.build();
+	}
+
+	private PBParameter.Builder referenceParameter(Long reference){
+		final long value = reference == null ? 0 : reference;
+		return PBParameter.newBuilder().setUint64Value(value);
+	}
+
+	private PBParameter.Builder int32Parameter(int value){
+		return PBParameter.newBuilder().setInt32Value(value);
+	}
+
+	private PBParameter.Builder uint32Parameter(int value){
+		return PBParameter.newBuilder().setUint32Value(value);
+	}
+
+	private PBParameter.Builder stringParameter(String text){
+		return PBParameter.newBuilder().setLiteralValue(text);
+	}
+
+	private PBParameter.Builder boolParameter(boolean value){
+		return PBParameter.newBuilder().setBoolValue(value);
+	}
+
+	private PBFunctionCall.Builder unnamedCall(PBReturnValue.Builder returnValue, PBParameter.Builder ... parameters){
+		final PBFunctionCall.Builder call = PBFunctionCall.newBuilder().setReturnValue(returnValue);
+		for(final PBParameter.Builder p : parameters)
+			call.addParameters(p);
+		return call;
+	}
+
+	private PBFunctionCall.Builder unnamedBoolCall(PBParameter.Builder ... parameters){
+		final PBReturnValue.Builder boolType = PBReturnValue.newBuilder().setReturnType(PBReturnType.type_boolean);
+		return unnamedCall(boolType, parameters);
+	}
+
+	private void boolCall(PBAdd name, PBParameter.Builder ... parameters){
+		final PBFunctionCall.Builder call = unnamedBoolCall(parameters).setAdd(name);
+		m_traversal.addCalls(call);
+	}
+
+	private void boolCall(PBIdentifiers name, PBParameter.Builder ... parameters){
+		final PBFunctionCall.Builder call =  unnamedBoolCall(parameters).setIdentifier(name);
+		m_traversal.addCalls(call);
+	}
+
+	private void boolCall(PBTypes name, PBParameter.Builder ... parameters){
+		final PBFunctionCall.Builder call =  unnamedBoolCall(parameters).setType(name);
+		m_traversal.addCalls(call);
+	}
+
+	private void boolCall(PBStatements name, PBParameter.Builder ... parameters){
+		final PBFunctionCall.Builder call =  unnamedBoolCall(parameters).setStatement(name);
+		m_traversal.addCalls(call);
+	}
+
+	private void boolCall(PBExpressions name, PBParameter.Builder ... parameters){
+		final PBFunctionCall.Builder call =  unnamedBoolCall(parameters).setExpression(name);
+		m_traversal.addCalls(call);
+	}
+
+	private Long referenceCall(PBAllocation name, PBParameter.Builder ... parameters){
+		final PBReturnValue.Builder returnValue = PBReturnValue.newBuilder()
+				.setReturnType(PBReturnType.type_voidPointer).setReturnId(count);
+		final PBFunctionCall.Builder call = unnamedCall(returnValue, parameters).setAllocate(name);
+		m_traversal.addCalls(call);
+		return count++;
+	}
+
+	@Override
+	public Long createIdentifier(IdentifierKind kind, int subOrd) {
+		// DLL void* TIRESIAS_CREATE_IDENTIFIER(void* context, std::int32_t ordinal, std::int32_t subOrd);
+		final PBParameter.Builder kindBuilder = int32Parameter(kind.integerValue);
+		final PBParameter.Builder subOrdBuilder = int32Parameter(subOrd);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_IDENTIFIER, kindBuilder, subOrdBuilder);
+	}
+
+	@Override
+	public Long createType(TypeKind kind) {
+		// DLL void* TIRESIAS_CREATE_TYPE(void* context, std::int32_t ordinal);
+		final PBParameter.Builder kindBuilder = PBParameter.newBuilder().setInt32Value(kind.integerValue);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_TYPE, kindBuilder);
+	}
+
+	@Override
+	public Long createExpression(ExpressionKind kind, int subOrd) {
+		// DLL void* TIRESIAS_CREATE_EXPRESSION(void* context, std::int32_t ordinal, std::int32_t subOrd);
+		final PBParameter.Builder kindBuilder = PBParameter.newBuilder().setInt32Value(kind.integerValue);
+		final PBParameter.Builder subOrdBuilder = PBParameter.newBuilder().setInt32Value(subOrd);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_EXPRESSION, kindBuilder, subOrdBuilder);
+	}
+
+	@Override
+	public Long createStatement(StatementKind kind) {
+		// DLL void* TIRESIAS_CREATE_STATEMENT(void* context, std::int32_t ordinal);
+		final PBParameter.Builder kindBuilder = PBParameter.newBuilder().setInt32Value(kind.integerValue);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_STATEMENT, kindBuilder);
+	}
+
+	@Override
+	public Long createActionSystemInstance() {
+		// DLL void* TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE(void* context);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE);
+	}
+
+	@Override
+	public Long createSymbolTable() {
+		// DLL void* TIRESIAS_CREATE_SYMBTAB(void* context);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_SYMBTAB);
+	}
+
+	@Override
+	public Long createParameterList() {
+		// DLL void* TIRESIAS_CREATE_PARAMLIST(void* context);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_PARAMLIST);
+	}
+
+	@Override
+	public Long createTypeList() {
+		// DLL void* TIRESIAS_CREATE_TYPELIST(void* context);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_TYPELIST);
+	}
+
+	@Override
+	public Long createActionSystemInstanceList() {
+		// DLL void* TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST(void* context);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST);
+	}
+
+	@Override
+	public Long createStatementList() {
+		// DLL void* TIRESIAS_CREATE_STATEMENTLIST(void* context);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_STATEMENTLIST);
+	}
+
+	@Override
+	public Long createExpressionList() {
+		// DLL void* TIRESIAS_CREATE_EXPRESSIONLIST(void* context);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_EXPRESSIONLIST);
+	}
+
+	@Override
+	public Long createIdentifierList() {
+		// DLL void* TIRESIAS_CREATE_IDENTIFIERLIST(void* context);
+		return referenceCall(PBAllocation.TIRESIAS_CREATE_IDENTIFIERLIST);
+	}
+
+	@Override
+	public Long castToIScope(Long input) {
+		// DLL void* TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE(void* context, void* astelement);
+		final PBParameter.Builder inputBuilder = PBParameter.newBuilder().setUint64Value(input);
+		return referenceCall(PBAllocation.TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE, inputBuilder);
+	}
+
+	@Override
+	public boolean addIdentifierToSymbolTable(Long symbolTable, Long identifier) {
+		// DLL bool TIRESIAS_ADD_IDTOSYMBTAB(void* context, void* symbolTable, void* identifier);
+		boolCall(PBAdd.TIRESIAS_ADD_IDTOSYMBTAB
+				, referenceParameter(symbolTable)
+				, referenceParameter(identifier));
+		return true;
+	}
+
+	@Override
+	public boolean addParameterIdentifierToList(Long parameterList, Long param) {
+		// DLL bool TIRESIAS_ADD_PARAMTOLIST(void* context, void* parameterList, void* par);
+		boolCall(PBAdd.TIRESIAS_ADD_PARAMTOLIST
+				, referenceParameter(parameterList)
+				, referenceParameter(param));
+		return true;
+	}
+
+	@Override
+	public boolean addTypeToList(Long typeList, Long type) {
+		// DLL bool TIRESIAS_ADD_TYPETOLIST(void* context, void* typeList, void* type);
+		boolCall(PBAdd.TIRESIAS_ADD_TYPETOLIST
+				, referenceParameter(typeList)
+				, referenceParameter(type));
+		return true;
+	}
+
+	@Override
+	public boolean addActionSystemInstanceToList(Long objectsList, Long instanceRef) {
+		// DLL bool TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST(void* context, void* objectsList, void* instanceRef);
+		boolCall(PBAdd.TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST
+				, referenceParameter(objectsList)
+				, referenceParameter(instanceRef));
+		return true;
+	}
+
+	@Override
+	public boolean addIdentifierToBlock(Long idBlock, Long idRef) {
+		// DLL bool TIRESIAS_ADD_IDENTIFIERTOBLOCK(void* context, void* idList, void* idRef);
+		boolCall(PBAdd.TIRESIAS_ADD_IDENTIFIERTOBLOCK
+				, referenceParameter(idBlock)
+				, referenceParameter(idRef));
+		return true;
+	}
+
+	@Override
+	public boolean addStatementToList(Long stmtList, Long stmntRef) {
+		// DLL bool TIRESIAS_ADD_STATEMENTTOLIST(void* context, void* stmtList, void* stmntRef);
+		boolCall(PBAdd.TIRESIAS_ADD_STATEMENTTOLIST
+				, referenceParameter(stmtList)
+				, referenceParameter(stmntRef));
+		return true;
+	}
+
+	@Override
+	public boolean addExpressionToList(Long exprList, Long exprRef) {
+		// DLL bool TIRESIAS_ADD_EXPRESSIONTOLIST(void* context, void* exprList, void* exprRef);
+		boolCall(PBAdd.TIRESIAS_ADD_EXPRESSIONTOLIST
+				, referenceParameter(exprList)
+				, referenceParameter(exprRef));
+		return true;
+	}
+
+	@Override
+	public boolean addIdentifierToList(Long idList, Long idRef) {
+		// DLL bool TIRESIAS_ADD_IDENTIFIERTOLIST(void* context, void* idList, void* idRef);
+		boolCall(PBAdd.TIRESIAS_ADD_IDENTIFIERTOLIST
+				, referenceParameter(idList)
+				, referenceParameter(idRef));
+		return true;
+	}
+
+	@Override
+	public boolean initEnumIdentifier(Long enumId, int line, int col,
+			String text, Long scopeRef, Long typeRef, boolean haveValue,
+			int value) {
+//		DLL bool TIRESIAS_INIT_ENUMIDENTIFIER(void* context,
+//				void* enumId, std::int32_t line, std::int32_t col, const char* text,
+//				void* scopeRef, void* typeRef, bool haveValue, std::int32_t value);
+		boolCall(PBIdentifiers.TIRESIAS_INIT_ENUMIDENTIFIER
+				, referenceParameter(enumId)
+				, int32Parameter(line)
+				, int32Parameter(col)
+				, stringParameter(text)
+				, referenceParameter(scopeRef)
+				, referenceParameter(typeRef)
+				, boolParameter(haveValue)
+				, int32Parameter(value));
+		return true;
+	}
+
+	@Override
+	public boolean initConstantIdentifier(Long constId, int line, int col,
+			String text, Long scopeRef, Long typeRef, Long valueRef) {
+//		DLL bool TIRESIAS_INIT_CONSTIDENTIFIER(void* context,
+//				void* constId, std::int32_t line, std::int32_t col, const char* text,
+//				void* scopeRef, void* typeRef, void* valueRef);
+
+		boolCall(PBIdentifiers.TIRESIAS_INIT_CONSTIDENTIFIER
+				, referenceParameter(constId)
+				, int32Parameter(line)
+				, int32Parameter(col)
+				, stringParameter(text)
+				, referenceParameter(scopeRef)
+				, referenceParameter(typeRef)
+				, referenceParameter(valueRef));
+		return true;
+	}
+
+	@Override
+	public boolean initAttributeIdentifier(Long attrId, int line, int col,
+			String text, Long scopeRef, Long typeRef, Long initRef,
+			boolean isStatic, boolean isControllable, boolean isObservable) {
+//		DLL bool TIRESIAS_INIT_ATTRIDENTIFIER(void* context,
+//				void* attrId, std::int32_t line, std::int32_t col, const char* text,
+//				void* scopeRef, void* typeRef, void* initRef,
+//				bool isStatic, bool isControllable, bool isObservable);
+
+		boolCall(PBIdentifiers.TIRESIAS_INIT_ATTRIDENTIFIER
+				, referenceParameter(attrId)
+				, int32Parameter(line)
+				, int32Parameter(col)
+				, stringParameter(text)
+				, referenceParameter(scopeRef)
+				, referenceParameter(typeRef)
+				, referenceParameter(initRef)
+				, boolParameter(isStatic)
+				, boolParameter(isControllable)
+				, boolParameter(isObservable));
+		return true;
+	}
+
+	@Override
+	public boolean initExprVarIdentifier(Long exprVarId, int line, int col,
+			String text, Long scopeRef, Long typeRef, boolean initialized) {
+
+//		DLL bool TIRESIAS_INIT_EXPRVARIDENTIFIER(void* context,
+//				void* exprVarId, std::int32_t line, std::int32_t col, const char* text,
+//				void* scopeRef, void* typeRef, bool initialized);
+
+		boolCall(PBIdentifiers.TIRESIAS_INIT_EXPRVARIDENTIFIER
+				, referenceParameter(exprVarId)
+				, int32Parameter(line)
+				, int32Parameter(col)
+				, stringParameter(text)
+				, referenceParameter(scopeRef)
+				, referenceParameter(typeRef)
+				, boolParameter(initialized));
+		return true;
+	}
+
+	@Override
+	public boolean initParamIdentifier(Long paramId, int line, int column,
+			String text, Long scopeRef, Long typeRef) {
+
+//		DLL bool TIRESIAS_INIT_PARAMIDENTIFIER(void* context,
+//				void* paramId, std::int32_t line, std::int32_t column, const char* text,
+//				void* scopeRef, void* typeRef);
+
+		boolCall(PBIdentifiers.TIRESIAS_INIT_PARAMIDENTIFIER
+				, referenceParameter(paramId)
+				, int32Parameter(line)
+				, int32Parameter(column)
+				, stringParameter(text)
+				, referenceParameter(scopeRef)
+				, referenceParameter(typeRef));
+		return true;
+	}
+
+	@Override
+	public boolean initLocalVarIdentifier(Long locVarId, int line, int column,
+			String text, Long scopeRef, Long typeRef) {
+
+//		DLL bool TIRESIAS_INIT_LOCVARIDENTIFIER(void* context,
+//				void* locVarId, std::int32_t line, std::int32_t column, const char* text,
+//				void* scopeRef, void* typeRef);
+
+		boolCall(PBIdentifiers.TIRESIAS_INIT_LOCVARIDENTIFIER
+				, referenceParameter(locVarId)
+				, int32Parameter(line)
+				, int32Parameter(column)
+				, stringParameter(text)
+				, referenceParameter(scopeRef)
+				, referenceParameter(typeRef));
+		return true;
+	}
+
+	@Override
+	public boolean initTypeIdentifier(Long typeId, int line, int column,
+			String text, Long scopeRef, Long typeRef, String prefix) {
+
+//		DLL bool TIRESIAS_INIT_TYPEIDENTIFIER(void* context,
+//				void* typeId, std::int32_t line, std::int32_t column, const char* text,
+//				void* scopeRef, void* typeRef, const char* prefix);
+
+		boolCall(PBIdentifiers.TIRESIAS_INIT_TYPEIDENTIFIER
+				, referenceParameter(typeId)
+				, int32Parameter(line)
+				, int32Parameter(column)
+				, stringParameter(text)
+				, referenceParameter(scopeRef)
+				, referenceParameter(typeRef)
+				, stringParameter(prefix));
+		return true;
+	}
+
+	@Override
+	public boolean initSelfIdentifier(Long typeId, int line, int column,
+			String text, Long scopeRef, Long typeRef, String prefix) {
+
+//		DLL bool TIRESIAS_INIT_SELFIDENTIFIER(void* context,
+//				void* typeId, std::int32_t line, std::int32_t column, const char* text,
+//				void* scopeRef, void* typeRef, const char* prefix);
+
+		boolCall(PBIdentifiers.TIRESIAS_INIT_SELFIDENTIFIER
+				, referenceParameter(typeId)
+				, int32Parameter(line)
+				, int32Parameter(column)
+				, stringParameter(text)
+				, referenceParameter(scopeRef)
+				, referenceParameter(typeRef)
+				, stringParameter(prefix));
+		return true;
+	}
+
+	@Override
+	public boolean initMethodIdentifier(Long methodId, int line, int column,
+			String text, Long scopeRef, Long typeRef, String prefix,
+			Long parameterListRef, Long symbolTableRef, Long bodyRef) {
+
+//		DLL bool TIRESIAS_INIT_METHODIDENTIFIER(void* context,
+//				void* methodId, std::int32_t line, std::int32_t column, const char* text,
+//				void* scopeRef, void* typeRef, const char* prefix, void* parameterListRef,
+//				void* symbolTableRef, void* bodyRef);
+
+		boolCall(PBIdentifiers.TIRESIAS_INIT_METHODIDENTIFIER
+				, referenceParameter(methodId)
+				, int32Parameter(line)
+				, int32Parameter(column)
+				, stringParameter(text)
+				, referenceParameter(scopeRef)
+				, referenceParameter(typeRef)
+				, stringParameter(prefix)
+				, referenceParameter(parameterListRef)
+				, referenceParameter(symbolTableRef)
+				, referenceParameter(bodyRef));
+		return true;
+	}
+
+	@Override
+	public boolean initModule(Long moduleId, int line, int column, String text,
+			Long scopeRef, Long typeRef, String prefix, Long symTabRef) {
+
+//		DLL bool TIRESIAS_INIT_MODULE(void* context, void* moduleId,
+//				int line, int column, const char* text, void* scopeRef,
+//				void* typeRef, const char* prefix, void* symTabRef);
+
+		boolCall(PBIdentifiers.TIRESIAS_INIT_MODULE
+				, referenceParameter(moduleId)
+				, int32Parameter(line)
+				, int32Parameter(column)
+				, stringParameter(text)
+				, referenceParameter(scopeRef)
+				, referenceParameter(typeRef)
+				, stringParameter(prefix)
+				, referenceParameter(symTabRef));
+		return true;
+	}
+
+	@Override
+	public boolean initMainModule(Long moduleId, int line, int column,
+			String text, Long scopeRef, Long typeRef, String prefix,
+			Long symTabRef, Long identifierListRef) {
+
+//		DLL bool TIRESIAS_INIT_MAINMODULE(void* context,
+//				void* moduleId, int line, int column, const char* text,
+//				void* scopeRef, void* typeRef, const char* prefix,
+//				void* symTabRef, void* identifierListRef);
+
+		boolCall(PBIdentifiers.TIRESIAS_INIT_MAINMODULE
+				, referenceParameter(moduleId)
+				, int32Parameter(line)
+				, int32Parameter(column)
+				, stringParameter(text)
+				, referenceParameter(scopeRef)
+				, referenceParameter(typeRef)
+				, stringParameter(prefix)
+				, referenceParameter(symTabRef)
+				, referenceParameter(identifierListRef));
+		return true;
+	}
+
+	@Override
+	public boolean initIntType(Long typeId, Long identifierRef,
+			boolean anonymousType, int low, int high) {
+
+//		DLL bool TIRESIAS_INIT_INTTYPE(void* context, void* typeId,
+//				void* identifierRef, bool anonymousType, std::int32_t low,
+//				std::int32_t high);
+
+		boolCall(PBTypes.TIRESIAS_INIT_INTTYPE
+				, referenceParameter(typeId)
+				, referenceParameter(identifierRef)
+				, boolParameter(anonymousType)
+				, int32Parameter(low)
+				, int32Parameter(high));
+		return true;
+	}
+
+	@Override
+	public boolean initBoolType(Long typeId, Long identifierRef,
+			boolean anonymousType) {
+
+//		DLL bool TIRESIAS_INIT_BOOLTYPE(void* context, void* typeId,
+//				void* identifierRef, bool anonymousType);
+
+		boolCall(PBTypes.TIRESIAS_INIT_BOOLTYPE
+				, referenceParameter(typeId)
+				, referenceParameter(identifierRef)
+				, boolParameter(anonymousType));
+		return true;
+	}
+
+	@Override
+	public boolean initValuedEnumType(Long typeId, Long identifierRef,
+			boolean anonymousType, Long symTabRef, Long intTypeRef) {
+
+//		DLL bool TIRESIAS_INIT_VALUEDENUMTYPE(void* context,
+//				void* typeId, void* identifierRef,
+//				bool anonymousType, void* symTabRef, void* intTypeRef);
+
+		boolCall(PBTypes.TIRESIAS_INIT_VALUEDENUMTYPE
+				, referenceParameter(typeId)
+				, referenceParameter(identifierRef)
+				, boolParameter(anonymousType)
+				, referenceParameter(symTabRef)
+				, referenceParameter(intTypeRef));
+		return true;
+	}
+
+	@Override
+	public boolean initEnumType(Long typeId, Long identifierRef,
+			boolean anonymousType, Long symTabRef) {
+
+//		DLL bool TIRESIAS_INIT_ENUMTYPE(void* context, void* typeId,
+//				void* identifierRef, bool anonymousType,
+//				void* symTabRef);
+
+		boolCall(PBTypes.TIRESIAS_INIT_ENUMTYPE
+				, referenceParameter(typeId)
+				, referenceParameter(identifierRef)
+				, boolParameter(anonymousType)
+				, referenceParameter(symTabRef));
+		return true;
+	}
+
+	@Override
+	public boolean initListType(Long typeId, Long identifierRef,
+			boolean anonymousType, Long innerTypeRef, int maxNumberOfElements) {
+
+//		DLL bool TIRESIAS_INIT_LISTTYPE(void* context, void* typeId,
+//				void* identifierRef, bool anonymousType,
+//				void* innerTypeRef, std::uint32_t maxNumberOfElements);
+
+		boolCall(PBTypes.TIRESIAS_INIT_LISTTYPE
+				, referenceParameter(typeId)
+				, referenceParameter(identifierRef)
+				, boolParameter(anonymousType)
+				, referenceParameter(innerTypeRef)
+				, uint32Parameter(maxNumberOfElements));
+		return true;
+	}
+
+	@Override
+	public boolean initTupleType(Long typeId, Long identifierRef,
+			boolean anonymousType, Long typeListRef) {
+
+//		DLL bool TIRESIAS_INIT_TUPLETYPE(void* context, void* typeId,
+//				void* identifierRef, bool anonymousType,
+//				void* typeListRef);
+
+		boolCall(PBTypes.TIRESIAS_INIT_TUPLETYPE
+				, referenceParameter(typeId)
+				, referenceParameter(identifierRef)
+				, boolParameter(anonymousType)
+				, referenceParameter(typeListRef));
+		return true;
+	}
+
+	@Override
+	public boolean initFunctionType(Long typeId, Long identifierRef,
+			boolean anonymousType, Long paramTypeListRef, Long returnTypeRef,
+			int functionKind, boolean isPure) {
+
+//		DLL bool TIRESIAS_INIT_FUNCTIONTYPE(void* context,
+//				void* typeId, void* identifierRef,
+//				bool anonymousType, void* paramTypeListRef,
+//				void* returnTypeRef, std::int32_t functionKind, bool isPure);
+
+		boolCall(PBTypes.TIRESIAS_INIT_FUNCTIONTYPE
+				, referenceParameter(typeId)
+				, referenceParameter(identifierRef)
+				, boolParameter(anonymousType)
+				, referenceParameter(paramTypeListRef)
+				, referenceParameter(returnTypeRef)
+				, int32Parameter(functionKind)
+				, boolParameter(isPure));
+		return true;
+	}
+
+	@Override
+	public boolean initActionSystemInstance(Long instance, Long typeRef,
+			String name, int numOfCreatedObjs, Long parentInstanceRef) {
+
+//		DLL bool TIRESIAS_INIT_ACTIONSYSTEMINSTANCE(void* context,
+//				void* instance, void* typeRef, const char* name,
+//				std::int32_t numOfCreatedObjs, void* parentInstanceRef);
+
+		boolCall(PBTypes.TIRESIAS_INIT_ACTIONSYSTEMINSTANCE
+				, referenceParameter(instance)
+				, referenceParameter(typeRef)
+				, stringParameter(name)
+				, int32Parameter(numOfCreatedObjs)
+				, referenceParameter(parentInstanceRef));
+		return true;
+	}
+
+	@Override
+	public boolean initActionSystemType(Long typeId, Long identifierRef,
+			boolean anonymousType, Long baseTypeRef, Long parentScopeRef,
+			Long doOdBlockRef, Long symTab, Long objectsListRef,
+			Long derivedObjectsListRef, boolean autoConstruction,
+			boolean isInSystemDescription) {
+
+//		DLL bool TIRESIAS_INIT_ACTIONSYSTEMTYPE(void* context,
+//				void* typeId, void* identifierRef,
+//				bool anonymousType, void* baseTypeRef,
+//				void* parentScopeRef, void* doOdBlockRef,
+//				void* symTab, void* objectsListRef,
+//				void* derivedObjectsListRef, bool autoConstruction,
+//				bool isInSystemDescription);
+
+		boolCall(PBTypes.TIRESIAS_INIT_ACTIONSYSTEMTYPE
+				, referenceParameter(typeId)
+				, referenceParameter(identifierRef)
+				, boolParameter(anonymousType)
+				, referenceParameter(baseTypeRef)
+				, referenceParameter(parentScopeRef)
+				, referenceParameter(doOdBlockRef)
+				, referenceParameter(symTab)
+				, referenceParameter(objectsListRef)
+				, referenceParameter(derivedObjectsListRef)
+				, boolParameter(autoConstruction)
+				, boolParameter(isInSystemDescription));
+		return true;
+	}
+
+	@Override
+	public boolean initNullType(Long typeId, Long identifierRef, boolean anonymousType) {
+
+//		DLL bool TIRESIAS_INIT_NULLTYPE(void* context, void* typeId,
+//				void* identifierRef, bool anonymousType);
+
+		boolCall(PBTypes.TIRESIAS_INIT_NULLTYPE
+				, referenceParameter(typeId)
+				, referenceParameter(identifierRef)
+				, boolParameter(anonymousType));
+		return true;
+	}
+
+	@Override
+	public boolean initSkipStatement(Long stmnt, int line, int col) {
+
+//		DLL bool TIRESIAS_INIT_SKIP(void* context, void* stmnt,
+//				std::int32_t line, std::int32_t col);
+
+		boolCall(PBStatements.TIRESIAS_INIT_SKIP
+				, referenceParameter(stmnt)
+				, int32Parameter(line)
+				, int32Parameter(col));
+		return true;
+	}
+
+	@Override
+	public boolean initBreakStatement(Long stmnt, int line, int col) {
+
+//		DLL bool TIRESIAS_INIT_BREAK(void* context, void* stmnt,
+//				std::int32_t line, std::int32_t col);
+
+		boolCall(PBStatements.TIRESIAS_INIT_BREAK
+				, referenceParameter(stmnt)
+				, int32Parameter(line)
+				, int32Parameter(col));
+		return true;
+	}
+
+	@Override
+	public boolean initAbortStatement(Long stmnt, int line, int col) {
+
+//		DLL bool TIRESIAS_INIT_ABORT(void* context, void* stmnt,
+//				std::int32_t line, std::int32_t col);
+
+		boolCall(PBStatements.TIRESIAS_INIT_ABORT
+				, referenceParameter(stmnt)
+				, int32Parameter(line)
+				, int32Parameter(col));
+		return true;
+	}
+
+	@Override
+	public boolean initNondetBlock(Long block, int line, int col,
+			Long symTabRef, Long stmtListRef, Long scopeRef) {
+
+//		DLL bool TIRESIAS_INIT_NONDETBLOCK(void* context, void* block,
+//				std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
+//				void* scopeRef);
+
+		boolCall(PBStatements.TIRESIAS_INIT_NONDETBLOCK
+				, referenceParameter(block)
+				, int32Parameter(line)
+				, int32Parameter(col)
+				, referenceParameter(symTabRef)
+				, referenceParameter(stmtListRef)
+				, referenceParameter(scopeRef));
+		return true;
+	}
+
+	@Override
+	public boolean initSeqBlock(Long block, int line, int col, Long symTabRef,
+			Long stmtListRef, Long scopeRef, Long filterExprRef) {
+
+//		DLL bool TIRESIAS_INIT_SEQBLOCK(void* context, void* block,
+//				std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
+//				void* scopeRef, void* filterExprRef);
+
+		boolCall(PBStatements.TIRESIAS_INIT_SEQBLOCK
+				, referenceParameter(block)
+				, int32Parameter(line)
+				, int32Parameter(col)
+				, referenceParameter(symTabRef)
+				, referenceParameter(stmtListRef)
+				, referenceParameter(scopeRef)
+				, referenceParameter(filterExprRef));
+		return true;
+	}
+
+	@Override
+	public boolean initPrioBlock(Long block, int line, int col, Long symTabRef,
+			Long stmtListRef, Long scopeRef) {
+
+//		DLL bool TIRESIAS_INIT_PRIOBLOCK(void* context, void* block,
+//				std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
+//				void* scopeRef);
+
+		boolCall(PBStatements.TIRESIAS_INIT_PRIOBLOCK
+				, referenceParameter(block)
+				, int32Parameter(line)
+				, int32Parameter(col)
+				, referenceParameter(symTabRef)
+				, referenceParameter(stmtListRef)
+				, referenceParameter(scopeRef));
+		return true;
+	}
+
+	@Override
+	public boolean initGuardedCommand(Long stmt, int line, int pos,
+			Long scopeRef, Long guardExprRef, Long bodyRef) {
+
+//		DLL bool TIRESIAS_INIT_GUARDEDCOMMAND(void* context,
+//				void* stmt, std::int32_t line, std::int32_t pos, void* scopeRef,
+//				void* guardExprRef, void* bodyRef);
+
+		boolCall(PBStatements.TIRESIAS_INIT_GUARDEDCOMMAND
+				, referenceParameter(stmt)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(scopeRef)
+				, referenceParameter(guardExprRef)
+				, referenceParameter(bodyRef));
+		return true;
+	}
+
+	@Override
+	public boolean initAssignment(Long stmt, int line, int pos, Long scopeRef,
+			Long nonDetExprRef, Long placeExprListRef, Long valueExprListRef,
+			Long symTabRef) {
+
+//		DLL bool TIRESIAS_INIT_ASSIGNMENT(void* context, void* stmt,
+//				std::int32_t line, std::int32_t pos, void* scopeRef, void* nonDetExprRef,
+//				void* placeExprListRef, void* valueExprListRef,
+//				void* symTabRef);
+
+		boolCall(PBStatements.TIRESIAS_INIT_ASSIGNMENT
+				, referenceParameter(stmt)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(scopeRef)
+				, referenceParameter(nonDetExprRef)
+				, referenceParameter(placeExprListRef)
+				, referenceParameter(valueExprListRef)
+				, referenceParameter(symTabRef));
+		return true;
+	}
+
+	@Override
+	public boolean initCall(Long stmt, int line, int pos, Long callExprRef) {
+
+//		DLL bool TIRESIAS_INIT_CALL(void* context, void* stmt,
+//				std::int32_t line, std::int32_t pos, void* callExprRef);
+
+		boolCall(PBStatements.TIRESIAS_INIT_CALL
+				, referenceParameter(stmt)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(callExprRef));
+		return true;
+	}
+
+	@Override
+	public boolean initTypeExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef) {
+
+//		DLL bool TIRESIAS_INIT_TYPEEXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_TYPEEXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef));
+		return true;
+	}
+
+	@Override
+	public boolean initIdentifierExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long identifierRef, boolean isSelf) {
+
+//		DLL bool TIRESIAS_INIT_IDENTIFIEREXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* identifierRef, bool isSelf);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_IDENTIFIEREXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(identifierRef)
+				, boolParameter(isSelf));
+		return true;
+	}
+
+	@Override
+	public boolean initUnaryExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long child) {
+
+//		DLL bool TIRESIAS_INIT_UNARYEXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* child);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_UNARYEXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(child));
+		return true;
+	}
+
+	@Override
+	public boolean initBinaryExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long left, Long right) {
+
+//		DLL bool TIRESIAS_INIT_BINARYEXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* left, void* right);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_BINARYEXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(left)
+				, referenceParameter(right));
+		return true;
+	}
+
+	@Override
+	public boolean initTernaryExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long left, Long mid, Long right, Long defScopeRef) {
+
+//		DLL bool TIRESIAS_INIT_TERNARYEXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* left, void* mid, void* right, void* defScopeRef);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_TERNARYEXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(left)
+				, referenceParameter(mid)
+				, referenceParameter(right)
+				, referenceParameter(defScopeRef));
+		return true;
+	}
+
+	@Override
+	public boolean initIntValueExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			int value) {
+
+//		DLL bool TIRESIAS_INIT_INTVALUEEXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				std::int32_t value);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_INTVALUEEXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, int32Parameter(value));
+		return true;
+	}
+
+	@Override
+	public boolean initBoolValueExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			boolean value) {
+
+//		DLL bool TIRESIAS_INIT_BOOLVALUEEXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				bool value);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_BOOLVALUEEXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, boolParameter(value));
+		return true;
+	}
+
+	@Override
+	public boolean initNullValueExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef) {
+
+//		DLL bool TIRESIAS_INIT_REFVALUEEXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,void* object);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_REFVALUEEXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(new Long(0)));
+		return true;
+	}
+
+	@Override
+	public boolean initListConstructor(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long exprList, Long symTab, Long parentScope, Long comprehension,
+			boolean hasComprehension) {
+
+//		DLL bool TIRESIAS_INIT_LISTCONSTRUCTOR(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* exprList, void* symTab, void* parentScope,
+//				void* comprehension, bool hasComprehension);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_LISTCONSTRUCTOR
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(exprList)
+				, referenceParameter(symTab)
+				, referenceParameter(parentScope)
+				, referenceParameter(comprehension)
+				, boolParameter(hasComprehension));
+		return true;
+	}
+
+	@Override
+	public boolean initSetConstructor(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long exprList, Long symTab, Long parentScope, Long comprehension,
+			boolean hasComprehension) {
+
+//		DLL bool TIRESIAS_INIT_SETCONSTRUCTOR(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* exprList, void* symTab, void* parentScope,
+//				void* comprehension, bool hasComprehension);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_SETCONSTRUCTOR
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(exprList)
+				, referenceParameter(symTab)
+				, referenceParameter(parentScope)
+				, referenceParameter(comprehension)
+				, boolParameter(hasComprehension));
+		return true;
+	}
+
+	@Override
+	public boolean initTupleConstructor(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long exprList, Long tupleTypeId, boolean isMatcher) {
+
+//		DLL bool TIRESIAS_INIT_TUPLECONSTRUCTOR(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* exprList, void* tupleTypeId, bool isMatcher);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_TUPLECONSTRUCTOR
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(exprList)
+				, referenceParameter(tupleTypeId)
+				, boolParameter(isMatcher));
+		return true;
+	}
+
+	@Override
+	public boolean initAccessExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long left, Long right) {
+
+//		DLL bool TIRESIAS_INIT_ACCESSEXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* left, void* right);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_ACCESSEXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(left)
+				, referenceParameter(right));
+		return true;
+	}
+
+	@Override
+	public boolean initTupleMapAccessExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long child, Long argument) {
+
+//		DLL bool TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* child, void* argument);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(child)
+				, referenceParameter(argument));
+		return true;
+	}
+
+	@Override
+	public boolean initCallExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long child, Long argumentList, Long scopeRef) {
+
+//		DLL bool TIRESIAS_INIT_CALLEXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* child, void* argumentList, void* scopeRef);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_CALLEXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(child)
+				, referenceParameter(argumentList)
+				, referenceParameter(scopeRef));
+		return true;
+	}
+
+	@Override
+	public boolean initQuantifierExpression(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long child, Long symTabRef, Long scopeRef) {
+
+//		DLL bool TIRESIAS_INIT_QUANTIFIEREXPRESSION(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* child, void* symTabRef, void* scopeRef);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_QUANTIFIEREXPRESSION
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(child)
+				, referenceParameter(symTabRef)
+				, referenceParameter(scopeRef));
+		return true;
+	}
+
+	@Override
+	public boolean initObjectConstructor(Long expr, int line, int pos,
+			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
+			Long instanceList, int currentInstance, String name) {
+
+//		DLL bool TIRESIAS_INIT_OBJECTCONSTRUCTOR(void* context,
+//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
+//				void* callTargetsIdentifierListRef, void* symbTabRef,
+//				void* instanceList, std::uint32_t currentInstance, const char* name);
+
+		boolCall(PBExpressions.TIRESIAS_INIT_OBJECTCONSTRUCTOR
+				, referenceParameter(expr)
+				, int32Parameter(line)
+				, int32Parameter(pos)
+				, referenceParameter(typeRef)
+				, referenceParameter(callTargetsIdentifierListRef)
+				, referenceParameter(symbTabRef)
+				, referenceParameter(instanceList)
+				, uint32Parameter(currentInstance)
+				, stringParameter(name));
+		return true;
+	}
+
+	@Override
+	public void setMainModule(MainModule mainModule, Long id) {
+		m_traversal.setMainModule(id);
+		m_initialized = true;
+	}
+
+}
Index: trunk/compiler/cppAst/ast/types/TupleType.hpp
===================================================================
--- trunk/compiler/cppAst/ast/types/TupleType.hpp	(nonexistent)
+++ trunk/compiler/cppAst/ast/types/TupleType.hpp	(revision 2)
@@ -0,0 +1,62 @@
+/**
+  *
+  *                  OOAS Compiler - C++ AST
+  *
+  * Copyright 2015, AIT Austrian Institute of Technology.
+  * All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+
+#pragma once
+
+#include <ast/types/Type.hpp>
+#include <ast/Containers.hpp>
+#include <deque>
+#include <ast/IAstVisitor.hpp>
+#include <string>
+
+namespace Ast {
+
+class TupleType final
+	: public Type
+{
+protected:
+	TypeList m_innerTypes;
+
+	TupleType(): Type(TypeKind::TupleType), m_innerTypes() {}
+	TupleType(const TupleType &toCopy): Type(toCopy), m_innerTypes(toCopy.m_innerTypes) {}
+
+	static TupleType* create() {return new TupleType();}
+	static TupleType* createCopy(const TupleType& toCopy) {return new TupleType(toCopy);}
+public:
+	friend class Ast;
+	friend class Type;
+
+
+	void init(TypeIdentifier* identifierRef, bool anonymousType, TypeList* typeListRef) {
+		Type::init(identifierRef, anonymousType);
+		m_innerTypes = std::move(*typeListRef);
+	}
+
+	TypeList& innerTypes() {return m_innerTypes;};
+
+	void addType(Type* aType) {m_innerTypes.push_back(aType);};
+	void accept(IAstVisitor& visitor) override {visitor.visit(this);};
+};
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/gen/RecordedAstTraversal.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/gen/RecordedAstTraversal.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/gen/RecordedAstTraversal.java	(revision 2)
@@ -0,0 +1,3900 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: Record.proto
+
+package org.momut.ooas.codegen.ast.protobuf.gen;
+
+public final class RecordedAstTraversal {
+  private RecordedAstTraversal() {}
+  public static void registerAllExtensions(
+      com.google.protobuf.ExtensionRegistry registry) {
+  }
+  /**
+   * Protobuf enum {@code serialize.PBReturnType}
+   */
+  public enum PBReturnType
+      implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <code>type_voidPointer = 1;</code>
+     */
+    type_voidPointer(0, 1),
+    /**
+     * <code>type_boolean = 2;</code>
+     */
+    type_boolean(1, 2),
+    ;
+
+    /**
+     * <code>type_voidPointer = 1;</code>
+     */
+    public static final int type_voidPointer_VALUE = 1;
+    /**
+     * <code>type_boolean = 2;</code>
+     */
+    public static final int type_boolean_VALUE = 2;
+
+
+    @Override
+	public final int getNumber() { return value; }
+
+    public static PBReturnType valueOf(int value) {
+      switch (value) {
+        case 1: return type_voidPointer;
+        case 2: return type_boolean;
+        default: return null;
+      }
+    }
+
+    public static com.google.protobuf.Internal.EnumLiteMap<PBReturnType>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static com.google.protobuf.Internal.EnumLiteMap<PBReturnType>
+        internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<PBReturnType>() {
+            @Override
+			public PBReturnType findValueByNumber(int number) {
+              return PBReturnType.valueOf(number);
+            }
+          };
+
+    @Override
+	public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
+      return getDescriptor().getValues().get(index);
+    }
+    @Override
+	public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
+      return getDescriptor();
+    }
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.getDescriptor().getEnumTypes().get(0);
+    }
+
+    private static final PBReturnType[] VALUES = values();
+
+    public static PBReturnType valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      if (desc.getType() != getDescriptor()) {
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
+      }
+      return VALUES[desc.getIndex()];
+    }
+
+    private final int index;
+    private final int value;
+
+    private PBReturnType(int index, int value) {
+      this.index = index;
+      this.value = value;
+    }
+
+    // @@protoc_insertion_point(enum_scope:serialize.PBReturnType)
+  }
+
+  public interface PBParameterOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
+
+    // optional uint64 uint64_value = 1;
+    /**
+     * <code>optional uint64 uint64_value = 1;</code>
+     *
+     * <pre>
+     * meant for references, but may be used for actual uint64 values too (if they're needed in the future)
+     * </pre>
+     */
+    boolean hasUint64Value();
+    /**
+     * <code>optional uint64 uint64_value = 1;</code>
+     *
+     * <pre>
+     * meant for references, but may be used for actual uint64 values too (if they're needed in the future)
+     * </pre>
+     */
+    long getUint64Value();
+
+    // optional string literal_value = 2;
+    /**
+     * <code>optional string literal_value = 2;</code>
+     */
+    boolean hasLiteralValue();
+    /**
+     * <code>optional string literal_value = 2;</code>
+     */
+    java.lang.String getLiteralValue();
+    /**
+     * <code>optional string literal_value = 2;</code>
+     */
+    com.google.protobuf.ByteString
+        getLiteralValueBytes();
+
+    // optional bool bool_value = 3;
+    /**
+     * <code>optional bool bool_value = 3;</code>
+     */
+    boolean hasBoolValue();
+    /**
+     * <code>optional bool bool_value = 3;</code>
+     */
+    boolean getBoolValue();
+
+    // optional int32 int32_value = 4;
+    /**
+     * <code>optional int32 int32_value = 4;</code>
+     */
+    boolean hasInt32Value();
+    /**
+     * <code>optional int32 int32_value = 4;</code>
+     */
+    int getInt32Value();
+
+    // optional uint32 uint32_value = 5;
+    /**
+     * <code>optional uint32 uint32_value = 5;</code>
+     */
+    boolean hasUint32Value();
+    /**
+     * <code>optional uint32 uint32_value = 5;</code>
+     */
+    int getUint32Value();
+  }
+  /**
+   * Protobuf type {@code serialize.PBParameter}
+   */
+  public static final class PBParameter extends
+      com.google.protobuf.GeneratedMessage
+      implements PBParameterOrBuilder {
+    // Use PBParameter.newBuilder() to construct.
+    private PBParameter(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+      super(builder);
+      this.unknownFields = builder.getUnknownFields();
+    }
+    private PBParameter(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+    private static final PBParameter defaultInstance;
+    public static PBParameter getDefaultInstance() {
+      return defaultInstance;
+    }
+
+    @Override
+	public PBParameter getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private PBParameter(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      @SuppressWarnings("unused")
+	final
+	int mutable_bitField0_ = 0;
+      final com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          final int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              bitField0_ |= 0x00000001;
+              uint64Value_ = input.readUInt64();
+              break;
+            }
+            case 18: {
+              bitField0_ |= 0x00000002;
+              literalValue_ = input.readBytes();
+              break;
+            }
+            case 24: {
+              bitField0_ |= 0x00000004;
+              boolValue_ = input.readBool();
+              break;
+            }
+            case 32: {
+              bitField0_ |= 0x00000008;
+              int32Value_ = input.readInt32();
+              break;
+            }
+            case 40: {
+              bitField0_ |= 0x00000010;
+              uint32Value_ = input.readUInt32();
+              break;
+            }
+          }
+        }
+      } catch (final com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (final java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBParameter_descriptor;
+    }
+
+    @Override
+	protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBParameter_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<PBParameter> PARSER =
+        new com.google.protobuf.AbstractParser<PBParameter>() {
+      @Override
+	public PBParameter parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new PBParameter(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<PBParameter> getParserForType() {
+      return PARSER;
+    }
+
+    private int bitField0_;
+    // optional uint64 uint64_value = 1;
+    public static final int UINT64_VALUE_FIELD_NUMBER = 1;
+    private long uint64Value_;
+    /**
+     * <code>optional uint64 uint64_value = 1;</code>
+     *
+     * <pre>
+     * meant for references, but may be used for actual uint64 values too (if they're needed in the future)
+     * </pre>
+     */
+    @Override
+	public boolean hasUint64Value() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    /**
+     * <code>optional uint64 uint64_value = 1;</code>
+     *
+     * <pre>
+     * meant for references, but may be used for actual uint64 values too (if they're needed in the future)
+     * </pre>
+     */
+    @Override
+	public long getUint64Value() {
+      return uint64Value_;
+    }
+
+    // optional string literal_value = 2;
+    public static final int LITERAL_VALUE_FIELD_NUMBER = 2;
+    private java.lang.Object literalValue_;
+    /**
+     * <code>optional string literal_value = 2;</code>
+     */
+    @Override
+	public boolean hasLiteralValue() {
+      return ((bitField0_ & 0x00000002) == 0x00000002);
+    }
+    /**
+     * <code>optional string literal_value = 2;</code>
+     */
+    @Override
+	public java.lang.String getLiteralValue() {
+      final java.lang.Object ref = literalValue_;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
+      } else {
+        final com.google.protobuf.ByteString bs =
+            (com.google.protobuf.ByteString) ref;
+        final java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
+          literalValue_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string literal_value = 2;</code>
+     */
+    @Override
+	public com.google.protobuf.ByteString
+        getLiteralValueBytes() {
+      final java.lang.Object ref = literalValue_;
+      if (ref instanceof java.lang.String) {
+        final com.google.protobuf.ByteString b =
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        literalValue_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    // optional bool bool_value = 3;
+    public static final int BOOL_VALUE_FIELD_NUMBER = 3;
+    private boolean boolValue_;
+    /**
+     * <code>optional bool bool_value = 3;</code>
+     */
+    @Override
+	public boolean hasBoolValue() {
+      return ((bitField0_ & 0x00000004) == 0x00000004);
+    }
+    /**
+     * <code>optional bool bool_value = 3;</code>
+     */
+    @Override
+	public boolean getBoolValue() {
+      return boolValue_;
+    }
+
+    // optional int32 int32_value = 4;
+    public static final int INT32_VALUE_FIELD_NUMBER = 4;
+    private int int32Value_;
+    /**
+     * <code>optional int32 int32_value = 4;</code>
+     */
+    @Override
+	public boolean hasInt32Value() {
+      return ((bitField0_ & 0x00000008) == 0x00000008);
+    }
+    /**
+     * <code>optional int32 int32_value = 4;</code>
+     */
+    @Override
+	public int getInt32Value() {
+      return int32Value_;
+    }
+
+    // optional uint32 uint32_value = 5;
+    public static final int UINT32_VALUE_FIELD_NUMBER = 5;
+    private int uint32Value_;
+    /**
+     * <code>optional uint32 uint32_value = 5;</code>
+     */
+    @Override
+	public boolean hasUint32Value() {
+      return ((bitField0_ & 0x00000010) == 0x00000010);
+    }
+    /**
+     * <code>optional uint32 uint32_value = 5;</code>
+     */
+    @Override
+	public int getUint32Value() {
+      return uint32Value_;
+    }
+
+    private void initFields() {
+      uint64Value_ = 0L;
+      literalValue_ = "";
+      boolValue_ = false;
+      int32Value_ = 0;
+      uint32Value_ = 0;
+    }
+    private byte memoizedIsInitialized = -1;
+    @Override
+	public final boolean isInitialized() {
+      final byte isInitialized = memoizedIsInitialized;
+      if (isInitialized != -1) return isInitialized == 1;
+
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    @Override
+	public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getSerializedSize();
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        output.writeUInt64(1, uint64Value_);
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        output.writeBytes(2, getLiteralValueBytes());
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        output.writeBool(3, boolValue_);
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        output.writeInt32(4, int32Value_);
+      }
+      if (((bitField0_ & 0x00000010) == 0x00000010)) {
+        output.writeUInt32(5, uint32Value_);
+      }
+      getUnknownFields().writeTo(output);
+    }
+
+    private int memoizedSerializedSize = -1;
+    @Override
+	public int getSerializedSize() {
+      int size = memoizedSerializedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt64Size(1, uint64Value_);
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(2, getLiteralValueBytes());
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBoolSize(3, boolValue_);
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeInt32Size(4, int32Value_);
+      }
+      if (((bitField0_ & 0x00000010) == 0x00000010)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt32Size(5, uint32Value_);
+      }
+      size += getUnknownFields().getSerializedSize();
+      memoizedSerializedSize = size;
+      return size;
+    }
+
+    private static final long serialVersionUID = 0L;
+    @java.lang.Override
+    protected java.lang.Object writeReplace()
+        throws java.io.ObjectStreamException {
+      return super.writeReplace();
+    }
+
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter parseFrom(
+        com.google.protobuf.ByteString data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter parseFrom(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+
+    public static Builder newBuilder() { return Builder.create(); }
+    @Override
+	public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter prototype) {
+      return newBuilder().mergeFrom(prototype);
+    }
+    @Override
+	public Builder toBuilder() { return newBuilder(this); }
+
+    @java.lang.Override
+    protected Builder newBuilderForType(
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+      final Builder builder = new Builder(parent);
+      return builder;
+    }
+    /**
+     * Protobuf type {@code serialize.PBParameter}
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessage.Builder<Builder>
+       implements org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBParameter_descriptor;
+      }
+
+      @Override
+	protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBParameter_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder.class);
+      }
+
+      // Construct using org.momut.ooas.argos.codegen.serialize.gen.RecordedAstTraversal.PBParameter.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+        }
+      }
+      private static Builder create() {
+        return new Builder();
+      }
+
+      @Override
+	public Builder clear() {
+        super.clear();
+        uint64Value_ = 0L;
+        bitField0_ = (bitField0_ & ~0x00000001);
+        literalValue_ = "";
+        bitField0_ = (bitField0_ & ~0x00000002);
+        boolValue_ = false;
+        bitField0_ = (bitField0_ & ~0x00000004);
+        int32Value_ = 0;
+        bitField0_ = (bitField0_ & ~0x00000008);
+        uint32Value_ = 0;
+        bitField0_ = (bitField0_ & ~0x00000010);
+        return this;
+      }
+
+      @Override
+	public Builder clone() {
+        return create().mergeFrom(buildPartial());
+      }
+
+      @Override
+	public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBParameter_descriptor;
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter getDefaultInstanceForType() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.getDefaultInstance();
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter build() {
+        final org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter buildPartial() {
+        final org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter result = new org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter(this);
+        final int from_bitField0_ = bitField0_;
+        int to_bitField0_ = 0;
+        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+          to_bitField0_ |= 0x00000001;
+        }
+        result.uint64Value_ = uint64Value_;
+        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+          to_bitField0_ |= 0x00000002;
+        }
+        result.literalValue_ = literalValue_;
+        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+          to_bitField0_ |= 0x00000004;
+        }
+        result.boolValue_ = boolValue_;
+        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
+          to_bitField0_ |= 0x00000008;
+        }
+        result.int32Value_ = int32Value_;
+        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
+          to_bitField0_ |= 0x00000010;
+        }
+        result.uint32Value_ = uint32Value_;
+        result.bitField0_ = to_bitField0_;
+        onBuilt();
+        return result;
+      }
+
+      @Override
+	public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter) {
+          return mergeFrom((org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter other) {
+        if (other == org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.getDefaultInstance()) return this;
+        if (other.hasUint64Value()) {
+          setUint64Value(other.getUint64Value());
+        }
+        if (other.hasLiteralValue()) {
+          bitField0_ |= 0x00000002;
+          literalValue_ = other.literalValue_;
+          onChanged();
+        }
+        if (other.hasBoolValue()) {
+          setBoolValue(other.getBoolValue());
+        }
+        if (other.hasInt32Value()) {
+          setInt32Value(other.getInt32Value());
+        }
+        if (other.hasUint32Value()) {
+          setUint32Value(other.getUint32Value());
+        }
+        this.mergeUnknownFields(other.getUnknownFields());
+        return this;
+      }
+
+      @Override
+	public final boolean isInitialized() {
+        return true;
+      }
+
+      @Override
+	public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (final com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+      private int bitField0_;
+
+      // optional uint64 uint64_value = 1;
+      private long uint64Value_ ;
+      /**
+       * <code>optional uint64 uint64_value = 1;</code>
+       *
+       * <pre>
+       * meant for references, but may be used for actual uint64 values too (if they're needed in the future)
+       * </pre>
+       */
+      @Override
+	public boolean hasUint64Value() {
+        return ((bitField0_ & 0x00000001) == 0x00000001);
+      }
+      /**
+       * <code>optional uint64 uint64_value = 1;</code>
+       *
+       * <pre>
+       * meant for references, but may be used for actual uint64 values too (if they're needed in the future)
+       * </pre>
+       */
+      @Override
+	public long getUint64Value() {
+        return uint64Value_;
+      }
+      /**
+       * <code>optional uint64 uint64_value = 1;</code>
+       *
+       * <pre>
+       * meant for references, but may be used for actual uint64 values too (if they're needed in the future)
+       * </pre>
+       */
+      public Builder setUint64Value(long value) {
+        bitField0_ |= 0x00000001;
+        uint64Value_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional uint64 uint64_value = 1;</code>
+       *
+       * <pre>
+       * meant for references, but may be used for actual uint64 values too (if they're needed in the future)
+       * </pre>
+       */
+      public Builder clearUint64Value() {
+        bitField0_ = (bitField0_ & ~0x00000001);
+        uint64Value_ = 0L;
+        onChanged();
+        return this;
+      }
+
+      // optional string literal_value = 2;
+      private java.lang.Object literalValue_ = "";
+      /**
+       * <code>optional string literal_value = 2;</code>
+       */
+      @Override
+	public boolean hasLiteralValue() {
+        return ((bitField0_ & 0x00000002) == 0x00000002);
+      }
+      /**
+       * <code>optional string literal_value = 2;</code>
+       */
+      @Override
+	public java.lang.String getLiteralValue() {
+        final java.lang.Object ref = literalValue_;
+        if (!(ref instanceof java.lang.String)) {
+          final java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
+          literalValue_ = s;
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string literal_value = 2;</code>
+       */
+      @Override
+	public com.google.protobuf.ByteString
+          getLiteralValueBytes() {
+        final java.lang.Object ref = literalValue_;
+        if (ref instanceof String) {
+          final com.google.protobuf.ByteString b =
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          literalValue_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string literal_value = 2;</code>
+       */
+      public Builder setLiteralValue(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000002;
+        literalValue_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string literal_value = 2;</code>
+       */
+      public Builder clearLiteralValue() {
+        bitField0_ = (bitField0_ & ~0x00000002);
+        literalValue_ = getDefaultInstance().getLiteralValue();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string literal_value = 2;</code>
+       */
+      public Builder setLiteralValueBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000002;
+        literalValue_ = value;
+        onChanged();
+        return this;
+      }
+
+      // optional bool bool_value = 3;
+      private boolean boolValue_ ;
+      /**
+       * <code>optional bool bool_value = 3;</code>
+       */
+      @Override
+	public boolean hasBoolValue() {
+        return ((bitField0_ & 0x00000004) == 0x00000004);
+      }
+      /**
+       * <code>optional bool bool_value = 3;</code>
+       */
+      @Override
+	public boolean getBoolValue() {
+        return boolValue_;
+      }
+      /**
+       * <code>optional bool bool_value = 3;</code>
+       */
+      public Builder setBoolValue(boolean value) {
+        bitField0_ |= 0x00000004;
+        boolValue_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional bool bool_value = 3;</code>
+       */
+      public Builder clearBoolValue() {
+        bitField0_ = (bitField0_ & ~0x00000004);
+        boolValue_ = false;
+        onChanged();
+        return this;
+      }
+
+      // optional int32 int32_value = 4;
+      private int int32Value_ ;
+      /**
+       * <code>optional int32 int32_value = 4;</code>
+       */
+      @Override
+	public boolean hasInt32Value() {
+        return ((bitField0_ & 0x00000008) == 0x00000008);
+      }
+      /**
+       * <code>optional int32 int32_value = 4;</code>
+       */
+      @Override
+	public int getInt32Value() {
+        return int32Value_;
+      }
+      /**
+       * <code>optional int32 int32_value = 4;</code>
+       */
+      public Builder setInt32Value(int value) {
+        bitField0_ |= 0x00000008;
+        int32Value_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional int32 int32_value = 4;</code>
+       */
+      public Builder clearInt32Value() {
+        bitField0_ = (bitField0_ & ~0x00000008);
+        int32Value_ = 0;
+        onChanged();
+        return this;
+      }
+
+      // optional uint32 uint32_value = 5;
+      private int uint32Value_ ;
+      /**
+       * <code>optional uint32 uint32_value = 5;</code>
+       */
+      @Override
+	public boolean hasUint32Value() {
+        return ((bitField0_ & 0x00000010) == 0x00000010);
+      }
+      /**
+       * <code>optional uint32 uint32_value = 5;</code>
+       */
+      @Override
+	public int getUint32Value() {
+        return uint32Value_;
+      }
+      /**
+       * <code>optional uint32 uint32_value = 5;</code>
+       */
+      public Builder setUint32Value(int value) {
+        bitField0_ |= 0x00000010;
+        uint32Value_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional uint32 uint32_value = 5;</code>
+       */
+      public Builder clearUint32Value() {
+        bitField0_ = (bitField0_ & ~0x00000010);
+        uint32Value_ = 0;
+        onChanged();
+        return this;
+      }
+
+      // @@protoc_insertion_point(builder_scope:serialize.PBParameter)
+    }
+
+    static {
+      defaultInstance = new PBParameter(true);
+      defaultInstance.initFields();
+    }
+
+    // @@protoc_insertion_point(class_scope:serialize.PBParameter)
+  }
+
+  public interface PBReturnValueOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
+
+    // required .serialize.PBReturnType return_type = 1;
+    /**
+     * <code>required .serialize.PBReturnType return_type = 1;</code>
+     */
+    boolean hasReturnType();
+    /**
+     * <code>required .serialize.PBReturnType return_type = 1;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType getReturnType();
+
+    // optional uint64 return_id = 2;
+    /**
+     * <code>optional uint64 return_id = 2;</code>
+     */
+    boolean hasReturnId();
+    /**
+     * <code>optional uint64 return_id = 2;</code>
+     */
+    long getReturnId();
+  }
+  /**
+   * Protobuf type {@code serialize.PBReturnValue}
+   */
+  public static final class PBReturnValue extends
+      com.google.protobuf.GeneratedMessage
+      implements PBReturnValueOrBuilder {
+    // Use PBReturnValue.newBuilder() to construct.
+    private PBReturnValue(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+      super(builder);
+      this.unknownFields = builder.getUnknownFields();
+    }
+    private PBReturnValue(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+    private static final PBReturnValue defaultInstance;
+    public static PBReturnValue getDefaultInstance() {
+      return defaultInstance;
+    }
+
+    @Override
+	public PBReturnValue getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private PBReturnValue(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      @SuppressWarnings("unused")
+	final
+	int mutable_bitField0_ = 0;
+      final com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          final int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              final int rawValue = input.readEnum();
+              final org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType value = org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(1, rawValue);
+              } else {
+                bitField0_ |= 0x00000001;
+                returnType_ = value;
+              }
+              break;
+            }
+            case 16: {
+              bitField0_ |= 0x00000002;
+              returnId_ = input.readUInt64();
+              break;
+            }
+          }
+        }
+      } catch (final com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (final java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBReturnValue_descriptor;
+    }
+
+    @Override
+	protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBReturnValue_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<PBReturnValue> PARSER =
+        new com.google.protobuf.AbstractParser<PBReturnValue>() {
+      @Override
+	public PBReturnValue parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new PBReturnValue(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<PBReturnValue> getParserForType() {
+      return PARSER;
+    }
+
+    private int bitField0_;
+    // required .serialize.PBReturnType return_type = 1;
+    public static final int RETURN_TYPE_FIELD_NUMBER = 1;
+    private org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType returnType_;
+    /**
+     * <code>required .serialize.PBReturnType return_type = 1;</code>
+     */
+    @Override
+	public boolean hasReturnType() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    /**
+     * <code>required .serialize.PBReturnType return_type = 1;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType getReturnType() {
+      return returnType_;
+    }
+
+    // optional uint64 return_id = 2;
+    public static final int RETURN_ID_FIELD_NUMBER = 2;
+    private long returnId_;
+    /**
+     * <code>optional uint64 return_id = 2;</code>
+     */
+    @Override
+	public boolean hasReturnId() {
+      return ((bitField0_ & 0x00000002) == 0x00000002);
+    }
+    /**
+     * <code>optional uint64 return_id = 2;</code>
+     */
+    @Override
+	public long getReturnId() {
+      return returnId_;
+    }
+
+    private void initFields() {
+      returnType_ = org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType.type_voidPointer;
+      returnId_ = 0L;
+    }
+    private byte memoizedIsInitialized = -1;
+    @Override
+	public final boolean isInitialized() {
+      final byte isInitialized = memoizedIsInitialized;
+      if (isInitialized != -1) return isInitialized == 1;
+
+      if (!hasReturnType()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    @Override
+	public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getSerializedSize();
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        output.writeEnum(1, returnType_.getNumber());
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        output.writeUInt64(2, returnId_);
+      }
+      getUnknownFields().writeTo(output);
+    }
+
+    private int memoizedSerializedSize = -1;
+    @Override
+	public int getSerializedSize() {
+      int size = memoizedSerializedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(1, returnType_.getNumber());
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt64Size(2, returnId_);
+      }
+      size += getUnknownFields().getSerializedSize();
+      memoizedSerializedSize = size;
+      return size;
+    }
+
+    private static final long serialVersionUID = 0L;
+    @java.lang.Override
+    protected java.lang.Object writeReplace()
+        throws java.io.ObjectStreamException {
+      return super.writeReplace();
+    }
+
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue parseFrom(
+        com.google.protobuf.ByteString data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue parseFrom(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+
+    public static Builder newBuilder() { return Builder.create(); }
+    @Override
+	public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue prototype) {
+      return newBuilder().mergeFrom(prototype);
+    }
+    @Override
+	public Builder toBuilder() { return newBuilder(this); }
+
+    @java.lang.Override
+    protected Builder newBuilderForType(
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+      final Builder builder = new Builder(parent);
+      return builder;
+    }
+    /**
+     * Protobuf type {@code serialize.PBReturnValue}
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessage.Builder<Builder>
+       implements org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValueOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBReturnValue_descriptor;
+      }
+
+      @Override
+	protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBReturnValue_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.Builder.class);
+      }
+
+      // Construct using org.momut.ooas.argos.codegen.serialize.gen.RecordedAstTraversal.PBReturnValue.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+        }
+      }
+      private static Builder create() {
+        return new Builder();
+      }
+
+      @Override
+	public Builder clear() {
+        super.clear();
+        returnType_ = org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType.type_voidPointer;
+        bitField0_ = (bitField0_ & ~0x00000001);
+        returnId_ = 0L;
+        bitField0_ = (bitField0_ & ~0x00000002);
+        return this;
+      }
+
+      @Override
+	public Builder clone() {
+        return create().mergeFrom(buildPartial());
+      }
+
+      @Override
+	public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBReturnValue_descriptor;
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue getDefaultInstanceForType() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.getDefaultInstance();
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue build() {
+        final org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue buildPartial() {
+        final org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue result = new org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue(this);
+        final int from_bitField0_ = bitField0_;
+        int to_bitField0_ = 0;
+        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+          to_bitField0_ |= 0x00000001;
+        }
+        result.returnType_ = returnType_;
+        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+          to_bitField0_ |= 0x00000002;
+        }
+        result.returnId_ = returnId_;
+        result.bitField0_ = to_bitField0_;
+        onBuilt();
+        return result;
+      }
+
+      @Override
+	public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue) {
+          return mergeFrom((org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue other) {
+        if (other == org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.getDefaultInstance()) return this;
+        if (other.hasReturnType()) {
+          setReturnType(other.getReturnType());
+        }
+        if (other.hasReturnId()) {
+          setReturnId(other.getReturnId());
+        }
+        this.mergeUnknownFields(other.getUnknownFields());
+        return this;
+      }
+
+      @Override
+	public final boolean isInitialized() {
+        if (!hasReturnType()) {
+
+          return false;
+        }
+        return true;
+      }
+
+      @Override
+	public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (final com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+      private int bitField0_;
+
+      // required .serialize.PBReturnType return_type = 1;
+      private org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType returnType_ = org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType.type_voidPointer;
+      /**
+       * <code>required .serialize.PBReturnType return_type = 1;</code>
+       */
+      @Override
+	public boolean hasReturnType() {
+        return ((bitField0_ & 0x00000001) == 0x00000001);
+      }
+      /**
+       * <code>required .serialize.PBReturnType return_type = 1;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType getReturnType() {
+        return returnType_;
+      }
+      /**
+       * <code>required .serialize.PBReturnType return_type = 1;</code>
+       */
+      public Builder setReturnType(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000001;
+        returnType_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>required .serialize.PBReturnType return_type = 1;</code>
+       */
+      public Builder clearReturnType() {
+        bitField0_ = (bitField0_ & ~0x00000001);
+        returnType_ = org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType.type_voidPointer;
+        onChanged();
+        return this;
+      }
+
+      // optional uint64 return_id = 2;
+      private long returnId_ ;
+      /**
+       * <code>optional uint64 return_id = 2;</code>
+       */
+      @Override
+	public boolean hasReturnId() {
+        return ((bitField0_ & 0x00000002) == 0x00000002);
+      }
+      /**
+       * <code>optional uint64 return_id = 2;</code>
+       */
+      @Override
+	public long getReturnId() {
+        return returnId_;
+      }
+      /**
+       * <code>optional uint64 return_id = 2;</code>
+       */
+      public Builder setReturnId(long value) {
+        bitField0_ |= 0x00000002;
+        returnId_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional uint64 return_id = 2;</code>
+       */
+      public Builder clearReturnId() {
+        bitField0_ = (bitField0_ & ~0x00000002);
+        returnId_ = 0L;
+        onChanged();
+        return this;
+      }
+
+      // @@protoc_insertion_point(builder_scope:serialize.PBReturnValue)
+    }
+
+    static {
+      defaultInstance = new PBReturnValue(true);
+      defaultInstance.initFields();
+    }
+
+    // @@protoc_insertion_point(class_scope:serialize.PBReturnValue)
+  }
+
+  public interface PBFunctionCallOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
+
+    // optional .serialize.PBAdd add = 1;
+    /**
+     * <code>optional .serialize.PBAdd add = 1;</code>
+     */
+    boolean hasAdd();
+    /**
+     * <code>optional .serialize.PBAdd add = 1;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd getAdd();
+
+    // optional .serialize.PBAllocation allocate = 2;
+    /**
+     * <code>optional .serialize.PBAllocation allocate = 2;</code>
+     */
+    boolean hasAllocate();
+    /**
+     * <code>optional .serialize.PBAllocation allocate = 2;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation getAllocate();
+
+    // optional .serialize.PBIdentifiers identifier = 3;
+    /**
+     * <code>optional .serialize.PBIdentifiers identifier = 3;</code>
+     */
+    boolean hasIdentifier();
+    /**
+     * <code>optional .serialize.PBIdentifiers identifier = 3;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers getIdentifier();
+
+    // optional .serialize.PBTypes type = 4;
+    /**
+     * <code>optional .serialize.PBTypes type = 4;</code>
+     */
+    boolean hasType();
+    /**
+     * <code>optional .serialize.PBTypes type = 4;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes getType();
+
+    // optional .serialize.PBStatements statement = 5;
+    /**
+     * <code>optional .serialize.PBStatements statement = 5;</code>
+     */
+    boolean hasStatement();
+    /**
+     * <code>optional .serialize.PBStatements statement = 5;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements getStatement();
+
+    // optional .serialize.PBExpressions expression = 6;
+    /**
+     * <code>optional .serialize.PBExpressions expression = 6;</code>
+     */
+    boolean hasExpression();
+    /**
+     * <code>optional .serialize.PBExpressions expression = 6;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions getExpression();
+
+    // repeated .serialize.PBParameter parameters = 7;
+    /**
+     * <code>repeated .serialize.PBParameter parameters = 7;</code>
+     */
+    java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter>
+        getParametersList();
+    /**
+     * <code>repeated .serialize.PBParameter parameters = 7;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter getParameters(int index);
+    /**
+     * <code>repeated .serialize.PBParameter parameters = 7;</code>
+     */
+    int getParametersCount();
+    /**
+     * <code>repeated .serialize.PBParameter parameters = 7;</code>
+     */
+    java.util.List<? extends org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder>
+        getParametersOrBuilderList();
+    /**
+     * <code>repeated .serialize.PBParameter parameters = 7;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder getParametersOrBuilder(
+        int index);
+
+    // required .serialize.PBReturnValue return_value = 8;
+    /**
+     * <code>required .serialize.PBReturnValue return_value = 8;</code>
+     */
+    boolean hasReturnValue();
+    /**
+     * <code>required .serialize.PBReturnValue return_value = 8;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue getReturnValue();
+    /**
+     * <code>required .serialize.PBReturnValue return_value = 8;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValueOrBuilder getReturnValueOrBuilder();
+  }
+  /**
+   * Protobuf type {@code serialize.PBFunctionCall}
+   */
+  public static final class PBFunctionCall extends
+      com.google.protobuf.GeneratedMessage
+      implements PBFunctionCallOrBuilder {
+    // Use PBFunctionCall.newBuilder() to construct.
+    private PBFunctionCall(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+      super(builder);
+      this.unknownFields = builder.getUnknownFields();
+    }
+    private PBFunctionCall(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+    private static final PBFunctionCall defaultInstance;
+    public static PBFunctionCall getDefaultInstance() {
+      return defaultInstance;
+    }
+
+    @Override
+	public PBFunctionCall getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private PBFunctionCall(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      final com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          final int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              final int rawValue = input.readEnum();
+              final org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd value = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(1, rawValue);
+              } else {
+                bitField0_ |= 0x00000001;
+                add_ = value;
+              }
+              break;
+            }
+            case 16: {
+              final int rawValue = input.readEnum();
+              final org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation value = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(2, rawValue);
+              } else {
+                bitField0_ |= 0x00000002;
+                allocate_ = value;
+              }
+              break;
+            }
+            case 24: {
+              final int rawValue = input.readEnum();
+              final org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers value = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(3, rawValue);
+              } else {
+                bitField0_ |= 0x00000004;
+                identifier_ = value;
+              }
+              break;
+            }
+            case 32: {
+              final int rawValue = input.readEnum();
+              final org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes value = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(4, rawValue);
+              } else {
+                bitField0_ |= 0x00000008;
+                type_ = value;
+              }
+              break;
+            }
+            case 40: {
+              final int rawValue = input.readEnum();
+              final org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements value = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(5, rawValue);
+              } else {
+                bitField0_ |= 0x00000010;
+                statement_ = value;
+              }
+              break;
+            }
+            case 48: {
+              final int rawValue = input.readEnum();
+              final org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions value = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(6, rawValue);
+              } else {
+                bitField0_ |= 0x00000020;
+                expression_ = value;
+              }
+              break;
+            }
+            case 58: {
+              if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
+                parameters_ = new java.util.ArrayList<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter>();
+                mutable_bitField0_ |= 0x00000040;
+              }
+              parameters_.add(input.readMessage(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.PARSER, extensionRegistry));
+              break;
+            }
+            case 66: {
+              org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000040) == 0x00000040)) {
+                subBuilder = returnValue_.toBuilder();
+              }
+              returnValue_ = input.readMessage(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(returnValue_);
+                returnValue_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000040;
+              break;
+            }
+          }
+        }
+      } catch (final com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (final java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
+          parameters_ = java.util.Collections.unmodifiableList(parameters_);
+        }
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBFunctionCall_descriptor;
+    }
+
+    @Override
+	protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBFunctionCall_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<PBFunctionCall> PARSER =
+        new com.google.protobuf.AbstractParser<PBFunctionCall>() {
+      @Override
+	public PBFunctionCall parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new PBFunctionCall(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<PBFunctionCall> getParserForType() {
+      return PARSER;
+    }
+
+    private int bitField0_;
+    // optional .serialize.PBAdd add = 1;
+    public static final int ADD_FIELD_NUMBER = 1;
+    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd add_;
+    /**
+     * <code>optional .serialize.PBAdd add = 1;</code>
+     */
+    @Override
+	public boolean hasAdd() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    /**
+     * <code>optional .serialize.PBAdd add = 1;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd getAdd() {
+      return add_;
+    }
+
+    // optional .serialize.PBAllocation allocate = 2;
+    public static final int ALLOCATE_FIELD_NUMBER = 2;
+    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation allocate_;
+    /**
+     * <code>optional .serialize.PBAllocation allocate = 2;</code>
+     */
+    @Override
+	public boolean hasAllocate() {
+      return ((bitField0_ & 0x00000002) == 0x00000002);
+    }
+    /**
+     * <code>optional .serialize.PBAllocation allocate = 2;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation getAllocate() {
+      return allocate_;
+    }
+
+    // optional .serialize.PBIdentifiers identifier = 3;
+    public static final int IDENTIFIER_FIELD_NUMBER = 3;
+    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers identifier_;
+    /**
+     * <code>optional .serialize.PBIdentifiers identifier = 3;</code>
+     */
+    @Override
+	public boolean hasIdentifier() {
+      return ((bitField0_ & 0x00000004) == 0x00000004);
+    }
+    /**
+     * <code>optional .serialize.PBIdentifiers identifier = 3;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers getIdentifier() {
+      return identifier_;
+    }
+
+    // optional .serialize.PBTypes type = 4;
+    public static final int TYPE_FIELD_NUMBER = 4;
+    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes type_;
+    /**
+     * <code>optional .serialize.PBTypes type = 4;</code>
+     */
+    @Override
+	public boolean hasType() {
+      return ((bitField0_ & 0x00000008) == 0x00000008);
+    }
+    /**
+     * <code>optional .serialize.PBTypes type = 4;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes getType() {
+      return type_;
+    }
+
+    // optional .serialize.PBStatements statement = 5;
+    public static final int STATEMENT_FIELD_NUMBER = 5;
+    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements statement_;
+    /**
+     * <code>optional .serialize.PBStatements statement = 5;</code>
+     */
+    @Override
+	public boolean hasStatement() {
+      return ((bitField0_ & 0x00000010) == 0x00000010);
+    }
+    /**
+     * <code>optional .serialize.PBStatements statement = 5;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements getStatement() {
+      return statement_;
+    }
+
+    // optional .serialize.PBExpressions expression = 6;
+    public static final int EXPRESSION_FIELD_NUMBER = 6;
+    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions expression_;
+    /**
+     * <code>optional .serialize.PBExpressions expression = 6;</code>
+     */
+    @Override
+	public boolean hasExpression() {
+      return ((bitField0_ & 0x00000020) == 0x00000020);
+    }
+    /**
+     * <code>optional .serialize.PBExpressions expression = 6;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions getExpression() {
+      return expression_;
+    }
+
+    // repeated .serialize.PBParameter parameters = 7;
+    public static final int PARAMETERS_FIELD_NUMBER = 7;
+    private java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter> parameters_;
+    /**
+     * <code>repeated .serialize.PBParameter parameters = 7;</code>
+     */
+    @Override
+	public java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter> getParametersList() {
+      return parameters_;
+    }
+    /**
+     * <code>repeated .serialize.PBParameter parameters = 7;</code>
+     */
+    @Override
+	public java.util.List<? extends org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder>
+        getParametersOrBuilderList() {
+      return parameters_;
+    }
+    /**
+     * <code>repeated .serialize.PBParameter parameters = 7;</code>
+     */
+    @Override
+	public int getParametersCount() {
+      return parameters_.size();
+    }
+    /**
+     * <code>repeated .serialize.PBParameter parameters = 7;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter getParameters(int index) {
+      return parameters_.get(index);
+    }
+    /**
+     * <code>repeated .serialize.PBParameter parameters = 7;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder getParametersOrBuilder(
+        int index) {
+      return parameters_.get(index);
+    }
+
+    // required .serialize.PBReturnValue return_value = 8;
+    public static final int RETURN_VALUE_FIELD_NUMBER = 8;
+    private org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue returnValue_;
+    /**
+     * <code>required .serialize.PBReturnValue return_value = 8;</code>
+     */
+    @Override
+	public boolean hasReturnValue() {
+      return ((bitField0_ & 0x00000040) == 0x00000040);
+    }
+    /**
+     * <code>required .serialize.PBReturnValue return_value = 8;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue getReturnValue() {
+      return returnValue_;
+    }
+    /**
+     * <code>required .serialize.PBReturnValue return_value = 8;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValueOrBuilder getReturnValueOrBuilder() {
+      return returnValue_;
+    }
+
+    private void initFields() {
+      add_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd.TIRESIAS_ADD_IDENTIFIERTOLIST;
+      allocate_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation.TIRESIAS_CREATE_IDENTIFIER;
+      identifier_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers.TIRESIAS_INIT_ENUMIDENTIFIER;
+      type_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes.TIRESIAS_INIT_INTTYPE;
+      statement_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements.TIRESIAS_INIT_SKIP;
+      expression_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions.TIRESIAS_INIT_TYPEEXPRESSION;
+      parameters_ = java.util.Collections.emptyList();
+      returnValue_ = org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.getDefaultInstance();
+    }
+    private byte memoizedIsInitialized = -1;
+    @Override
+	public final boolean isInitialized() {
+      final byte isInitialized = memoizedIsInitialized;
+      if (isInitialized != -1) return isInitialized == 1;
+
+      if (!hasReturnValue()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      if (!getReturnValue().isInitialized()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    @Override
+	public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getSerializedSize();
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        output.writeEnum(1, add_.getNumber());
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        output.writeEnum(2, allocate_.getNumber());
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        output.writeEnum(3, identifier_.getNumber());
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        output.writeEnum(4, type_.getNumber());
+      }
+      if (((bitField0_ & 0x00000010) == 0x00000010)) {
+        output.writeEnum(5, statement_.getNumber());
+      }
+      if (((bitField0_ & 0x00000020) == 0x00000020)) {
+        output.writeEnum(6, expression_.getNumber());
+      }
+      for (int i = 0; i < parameters_.size(); i++) {
+        output.writeMessage(7, parameters_.get(i));
+      }
+      if (((bitField0_ & 0x00000040) == 0x00000040)) {
+        output.writeMessage(8, returnValue_);
+      }
+      getUnknownFields().writeTo(output);
+    }
+
+    private int memoizedSerializedSize = -1;
+    @Override
+	public int getSerializedSize() {
+      int size = memoizedSerializedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(1, add_.getNumber());
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(2, allocate_.getNumber());
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(3, identifier_.getNumber());
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(4, type_.getNumber());
+      }
+      if (((bitField0_ & 0x00000010) == 0x00000010)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(5, statement_.getNumber());
+      }
+      if (((bitField0_ & 0x00000020) == 0x00000020)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(6, expression_.getNumber());
+      }
+      for (int i = 0; i < parameters_.size(); i++) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(7, parameters_.get(i));
+      }
+      if (((bitField0_ & 0x00000040) == 0x00000040)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(8, returnValue_);
+      }
+      size += getUnknownFields().getSerializedSize();
+      memoizedSerializedSize = size;
+      return size;
+    }
+
+    private static final long serialVersionUID = 0L;
+    @java.lang.Override
+    protected java.lang.Object writeReplace()
+        throws java.io.ObjectStreamException {
+      return super.writeReplace();
+    }
+
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall parseFrom(
+        com.google.protobuf.ByteString data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall parseFrom(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+
+    public static Builder newBuilder() { return Builder.create(); }
+    @Override
+	public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall prototype) {
+      return newBuilder().mergeFrom(prototype);
+    }
+    @Override
+	public Builder toBuilder() { return newBuilder(this); }
+
+    @java.lang.Override
+    protected Builder newBuilderForType(
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+      final Builder builder = new Builder(parent);
+      return builder;
+    }
+    /**
+     * Protobuf type {@code serialize.PBFunctionCall}
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessage.Builder<Builder>
+       implements org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBFunctionCall_descriptor;
+      }
+
+      @Override
+	protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBFunctionCall_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder.class);
+      }
+
+      // Construct using org.momut.ooas.argos.codegen.serialize.gen.RecordedAstTraversal.PBFunctionCall.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+          getParametersFieldBuilder();
+          getReturnValueFieldBuilder();
+        }
+      }
+      private static Builder create() {
+        return new Builder();
+      }
+
+      @Override
+	public Builder clear() {
+        super.clear();
+        add_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd.TIRESIAS_ADD_IDENTIFIERTOLIST;
+        bitField0_ = (bitField0_ & ~0x00000001);
+        allocate_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation.TIRESIAS_CREATE_IDENTIFIER;
+        bitField0_ = (bitField0_ & ~0x00000002);
+        identifier_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers.TIRESIAS_INIT_ENUMIDENTIFIER;
+        bitField0_ = (bitField0_ & ~0x00000004);
+        type_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes.TIRESIAS_INIT_INTTYPE;
+        bitField0_ = (bitField0_ & ~0x00000008);
+        statement_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements.TIRESIAS_INIT_SKIP;
+        bitField0_ = (bitField0_ & ~0x00000010);
+        expression_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions.TIRESIAS_INIT_TYPEEXPRESSION;
+        bitField0_ = (bitField0_ & ~0x00000020);
+        if (parametersBuilder_ == null) {
+          parameters_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000040);
+        } else {
+          parametersBuilder_.clear();
+        }
+        if (returnValueBuilder_ == null) {
+          returnValue_ = org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.getDefaultInstance();
+        } else {
+          returnValueBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000080);
+        return this;
+      }
+
+      @Override
+	public Builder clone() {
+        return create().mergeFrom(buildPartial());
+      }
+
+      @Override
+	public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBFunctionCall_descriptor;
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall getDefaultInstanceForType() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.getDefaultInstance();
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall build() {
+        final org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall buildPartial() {
+        final org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall result = new org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall(this);
+        final int from_bitField0_ = bitField0_;
+        int to_bitField0_ = 0;
+        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+          to_bitField0_ |= 0x00000001;
+        }
+        result.add_ = add_;
+        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+          to_bitField0_ |= 0x00000002;
+        }
+        result.allocate_ = allocate_;
+        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+          to_bitField0_ |= 0x00000004;
+        }
+        result.identifier_ = identifier_;
+        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
+          to_bitField0_ |= 0x00000008;
+        }
+        result.type_ = type_;
+        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
+          to_bitField0_ |= 0x00000010;
+        }
+        result.statement_ = statement_;
+        if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
+          to_bitField0_ |= 0x00000020;
+        }
+        result.expression_ = expression_;
+        if (parametersBuilder_ == null) {
+          if (((bitField0_ & 0x00000040) == 0x00000040)) {
+            parameters_ = java.util.Collections.unmodifiableList(parameters_);
+            bitField0_ = (bitField0_ & ~0x00000040);
+          }
+          result.parameters_ = parameters_;
+        } else {
+          result.parameters_ = parametersBuilder_.build();
+        }
+        if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
+          to_bitField0_ |= 0x00000040;
+        }
+        if (returnValueBuilder_ == null) {
+          result.returnValue_ = returnValue_;
+        } else {
+          result.returnValue_ = returnValueBuilder_.build();
+        }
+        result.bitField0_ = to_bitField0_;
+        onBuilt();
+        return result;
+      }
+
+      @Override
+	public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall) {
+          return mergeFrom((org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall other) {
+        if (other == org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.getDefaultInstance()) return this;
+        if (other.hasAdd()) {
+          setAdd(other.getAdd());
+        }
+        if (other.hasAllocate()) {
+          setAllocate(other.getAllocate());
+        }
+        if (other.hasIdentifier()) {
+          setIdentifier(other.getIdentifier());
+        }
+        if (other.hasType()) {
+          setType(other.getType());
+        }
+        if (other.hasStatement()) {
+          setStatement(other.getStatement());
+        }
+        if (other.hasExpression()) {
+          setExpression(other.getExpression());
+        }
+        if (parametersBuilder_ == null) {
+          if (!other.parameters_.isEmpty()) {
+            if (parameters_.isEmpty()) {
+              parameters_ = other.parameters_;
+              bitField0_ = (bitField0_ & ~0x00000040);
+            } else {
+              ensureParametersIsMutable();
+              parameters_.addAll(other.parameters_);
+            }
+            onChanged();
+          }
+        } else {
+          if (!other.parameters_.isEmpty()) {
+            if (parametersBuilder_.isEmpty()) {
+              parametersBuilder_.dispose();
+              parametersBuilder_ = null;
+              parameters_ = other.parameters_;
+              bitField0_ = (bitField0_ & ~0x00000040);
+              parametersBuilder_ =
+                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+                   getParametersFieldBuilder() : null;
+            } else {
+              parametersBuilder_.addAllMessages(other.parameters_);
+            }
+          }
+        }
+        if (other.hasReturnValue()) {
+          mergeReturnValue(other.getReturnValue());
+        }
+        this.mergeUnknownFields(other.getUnknownFields());
+        return this;
+      }
+
+      @Override
+	public final boolean isInitialized() {
+        if (!hasReturnValue()) {
+
+          return false;
+        }
+        if (!getReturnValue().isInitialized()) {
+
+          return false;
+        }
+        return true;
+      }
+
+      @Override
+	public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (final com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+      private int bitField0_;
+
+      // optional .serialize.PBAdd add = 1;
+      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd add_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd.TIRESIAS_ADD_IDENTIFIERTOLIST;
+      /**
+       * <code>optional .serialize.PBAdd add = 1;</code>
+       */
+      @Override
+	public boolean hasAdd() {
+        return ((bitField0_ & 0x00000001) == 0x00000001);
+      }
+      /**
+       * <code>optional .serialize.PBAdd add = 1;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd getAdd() {
+        return add_;
+      }
+      /**
+       * <code>optional .serialize.PBAdd add = 1;</code>
+       */
+      public Builder setAdd(org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000001;
+        add_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional .serialize.PBAdd add = 1;</code>
+       */
+      public Builder clearAdd() {
+        bitField0_ = (bitField0_ & ~0x00000001);
+        add_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd.TIRESIAS_ADD_IDENTIFIERTOLIST;
+        onChanged();
+        return this;
+      }
+
+      // optional .serialize.PBAllocation allocate = 2;
+      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation allocate_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation.TIRESIAS_CREATE_IDENTIFIER;
+      /**
+       * <code>optional .serialize.PBAllocation allocate = 2;</code>
+       */
+      @Override
+	public boolean hasAllocate() {
+        return ((bitField0_ & 0x00000002) == 0x00000002);
+      }
+      /**
+       * <code>optional .serialize.PBAllocation allocate = 2;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation getAllocate() {
+        return allocate_;
+      }
+      /**
+       * <code>optional .serialize.PBAllocation allocate = 2;</code>
+       */
+      public Builder setAllocate(org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000002;
+        allocate_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional .serialize.PBAllocation allocate = 2;</code>
+       */
+      public Builder clearAllocate() {
+        bitField0_ = (bitField0_ & ~0x00000002);
+        allocate_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation.TIRESIAS_CREATE_IDENTIFIER;
+        onChanged();
+        return this;
+      }
+
+      // optional .serialize.PBIdentifiers identifier = 3;
+      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers identifier_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers.TIRESIAS_INIT_ENUMIDENTIFIER;
+      /**
+       * <code>optional .serialize.PBIdentifiers identifier = 3;</code>
+       */
+      @Override
+	public boolean hasIdentifier() {
+        return ((bitField0_ & 0x00000004) == 0x00000004);
+      }
+      /**
+       * <code>optional .serialize.PBIdentifiers identifier = 3;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers getIdentifier() {
+        return identifier_;
+      }
+      /**
+       * <code>optional .serialize.PBIdentifiers identifier = 3;</code>
+       */
+      public Builder setIdentifier(org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000004;
+        identifier_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional .serialize.PBIdentifiers identifier = 3;</code>
+       */
+      public Builder clearIdentifier() {
+        bitField0_ = (bitField0_ & ~0x00000004);
+        identifier_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers.TIRESIAS_INIT_ENUMIDENTIFIER;
+        onChanged();
+        return this;
+      }
+
+      // optional .serialize.PBTypes type = 4;
+      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes type_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes.TIRESIAS_INIT_INTTYPE;
+      /**
+       * <code>optional .serialize.PBTypes type = 4;</code>
+       */
+      @Override
+	public boolean hasType() {
+        return ((bitField0_ & 0x00000008) == 0x00000008);
+      }
+      /**
+       * <code>optional .serialize.PBTypes type = 4;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes getType() {
+        return type_;
+      }
+      /**
+       * <code>optional .serialize.PBTypes type = 4;</code>
+       */
+      public Builder setType(org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000008;
+        type_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional .serialize.PBTypes type = 4;</code>
+       */
+      public Builder clearType() {
+        bitField0_ = (bitField0_ & ~0x00000008);
+        type_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes.TIRESIAS_INIT_INTTYPE;
+        onChanged();
+        return this;
+      }
+
+      // optional .serialize.PBStatements statement = 5;
+      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements statement_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements.TIRESIAS_INIT_SKIP;
+      /**
+       * <code>optional .serialize.PBStatements statement = 5;</code>
+       */
+      @Override
+	public boolean hasStatement() {
+        return ((bitField0_ & 0x00000010) == 0x00000010);
+      }
+      /**
+       * <code>optional .serialize.PBStatements statement = 5;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements getStatement() {
+        return statement_;
+      }
+      /**
+       * <code>optional .serialize.PBStatements statement = 5;</code>
+       */
+      public Builder setStatement(org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000010;
+        statement_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional .serialize.PBStatements statement = 5;</code>
+       */
+      public Builder clearStatement() {
+        bitField0_ = (bitField0_ & ~0x00000010);
+        statement_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements.TIRESIAS_INIT_SKIP;
+        onChanged();
+        return this;
+      }
+
+      // optional .serialize.PBExpressions expression = 6;
+      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions expression_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions.TIRESIAS_INIT_TYPEEXPRESSION;
+      /**
+       * <code>optional .serialize.PBExpressions expression = 6;</code>
+       */
+      @Override
+	public boolean hasExpression() {
+        return ((bitField0_ & 0x00000020) == 0x00000020);
+      }
+      /**
+       * <code>optional .serialize.PBExpressions expression = 6;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions getExpression() {
+        return expression_;
+      }
+      /**
+       * <code>optional .serialize.PBExpressions expression = 6;</code>
+       */
+      public Builder setExpression(org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000020;
+        expression_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional .serialize.PBExpressions expression = 6;</code>
+       */
+      public Builder clearExpression() {
+        bitField0_ = (bitField0_ & ~0x00000020);
+        expression_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions.TIRESIAS_INIT_TYPEEXPRESSION;
+        onChanged();
+        return this;
+      }
+
+      // repeated .serialize.PBParameter parameters = 7;
+      private java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter> parameters_ =
+        java.util.Collections.emptyList();
+      private void ensureParametersIsMutable() {
+        if (!((bitField0_ & 0x00000040) == 0x00000040)) {
+          parameters_ = new java.util.ArrayList<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter>(parameters_);
+          bitField0_ |= 0x00000040;
+         }
+      }
+
+      private com.google.protobuf.RepeatedFieldBuilder<
+          org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder> parametersBuilder_;
+
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      @Override
+	public java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter> getParametersList() {
+        if (parametersBuilder_ == null) {
+          return java.util.Collections.unmodifiableList(parameters_);
+        } else {
+          return parametersBuilder_.getMessageList();
+        }
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      @Override
+	public int getParametersCount() {
+        if (parametersBuilder_ == null) {
+          return parameters_.size();
+        } else {
+          return parametersBuilder_.getCount();
+        }
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter getParameters(int index) {
+        if (parametersBuilder_ == null) {
+          return parameters_.get(index);
+        } else {
+          return parametersBuilder_.getMessage(index);
+        }
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public Builder setParameters(
+          int index, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter value) {
+        if (parametersBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureParametersIsMutable();
+          parameters_.set(index, value);
+          onChanged();
+        } else {
+          parametersBuilder_.setMessage(index, value);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public Builder setParameters(
+          int index, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder builderForValue) {
+        if (parametersBuilder_ == null) {
+          ensureParametersIsMutable();
+          parameters_.set(index, builderForValue.build());
+          onChanged();
+        } else {
+          parametersBuilder_.setMessage(index, builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public Builder addParameters(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter value) {
+        if (parametersBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureParametersIsMutable();
+          parameters_.add(value);
+          onChanged();
+        } else {
+          parametersBuilder_.addMessage(value);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public Builder addParameters(
+          int index, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter value) {
+        if (parametersBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureParametersIsMutable();
+          parameters_.add(index, value);
+          onChanged();
+        } else {
+          parametersBuilder_.addMessage(index, value);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public Builder addParameters(
+          org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder builderForValue) {
+        if (parametersBuilder_ == null) {
+          ensureParametersIsMutable();
+          parameters_.add(builderForValue.build());
+          onChanged();
+        } else {
+          parametersBuilder_.addMessage(builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public Builder addParameters(
+          int index, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder builderForValue) {
+        if (parametersBuilder_ == null) {
+          ensureParametersIsMutable();
+          parameters_.add(index, builderForValue.build());
+          onChanged();
+        } else {
+          parametersBuilder_.addMessage(index, builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public Builder addAllParameters(
+          java.lang.Iterable<? extends org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter> values) {
+        if (parametersBuilder_ == null) {
+          ensureParametersIsMutable();
+          super.addAll(values, parameters_);
+          onChanged();
+        } else {
+          parametersBuilder_.addAllMessages(values);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public Builder clearParameters() {
+        if (parametersBuilder_ == null) {
+          parameters_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000040);
+          onChanged();
+        } else {
+          parametersBuilder_.clear();
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public Builder removeParameters(int index) {
+        if (parametersBuilder_ == null) {
+          ensureParametersIsMutable();
+          parameters_.remove(index);
+          onChanged();
+        } else {
+          parametersBuilder_.remove(index);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder getParametersBuilder(
+          int index) {
+        return getParametersFieldBuilder().getBuilder(index);
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder getParametersOrBuilder(
+          int index) {
+        if (parametersBuilder_ == null) {
+          return parameters_.get(index);  } else {
+          return parametersBuilder_.getMessageOrBuilder(index);
+        }
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      @Override
+	public java.util.List<? extends org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder>
+           getParametersOrBuilderList() {
+        if (parametersBuilder_ != null) {
+          return parametersBuilder_.getMessageOrBuilderList();
+        } else {
+          return java.util.Collections.unmodifiableList(parameters_);
+        }
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder addParametersBuilder() {
+        return getParametersFieldBuilder().addBuilder(
+            org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.getDefaultInstance());
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder addParametersBuilder(
+          int index) {
+        return getParametersFieldBuilder().addBuilder(
+            index, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.getDefaultInstance());
+      }
+      /**
+       * <code>repeated .serialize.PBParameter parameters = 7;</code>
+       */
+      public java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder>
+           getParametersBuilderList() {
+        return getParametersFieldBuilder().getBuilderList();
+      }
+      private com.google.protobuf.RepeatedFieldBuilder<
+          org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder>
+          getParametersFieldBuilder() {
+        if (parametersBuilder_ == null) {
+          parametersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+              org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder>(
+                  parameters_,
+                  ((bitField0_ & 0x00000040) == 0x00000040),
+                  getParentForChildren(),
+                  isClean());
+          parameters_ = null;
+        }
+        return parametersBuilder_;
+      }
+
+      // required .serialize.PBReturnValue return_value = 8;
+      private org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue returnValue_ = org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.getDefaultInstance();
+      private com.google.protobuf.SingleFieldBuilder<
+          org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.Builder, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValueOrBuilder> returnValueBuilder_;
+      /**
+       * <code>required .serialize.PBReturnValue return_value = 8;</code>
+       */
+      @Override
+	public boolean hasReturnValue() {
+        return ((bitField0_ & 0x00000080) == 0x00000080);
+      }
+      /**
+       * <code>required .serialize.PBReturnValue return_value = 8;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue getReturnValue() {
+        if (returnValueBuilder_ == null) {
+          return returnValue_;
+        } else {
+          return returnValueBuilder_.getMessage();
+        }
+      }
+      /**
+       * <code>required .serialize.PBReturnValue return_value = 8;</code>
+       */
+      public Builder setReturnValue(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue value) {
+        if (returnValueBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          returnValue_ = value;
+          onChanged();
+        } else {
+          returnValueBuilder_.setMessage(value);
+        }
+        bitField0_ |= 0x00000080;
+        return this;
+      }
+      /**
+       * <code>required .serialize.PBReturnValue return_value = 8;</code>
+       */
+      public Builder setReturnValue(
+          org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.Builder builderForValue) {
+        if (returnValueBuilder_ == null) {
+          returnValue_ = builderForValue.build();
+          onChanged();
+        } else {
+          returnValueBuilder_.setMessage(builderForValue.build());
+        }
+        bitField0_ |= 0x00000080;
+        return this;
+      }
+      /**
+       * <code>required .serialize.PBReturnValue return_value = 8;</code>
+       */
+      public Builder mergeReturnValue(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue value) {
+        if (returnValueBuilder_ == null) {
+          if (((bitField0_ & 0x00000080) == 0x00000080) &&
+              returnValue_ != org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.getDefaultInstance()) {
+            returnValue_ =
+              org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.newBuilder(returnValue_).mergeFrom(value).buildPartial();
+          } else {
+            returnValue_ = value;
+          }
+          onChanged();
+        } else {
+          returnValueBuilder_.mergeFrom(value);
+        }
+        bitField0_ |= 0x00000080;
+        return this;
+      }
+      /**
+       * <code>required .serialize.PBReturnValue return_value = 8;</code>
+       */
+      public Builder clearReturnValue() {
+        if (returnValueBuilder_ == null) {
+          returnValue_ = org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.getDefaultInstance();
+          onChanged();
+        } else {
+          returnValueBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000080);
+        return this;
+      }
+      /**
+       * <code>required .serialize.PBReturnValue return_value = 8;</code>
+       */
+      public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.Builder getReturnValueBuilder() {
+        bitField0_ |= 0x00000080;
+        onChanged();
+        return getReturnValueFieldBuilder().getBuilder();
+      }
+      /**
+       * <code>required .serialize.PBReturnValue return_value = 8;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValueOrBuilder getReturnValueOrBuilder() {
+        if (returnValueBuilder_ != null) {
+          return returnValueBuilder_.getMessageOrBuilder();
+        } else {
+          return returnValue_;
+        }
+      }
+      /**
+       * <code>required .serialize.PBReturnValue return_value = 8;</code>
+       */
+      private com.google.protobuf.SingleFieldBuilder<
+          org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.Builder, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValueOrBuilder>
+          getReturnValueFieldBuilder() {
+        if (returnValueBuilder_ == null) {
+          returnValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+              org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.Builder, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValueOrBuilder>(
+                  returnValue_,
+                  getParentForChildren(),
+                  isClean());
+          returnValue_ = null;
+        }
+        return returnValueBuilder_;
+      }
+
+      // @@protoc_insertion_point(builder_scope:serialize.PBFunctionCall)
+    }
+
+    static {
+      defaultInstance = new PBFunctionCall(true);
+      defaultInstance.initFields();
+    }
+
+    // @@protoc_insertion_point(class_scope:serialize.PBFunctionCall)
+  }
+
+  public interface PBAstTraversalOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
+
+    // repeated .serialize.PBFunctionCall calls = 1;
+    /**
+     * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+     */
+    java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall>
+        getCallsList();
+    /**
+     * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall getCalls(int index);
+    /**
+     * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+     */
+    int getCallsCount();
+    /**
+     * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+     */
+    java.util.List<? extends org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder>
+        getCallsOrBuilderList();
+    /**
+     * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+     */
+    org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder getCallsOrBuilder(
+        int index);
+
+    // required uint64 main_module = 2;
+    /**
+     * <code>required uint64 main_module = 2;</code>
+     */
+    boolean hasMainModule();
+    /**
+     * <code>required uint64 main_module = 2;</code>
+     */
+    long getMainModule();
+  }
+  /**
+   * Protobuf type {@code serialize.PBAstTraversal}
+   */
+  public static final class PBAstTraversal extends
+      com.google.protobuf.GeneratedMessage
+      implements PBAstTraversalOrBuilder {
+    // Use PBAstTraversal.newBuilder() to construct.
+    private PBAstTraversal(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+      super(builder);
+      this.unknownFields = builder.getUnknownFields();
+    }
+    private PBAstTraversal(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+    private static final PBAstTraversal defaultInstance;
+    public static PBAstTraversal getDefaultInstance() {
+      return defaultInstance;
+    }
+
+    @Override
+	public PBAstTraversal getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private PBAstTraversal(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      final com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          final int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 10: {
+              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+                calls_ = new java.util.ArrayList<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall>();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              calls_.add(input.readMessage(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.PARSER, extensionRegistry));
+              break;
+            }
+            case 16: {
+              bitField0_ |= 0x00000001;
+              mainModule_ = input.readUInt64();
+              break;
+            }
+          }
+        }
+      } catch (final com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (final java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+          calls_ = java.util.Collections.unmodifiableList(calls_);
+        }
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBAstTraversal_descriptor;
+    }
+
+    @Override
+	protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBAstTraversal_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<PBAstTraversal> PARSER =
+        new com.google.protobuf.AbstractParser<PBAstTraversal>() {
+      @Override
+	public PBAstTraversal parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new PBAstTraversal(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<PBAstTraversal> getParserForType() {
+      return PARSER;
+    }
+
+    private int bitField0_;
+    // repeated .serialize.PBFunctionCall calls = 1;
+    public static final int CALLS_FIELD_NUMBER = 1;
+    private java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall> calls_;
+    /**
+     * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+     */
+    @Override
+	public java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall> getCallsList() {
+      return calls_;
+    }
+    /**
+     * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+     */
+    @Override
+	public java.util.List<? extends org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder>
+        getCallsOrBuilderList() {
+      return calls_;
+    }
+    /**
+     * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+     */
+    @Override
+	public int getCallsCount() {
+      return calls_.size();
+    }
+    /**
+     * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall getCalls(int index) {
+      return calls_.get(index);
+    }
+    /**
+     * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+     */
+    @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder getCallsOrBuilder(
+        int index) {
+      return calls_.get(index);
+    }
+
+    // required uint64 main_module = 2;
+    public static final int MAIN_MODULE_FIELD_NUMBER = 2;
+    private long mainModule_;
+    /**
+     * <code>required uint64 main_module = 2;</code>
+     */
+    @Override
+	public boolean hasMainModule() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    /**
+     * <code>required uint64 main_module = 2;</code>
+     */
+    @Override
+	public long getMainModule() {
+      return mainModule_;
+    }
+
+    private void initFields() {
+      calls_ = java.util.Collections.emptyList();
+      mainModule_ = 0L;
+    }
+    private byte memoizedIsInitialized = -1;
+    @Override
+	public final boolean isInitialized() {
+      final byte isInitialized = memoizedIsInitialized;
+      if (isInitialized != -1) return isInitialized == 1;
+
+      if (!hasMainModule()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      for (int i = 0; i < getCallsCount(); i++) {
+        if (!getCalls(i).isInitialized()) {
+          memoizedIsInitialized = 0;
+          return false;
+        }
+      }
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    @Override
+	public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getSerializedSize();
+      for (int i = 0; i < calls_.size(); i++) {
+        output.writeMessage(1, calls_.get(i));
+      }
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        output.writeUInt64(2, mainModule_);
+      }
+      getUnknownFields().writeTo(output);
+    }
+
+    private int memoizedSerializedSize = -1;
+    @Override
+	public int getSerializedSize() {
+      int size = memoizedSerializedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      for (int i = 0; i < calls_.size(); i++) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(1, calls_.get(i));
+      }
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt64Size(2, mainModule_);
+      }
+      size += getUnknownFields().getSerializedSize();
+      memoizedSerializedSize = size;
+      return size;
+    }
+
+    private static final long serialVersionUID = 0L;
+    @java.lang.Override
+    protected java.lang.Object writeReplace()
+        throws java.io.ObjectStreamException {
+      return super.writeReplace();
+    }
+
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal parseFrom(
+        com.google.protobuf.ByteString data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal parseFrom(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+
+    public static Builder newBuilder() { return Builder.create(); }
+    @Override
+	public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal prototype) {
+      return newBuilder().mergeFrom(prototype);
+    }
+    @Override
+	public Builder toBuilder() { return newBuilder(this); }
+
+    @java.lang.Override
+    protected Builder newBuilderForType(
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+      final Builder builder = new Builder(parent);
+      return builder;
+    }
+    /**
+     * Protobuf type {@code serialize.PBAstTraversal}
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessage.Builder<Builder>
+       implements org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversalOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBAstTraversal_descriptor;
+      }
+
+      @Override
+	protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBAstTraversal_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal.Builder.class);
+      }
+
+      // Construct using org.momut.ooas.argos.codegen.serialize.gen.RecordedAstTraversal.PBAstTraversal.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+          getCallsFieldBuilder();
+        }
+      }
+      private static Builder create() {
+        return new Builder();
+      }
+
+      @Override
+	public Builder clear() {
+        super.clear();
+        if (callsBuilder_ == null) {
+          calls_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000001);
+        } else {
+          callsBuilder_.clear();
+        }
+        mainModule_ = 0L;
+        bitField0_ = (bitField0_ & ~0x00000002);
+        return this;
+      }
+
+      @Override
+	public Builder clone() {
+        return create().mergeFrom(buildPartial());
+      }
+
+      @Override
+	public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBAstTraversal_descriptor;
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal getDefaultInstanceForType() {
+        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal.getDefaultInstance();
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal build() {
+        final org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal buildPartial() {
+        final org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal result = new org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal(this);
+        final int from_bitField0_ = bitField0_;
+        int to_bitField0_ = 0;
+        if (callsBuilder_ == null) {
+          if (((bitField0_ & 0x00000001) == 0x00000001)) {
+            calls_ = java.util.Collections.unmodifiableList(calls_);
+            bitField0_ = (bitField0_ & ~0x00000001);
+          }
+          result.calls_ = calls_;
+        } else {
+          result.calls_ = callsBuilder_.build();
+        }
+        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+          to_bitField0_ |= 0x00000001;
+        }
+        result.mainModule_ = mainModule_;
+        result.bitField0_ = to_bitField0_;
+        onBuilt();
+        return result;
+      }
+
+      @Override
+	public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal) {
+          return mergeFrom((org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal other) {
+        if (other == org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal.getDefaultInstance()) return this;
+        if (callsBuilder_ == null) {
+          if (!other.calls_.isEmpty()) {
+            if (calls_.isEmpty()) {
+              calls_ = other.calls_;
+              bitField0_ = (bitField0_ & ~0x00000001);
+            } else {
+              ensureCallsIsMutable();
+              calls_.addAll(other.calls_);
+            }
+            onChanged();
+          }
+        } else {
+          if (!other.calls_.isEmpty()) {
+            if (callsBuilder_.isEmpty()) {
+              callsBuilder_.dispose();
+              callsBuilder_ = null;
+              calls_ = other.calls_;
+              bitField0_ = (bitField0_ & ~0x00000001);
+              callsBuilder_ =
+                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+                   getCallsFieldBuilder() : null;
+            } else {
+              callsBuilder_.addAllMessages(other.calls_);
+            }
+          }
+        }
+        if (other.hasMainModule()) {
+          setMainModule(other.getMainModule());
+        }
+        this.mergeUnknownFields(other.getUnknownFields());
+        return this;
+      }
+
+      @Override
+	public final boolean isInitialized() {
+        if (!hasMainModule()) {
+
+          return false;
+        }
+        for (int i = 0; i < getCallsCount(); i++) {
+          if (!getCalls(i).isInitialized()) {
+
+            return false;
+          }
+        }
+        return true;
+      }
+
+      @Override
+	public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (final com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+      private int bitField0_;
+
+      // repeated .serialize.PBFunctionCall calls = 1;
+      private java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall> calls_ =
+        java.util.Collections.emptyList();
+      private void ensureCallsIsMutable() {
+        if (!((bitField0_ & 0x00000001) == 0x00000001)) {
+          calls_ = new java.util.ArrayList<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall>(calls_);
+          bitField0_ |= 0x00000001;
+         }
+      }
+
+      private com.google.protobuf.RepeatedFieldBuilder<
+          org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder> callsBuilder_;
+
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      @Override
+	public java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall> getCallsList() {
+        if (callsBuilder_ == null) {
+          return java.util.Collections.unmodifiableList(calls_);
+        } else {
+          return callsBuilder_.getMessageList();
+        }
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      @Override
+	public int getCallsCount() {
+        if (callsBuilder_ == null) {
+          return calls_.size();
+        } else {
+          return callsBuilder_.getCount();
+        }
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall getCalls(int index) {
+        if (callsBuilder_ == null) {
+          return calls_.get(index);
+        } else {
+          return callsBuilder_.getMessage(index);
+        }
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public Builder setCalls(
+          int index, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall value) {
+        if (callsBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureCallsIsMutable();
+          calls_.set(index, value);
+          onChanged();
+        } else {
+          callsBuilder_.setMessage(index, value);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public Builder setCalls(
+          int index, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder builderForValue) {
+        if (callsBuilder_ == null) {
+          ensureCallsIsMutable();
+          calls_.set(index, builderForValue.build());
+          onChanged();
+        } else {
+          callsBuilder_.setMessage(index, builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public Builder addCalls(org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall value) {
+        if (callsBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureCallsIsMutable();
+          calls_.add(value);
+          onChanged();
+        } else {
+          callsBuilder_.addMessage(value);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public Builder addCalls(
+          int index, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall value) {
+        if (callsBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureCallsIsMutable();
+          calls_.add(index, value);
+          onChanged();
+        } else {
+          callsBuilder_.addMessage(index, value);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public Builder addCalls(
+          org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder builderForValue) {
+        if (callsBuilder_ == null) {
+          ensureCallsIsMutable();
+          calls_.add(builderForValue.build());
+          onChanged();
+        } else {
+          callsBuilder_.addMessage(builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public Builder addCalls(
+          int index, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder builderForValue) {
+        if (callsBuilder_ == null) {
+          ensureCallsIsMutable();
+          calls_.add(index, builderForValue.build());
+          onChanged();
+        } else {
+          callsBuilder_.addMessage(index, builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public Builder addAllCalls(
+          java.lang.Iterable<? extends org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall> values) {
+        if (callsBuilder_ == null) {
+          ensureCallsIsMutable();
+          super.addAll(values, calls_);
+          onChanged();
+        } else {
+          callsBuilder_.addAllMessages(values);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public Builder clearCalls() {
+        if (callsBuilder_ == null) {
+          calls_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000001);
+          onChanged();
+        } else {
+          callsBuilder_.clear();
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public Builder removeCalls(int index) {
+        if (callsBuilder_ == null) {
+          ensureCallsIsMutable();
+          calls_.remove(index);
+          onChanged();
+        } else {
+          callsBuilder_.remove(index);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder getCallsBuilder(
+          int index) {
+        return getCallsFieldBuilder().getBuilder(index);
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      @Override
+	public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder getCallsOrBuilder(
+          int index) {
+        if (callsBuilder_ == null) {
+          return calls_.get(index);  } else {
+          return callsBuilder_.getMessageOrBuilder(index);
+        }
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      @Override
+	public java.util.List<? extends org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder>
+           getCallsOrBuilderList() {
+        if (callsBuilder_ != null) {
+          return callsBuilder_.getMessageOrBuilderList();
+        } else {
+          return java.util.Collections.unmodifiableList(calls_);
+        }
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder addCallsBuilder() {
+        return getCallsFieldBuilder().addBuilder(
+            org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.getDefaultInstance());
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder addCallsBuilder(
+          int index) {
+        return getCallsFieldBuilder().addBuilder(
+            index, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.getDefaultInstance());
+      }
+      /**
+       * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
+       */
+      public java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder>
+           getCallsBuilderList() {
+        return getCallsFieldBuilder().getBuilderList();
+      }
+      private com.google.protobuf.RepeatedFieldBuilder<
+          org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder>
+          getCallsFieldBuilder() {
+        if (callsBuilder_ == null) {
+          callsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+              org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder>(
+                  calls_,
+                  ((bitField0_ & 0x00000001) == 0x00000001),
+                  getParentForChildren(),
+                  isClean());
+          calls_ = null;
+        }
+        return callsBuilder_;
+      }
+
+      // required uint64 main_module = 2;
+      private long mainModule_ ;
+      /**
+       * <code>required uint64 main_module = 2;</code>
+       */
+      @Override
+	public boolean hasMainModule() {
+        return ((bitField0_ & 0x00000002) == 0x00000002);
+      }
+      /**
+       * <code>required uint64 main_module = 2;</code>
+       */
+      @Override
+	public long getMainModule() {
+        return mainModule_;
+      }
+      /**
+       * <code>required uint64 main_module = 2;</code>
+       */
+      public Builder setMainModule(long value) {
+        bitField0_ |= 0x00000002;
+        mainModule_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>required uint64 main_module = 2;</code>
+       */
+      public Builder clearMainModule() {
+        bitField0_ = (bitField0_ & ~0x00000002);
+        mainModule_ = 0L;
+        onChanged();
+        return this;
+      }
+
+      // @@protoc_insertion_point(builder_scope:serialize.PBAstTraversal)
+    }
+
+    static {
+      defaultInstance = new PBAstTraversal(true);
+      defaultInstance.initFields();
+    }
+
+    // @@protoc_insertion_point(class_scope:serialize.PBAstTraversal)
+  }
+
+  private static com.google.protobuf.Descriptors.Descriptor
+    internal_static_serialize_PBParameter_descriptor;
+  private static
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_serialize_PBParameter_fieldAccessorTable;
+  private static com.google.protobuf.Descriptors.Descriptor
+    internal_static_serialize_PBReturnValue_descriptor;
+  private static
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_serialize_PBReturnValue_fieldAccessorTable;
+  private static com.google.protobuf.Descriptors.Descriptor
+    internal_static_serialize_PBFunctionCall_descriptor;
+  private static
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_serialize_PBFunctionCall_fieldAccessorTable;
+  private static com.google.protobuf.Descriptors.Descriptor
+    internal_static_serialize_PBAstTraversal_descriptor;
+  private static
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_serialize_PBAstTraversal_fieldAccessorTable;
+
+  public static com.google.protobuf.Descriptors.FileDescriptor
+      getDescriptor() {
+    return descriptor;
+  }
+  private static com.google.protobuf.Descriptors.FileDescriptor
+      descriptor;
+  static {
+    final java.lang.String[] descriptorData = {
+      "\n\014Record.proto\022\tserialize\032\023FunctionNames" +
+      ".proto\"y\n\013PBParameter\022\024\n\014uint64_value\030\001 " +
+      "\001(\004\022\025\n\rliteral_value\030\002 \001(\t\022\022\n\nbool_value" +
+      "\030\003 \001(\010\022\023\n\013int32_value\030\004 \001(\005\022\024\n\014uint32_va" +
+      "lue\030\005 \001(\r\"P\n\rPBReturnValue\022,\n\013return_typ" +
+      "e\030\001 \002(\0162\027.serialize.PBReturnType\022\021\n\tretu" +
+      "rn_id\030\002 \001(\004\"\340\002\n\016PBFunctionCall\022\035\n\003add\030\001 " +
+      "\001(\0162\020.serialize.PBAdd\022)\n\010allocate\030\002 \001(\0162" +
+      "\027.serialize.PBAllocation\022,\n\nidentifier\030\003" +
+      " \001(\0162\030.serialize.PBIdentifiers\022 \n\004type\030\004",
+      " \001(\0162\022.serialize.PBTypes\022*\n\tstatement\030\005 " +
+      "\001(\0162\027.serialize.PBStatements\022,\n\nexpressi" +
+      "on\030\006 \001(\0162\030.serialize.PBExpressions\022*\n\npa" +
+      "rameters\030\007 \003(\0132\026.serialize.PBParameter\022." +
+      "\n\014return_value\030\010 \002(\0132\030.serialize.PBRetur" +
+      "nValue\"O\n\016PBAstTraversal\022(\n\005calls\030\001 \003(\0132" +
+      "\031.serialize.PBFunctionCall\022\023\n\013main_modul" +
+      "e\030\002 \002(\004*6\n\014PBReturnType\022\024\n\020type_voidPoin" +
+      "ter\020\001\022\020\n\014type_boolean\020\002BH\n0at.ac.ait.mom" +
+      "ut.ooas.argos.codegen.serialize.genB\024Rec",
+      "ordedAstTraversal"
+    };
+    final com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
+        @Override
+		public com.google.protobuf.ExtensionRegistry assignDescriptors(
+            com.google.protobuf.Descriptors.FileDescriptor root) {
+          descriptor = root;
+          internal_static_serialize_PBParameter_descriptor =
+            getDescriptor().getMessageTypes().get(0);
+          internal_static_serialize_PBParameter_fieldAccessorTable = new
+            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+              internal_static_serialize_PBParameter_descriptor,
+              new java.lang.String[] { "Uint64Value", "LiteralValue", "BoolValue", "Int32Value", "Uint32Value", });
+          internal_static_serialize_PBReturnValue_descriptor =
+            getDescriptor().getMessageTypes().get(1);
+          internal_static_serialize_PBReturnValue_fieldAccessorTable = new
+            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+              internal_static_serialize_PBReturnValue_descriptor,
+              new java.lang.String[] { "ReturnType", "ReturnId", });
+          internal_static_serialize_PBFunctionCall_descriptor =
+            getDescriptor().getMessageTypes().get(2);
+          internal_static_serialize_PBFunctionCall_fieldAccessorTable = new
+            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+              internal_static_serialize_PBFunctionCall_descriptor,
+              new java.lang.String[] { "Add", "Allocate", "Identifier", "Type", "Statement", "Expression", "Parameters", "ReturnValue", });
+          internal_static_serialize_PBAstTraversal_descriptor =
+            getDescriptor().getMessageTypes().get(3);
+          internal_static_serialize_PBAstTraversal_fieldAccessorTable = new
+            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+              internal_static_serialize_PBAstTraversal_descriptor,
+              new java.lang.String[] { "Calls", "MainModule", });
+          return null;
+        }
+      };
+    com.google.protobuf.Descriptors.FileDescriptor
+      .internalBuildGeneratedFileFrom(descriptorData,
+        new com.google.protobuf.Descriptors.FileDescriptor[] {
+          org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.getDescriptor(),
+        }, assigner);
+  }
+
+  // @@protoc_insertion_point(outer_class_scope)
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpStatement.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpStatement.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpStatement.java	(revision 2)
@@ -0,0 +1,588 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.cadp;
+
+import java.util.AbstractMap.SimpleEntry;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.statements.AbortStatement;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.KillStatement;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.SkipStatement;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.visitors.OoaPrintVisitor;
+import org.momut.ooas.visitors.OoaStatementVisitor;
+
+/// <summary>
+/// Knows how to construct a C-CADP statement from an AST-statement
+/// (dumps out, e.g., named actions)
+/// </summary>
+public final class CadpStatement extends OoaStatementVisitor
+{
+	public final OoasCodeEmitter m_emitter = new OoasCodeEmitter();
+	private final CadpActionInfo m_procInfo;
+	private int m_statePosCount = 1;
+	private static int m_debugPosCount = -1;
+	private int m_blockCount;
+
+	public int nondetAssignmentsToClose = 0;
+	public int blockCount() { return m_blockCount; }
+
+	public static String CallHelper(FunctionIdentifier fun, String helperName)
+	{
+		final StringBuilder paramStr = new StringBuilder("worklist");
+		for (final ParameterIdentifier param : fun.parameter())
+		{
+			paramStr.append(", ");
+			paramStr.append(String.format("%1$s", CadpIdentifier.GetIdentifierString(param)));
+		}
+		if (((FunctionType)fun.type()).returnType() != null)
+		{
+			paramStr.append(", ");
+			paramStr.append(String.format("param_result"));
+		}
+		return String.format("%1$s(%2$s)", helperName, paramStr.toString());
+	}
+
+	public static String HelperFunctionHeader(FunctionIdentifier fun, String functionName)
+	{
+		final StringBuilder paramStr = new StringBuilder("struct STATE_LIST* worklist");
+		for (final ParameterIdentifier param: fun.parameter())
+		{
+			//CadpType.EmitType(param.type);
+			paramStr.append(", ");
+			paramStr.append(String.format("%1$s %2$s", OoaCADPVisitor.DumpType(param.type()), CadpIdentifier.GetIdentifierString(param)));
+		}
+		if (((FunctionType)fun.type()).returnType() != null)
+		{
+			//CadpType.EmitType(((FunctionType)fun.type).returnType);
+			paramStr.append(", ");
+			paramStr.append(String.format("%1$s *param_result", OoaCADPVisitor.DumpType(((FunctionType)fun.type()).returnType())));
+		}
+		return String.format("struct STATE_LIST* %1$s (%2$s)", functionName, paramStr.toString());
+	}
+
+
+	@Override
+	public  void visit(NondetBlock nondetBlock)
+	{
+		m_blockCount++;
+		final int nondetBlocknum = m_blockCount;
+		m_emitter.AppendLine("{ /* begin nodet-choice block */");
+
+		m_emitter.AppendLine(String.format("struct STATE_LIST *nondetInitial_%1$s = %2$s;", nondetBlocknum, m_procInfo.toDoListString));
+		m_emitter.AppendLine(String.format("struct STATE_LIST *nondetFinal_%1$s = NULL;", nondetBlocknum));
+		for (final Statement s : nondetBlock.statements())
+		{
+			s.Accept(this);
+			m_emitter.AppendLine("/* nondet-choice block: save result and reset initial states for next choice */");
+			m_emitter.AppendLine(String.format("LIST_INSERT_LIST(%3$s,%4$s); %1$s = %2$s; %4$s = NULL;",
+					m_procInfo.toDoListString,
+					String.format("nondetInitial_%1$s", nondetBlocknum),
+					String.format("nondetFinal_%1$s", nondetBlocknum),
+					m_procInfo.doneListString));
+		}
+		m_emitter.AppendLine("");
+		m_emitter.AppendLine(String.format("%1$s = %2$s; /* nondet-choice block end: save all reached final states */",
+				m_procInfo.doneListString, String.format("nondetFinal_%1$s", nondetBlocknum)));
+		m_emitter.AppendLine("} /* end nodet-choice block */");
+	}
+
+	@Override
+	public  void visit(SeqBlock seqBlock)
+	{
+		int loopcount = 0;
+		final boolean haveNondeterminism = seqBlock.symbols().symbolList().size() > 0;
+		final boolean splittingEnabled = m_procInfo.splitBlockSize > 0;
+
+		final int blockNum = haveNondeterminism ? m_blockCount++ : m_blockCount;
+
+		m_emitter.AppendLineIncIndent("{ /* begin seqblock */");
+
+		if (haveNondeterminism)
+		{
+			m_blockCount++;
+			m_emitter.AppendLine(String.format("struct STATE_LIST *seqInitial_%1$s = %2$s;", blockNum, m_procInfo.toDoListString));
+			m_emitter.AppendLine(String.format("struct STATE_LIST *seqFinal_%1$s = NULL;", blockNum));
+			for (final Identifier sym :seqBlock.symbols().symbolList())
+			{
+				CadpType.EmitType(sym.type());
+				final CadpType atype = new CadpType();
+				sym.type().Accept(atype);
+				final CadpIdentifier anIdent = new CadpIdentifier(OoaCADPVisitor.StateVariablePrefix);
+				sym.Accept(anIdent);
+				m_emitter.AppendLine("/* local (free) variables of seq block */");
+
+				m_emitter.AppendLine(String.format("      long long iterator_%1$s;", anIdent.toString()));
+				m_emitter.AppendLine(String.format("      for (iterator_%1$s = %2$s; iterator_%1$s <= %3$s; iterator_%1$s++) {",
+						anIdent.toString(), CadpType.GetMinVal(sym.type()), CadpType.GetMaxVal(sym.type())));
+				m_emitter.AppendLine(String.format("      %1$s %2$s = %3$s%4$s(iterator_%2$s);",
+						atype.ToString(), anIdent.toString(), CadpType.enumString, CadpIdentifier.GetIdentifierString(sym.type().identifier())));
+
+
+				loopcount++;
+			}
+
+			if (!(seqBlock.filter() == null))
+				throw new UnsupportedOperationException();
+		}
+
+		if (!splittingEnabled || seqBlock.statements().size() < m_procInfo.splitBlockSize)
+		{
+			// no splitting, write out to emitter
+			int i = 0;
+			for (final Statement s : seqBlock.statements())
+			{
+				if (i != 0)
+				{
+					m_emitter.AppendLine("/* sequential composition: all states reached need to go into todo list */");
+					m_emitter.AppendLine(String.format("%1$s = %2$s; %2$s = NULL;", m_procInfo.toDoListString, m_procInfo.doneListString));
+				}
+				i++;
+				s.Accept(this);
+			}
+		}
+		else
+		{
+			// splitting, we will create functions that take at max. m_procInfo.splitBlockSize number of children
+			int splitCount = 0;
+			final Iterator<Statement> enumerator = seqBlock.statements().iterator();
+			for (int elemCntr = 0; elemCntr < seqBlock.statements().size(); elemCntr++)
+			{
+				final CadpStatement stmnt = new CadpStatement(this);
+				final Statement currentStatement = enumerator.next();
+				currentStatement.Accept(stmnt);
+				final boolean newSubGroup = elemCntr % m_procInfo.splitBlockSize == 0;
+				if (newSubGroup)
+				{
+					splitCount++;
+					final String helperName = String.format("%1$s_%2$s", m_procInfo.action.tokenText(), splitCount);
+					// call the helper
+					if (elemCntr > 0)
+					{
+						m_emitter.AppendLine("/* sequential composition: all states reached need to go into todo list */");
+						m_emitter.AppendLine(String.format("%1$s = %2$s; %2$s = NULL;", m_procInfo.toDoListString, m_procInfo.doneListString));
+					}
+					m_emitter.AppendLine(String.format("%1$s = %2$s;", m_procInfo.doneListString, CallHelper(m_procInfo.action, helperName)));
+					// make a header for the helper
+					m_procInfo.m_helperMethods.AppendLine();
+					m_procInfo.m_helperMethods.AppendLine(HelperFunctionHeader(m_procInfo.action, helperName));
+					m_procInfo.m_helperMethods.IncIndent();
+					m_procInfo.m_helperMethods.AppendLine("{");
+					m_procInfo.m_helperMethods.AppendLine("struct STATE_LIST *newstatelist = NULL;");
+				}
+				if (!newSubGroup)
+				{
+					m_procInfo.m_helperMethods.AppendLine("/* sequential composition: all states reached need to go into todo list */");
+					m_procInfo.m_helperMethods.AppendLine(String.format("%1$s = %2$s; %2$s = NULL;", m_procInfo.toDoListString, m_procInfo.doneListString));
+				}
+				m_procInfo.m_helperMethods.AppendLine(stmnt.toString());
+				if ((elemCntr + 1) % m_procInfo.splitBlockSize == 0 || (elemCntr + 1) >= seqBlock.statements().size())
+				{
+					// close the helper
+					m_procInfo.m_helperMethods.AppendLine(String.format("return %1$s;",m_procInfo.doneListString));
+					m_procInfo.m_helperMethods.DecIndent();
+					m_procInfo.m_helperMethods.AppendLine("}");
+				}
+			}
+		}
+		// we need to do some loop-calling here..
+		if (haveNondeterminism)
+		{
+
+			m_emitter.AppendLine("/* save result state and reset initial state for next choice */");
+			m_emitter.AppendLine(String.format("LIST_INSERT_LIST(%3$s,%4$s); %1$s = %2$s; %4$s = NULL;",
+					m_procInfo.toDoListString,
+					String.format("seqInitial_%1$s", blockNum),
+					String.format("seqFinal_%1$s", blockNum),
+					m_procInfo.doneListString));
+
+			while (loopcount > 0)
+			{
+				m_emitter.AppendLine("      }");
+				loopcount--;
+			}
+			m_emitter.AppendLine("/* all final states reached after the seq-block are on our done list */");
+			m_emitter.AppendLine(String.format("%1$s = %2$s;", m_procInfo.doneListString, String.format("seqFinal_%1$s", blockNum)));
+		}
+		m_emitter.DecIndent();
+		m_emitter.AppendLine("} /* end seqblock */");
+	}
+
+	@Override
+	public  void visit(PrioBlock prioBlock)
+	{
+		m_blockCount++;
+		final int prioBlocknum = m_blockCount;
+		m_emitter.AppendLine("{ /* begin prioritized composition block */");
+		m_emitter.AppendLine(String.format("struct STATE_LIST *prioInitial_%1$s = %2$s;", prioBlocknum, m_procInfo.toDoListString));
+		m_emitter.AppendLine(String.format("struct STATE_LIST *prioFinal_%1$s = NULL;", prioBlocknum));
+		for (final Statement s : prioBlock.statements())
+		{
+			s.Accept(this);
+			m_emitter.AppendLine("/* prio block: save result and reset initial states for next choice */");
+
+			m_emitter.AppendLine(String.format("%1$s = GetPrioritizedWorkList(prioInitial_%2$s, %3$s);",
+					m_procInfo.toDoListString, prioBlocknum, m_procInfo.doneListString));
+			m_emitter.AppendLine(String.format("LIST_INSERT_LIST(prioFinal_%1$s, %2$s);",
+					prioBlocknum, m_procInfo.doneListString));
+			m_emitter.AppendLine(String.format("if (%3$s == NULL) goto prioritizedCompositionExit_%2$s; else %1$s = NULL;",
+					m_procInfo.doneListString, prioBlocknum, m_procInfo.toDoListString));
+		}
+		m_emitter.AppendLine("");
+		m_emitter.AppendLine(String.format("prioritizedCompositionExit_%1$s:", prioBlocknum));
+		m_emitter.AppendLine(String.format("%1$s = %2$s; /* prioritized composition block end: save all reached final states */",
+				m_procInfo.doneListString, String.format("prioFinal_%1$s", prioBlocknum)));
+		m_emitter.AppendLine("} /* end prioritized composition block */");
+	}
+
+	@Override
+	public  void visit(GuardedCommand guardedCommand)
+	{
+		String body;
+		final CadpExpression expr = new CadpExpression(m_procInfo);
+		final CadpStatement statement = new CadpStatement(this);
+		guardedCommand.guard().Accept(expr);
+		guardedCommand.body().Accept(statement);
+		m_blockCount = statement.blockCount() + 1;
+
+		body = String.format("%3$s if (%1$s) { LIST_INSERT_SINGLELIST(%2$s,elem); };", expr.toString(), m_procInfo.doneListString, expr.VariableDeclarations());
+
+		m_emitter.AppendLineIncIndent("{");
+		m_emitter.AppendLine("/* guarded command */");
+		m_emitter.AppendLine(String.format("ITERATE_STATES(%1$s, %2$s );", m_procInfo.toDoListString, body));
+		m_emitter.AppendLine(String.format("%1$s = %2$s; %2$s = NULL;", m_procInfo.toDoListString, m_procInfo.doneListString));
+		m_emitter.AppendLine(String.format(" if (%1$s == NULL) goto guardedCommandExit_%2$s;", m_procInfo.toDoListString, OoaCADPVisitor.getUIntHashCode(guardedCommand)));
+		m_emitter.AppendLineDecIndent("}");
+		m_emitter.Append(statement.toString());
+		m_emitter.AppendLine(String.format("guardedCommandExit_%2$s: %1$s = %1$s;", m_procInfo.toDoListString, OoaCADPVisitor.getUIntHashCode(guardedCommand)));
+	}
+
+	@Override
+	public  void visit(Assignment assignment)
+	{
+		final OoaPrintVisitor pvis = new OoaPrintVisitor(null);
+		assignment.Accept(pvis);
+		m_emitter.AppendLine(String.format("{ /* assignment: %1$s */", pvis.toString().replace("/*", "").replace("*/", "")));
+
+		m_emitter.AppendLine(String.format("struct STATE_LIST *elems = %1$s;", m_procInfo.toDoListString));
+		m_emitter.AppendLine("CAESAR_TYPE_STATE newState = NULL;");
+		m_emitter.AppendLine("CAESAR_TYPE_STATE oldState;");
+		m_emitter.AppendLine("while (elems != NULL)");
+		m_emitter.AppendLineIncIndent("{");
+		m_emitter.AppendLine("oldState = (CAESAR_TYPE_STATE) elems->aState;");
+
+		final ArrayList<SimpleEntry<String, UlyssesType>> nondetEnumerators = new ArrayList<>();
+		if (assignment.symbols().symbolList().size() > 0)
+		{
+			for (final Identifier sym : assignment.symbols().symbolList())
+			{
+				final CadpType typevis = new CadpType();
+				final CadpIdentifier idvis = new CadpIdentifier("oldState");
+				sym.type().Accept(typevis);
+				sym.Accept(idvis);
+				m_emitter.AppendLine(String.format("%1$s %2$s; /* unbound in expression */", typevis.ToString(), idvis.toString()));
+				nondetEnumerators.add(new SimpleEntry<String, UlyssesType>(idvis.toString(), sym.type()));
+			}
+		}
+
+		if (assignment.nondetExpression() != null)
+		{
+			for (final SimpleEntry<String, UlyssesType> key : nondetEnumerators)
+			{
+				m_emitter.AppendLine(String.format("for (%1$s = %2$s; %1$s <= %3$s; %1$s++) ",
+						key.getKey(), UlyssesType.Low(key.getValue()), UlyssesType.High(key.getValue())));
+				m_emitter.AppendLineIncIndent("{");
+			}
+
+			final CadpExpression exprvis = new CadpExpression(new CadpActionInfo(null, -1, 0, "", "", "oldState"));
+			assignment.nondetExpression().Accept(exprvis);
+			m_emitter.AppendLine(String.format("if (%1$s)", exprvis.toString()));
+		}
+
+		m_emitter.AppendLine("{");
+
+		m_emitter.AppendLine("/* setup new state */");
+		m_emitter.AppendLine("CAESAR_CREATE_STATE(&newState);");
+		m_emitter.AppendLine("memcpy(newState,oldState,CAESAR_SIZE_STATE());");
+		m_emitter.AppendLine("newState->_hidden = 1;");
+		m_emitter.AppendLine("newState->_predecessor = oldState;");
+		m_emitter.AppendLine("struct STATE_LIST *newListElem;");
+		m_emitter.AppendLine("LIST_CREATE(newListElem);");
+		m_emitter.AppendLine("newListElem->aState = newState;");
+		m_emitter.AppendLine("newState->_successors = NULL;");
+		m_emitter.AppendLine(String.format("newState->_statenum = (char*)%1$s;", m_debugPosCount--));
+
+
+
+		final Iterator<Expression> place = assignment.places().iterator();
+		final Iterator<Expression> value = assignment.values().iterator();
+		while (place.hasNext() && value.hasNext())
+		{
+			final Expression currValue = value.next();
+			final Expression currPlace = place.next();
+			CadpExpression vis = new CadpExpression(new CadpActionInfo(null, -1, 0, "", "", "oldState"));
+			currValue.Accept(vis);
+			final String from = vis.toString();
+			final String fromdecls = vis.VariableDeclarations();
+
+			vis = new CadpExpression(new CadpActionInfo(null, -1, 0, "", "", "newState"));
+			currPlace.Accept(vis);
+			final String to = vis.toString();
+			/*if (to.Equals("param_result"))
+                    to = "*param_result";*/
+			m_emitter.AppendLine(vis.VariableDeclarations());
+			m_emitter.AppendLine(fromdecls);
+			m_emitter.AppendLine(String.format("%1$s = %2$s;", to, from));
+
+			// code that checks wether we're in range..
+			switch (currPlace.type().kind())
+			{
+			case IntType:
+				final IntType placetype_int = (IntType)currPlace.type();
+				m_emitter.AppendLine(String.format("/*Range of %3$s: %1$s..%2$s*/", placetype_int.rangeLow(), placetype_int.rangeHigh(), to));
+				m_emitter.AppendLine(String.format("if (%1$s < %2$sLL || %1$s > %3$sLL)", to, placetype_int.rangeLow(), placetype_int.rangeHigh()));
+				m_emitter.AppendLine(String.format("{CAESAR_DELETE(newState); free(newListElem); newListElem = NULL; goto rangeExit_%1$s;}", OoaCADPVisitor.getUIntHashCode(assignment)));
+				break;
+			case FloatType:
+				final FloatType placetype_float = (FloatType)currPlace.type();
+				m_emitter.AppendLine(String.format("/*Range of %3$s: %1$s..%2$s*/", placetype_float.low(), placetype_float.high(), to));
+				m_emitter.AppendLine(String.format("if (%1$s < %2$s || %1$s > %3$s)", to, placetype_float.low(), placetype_float.high()));
+				m_emitter.AppendLine(String.format("{CAESAR_DELETE(newState); free(newListElem); newListElem = NULL; goto rangeExit_%1$s;}", OoaCADPVisitor.getUIntHashCode(assignment)));
+				break;
+			default:
+				m_emitter.AppendLine(String.format("if (CALC_INVALID == 1)"));
+				m_emitter.AppendLine(String.format("{ CALC_INVALID = 0; CAESAR_DELETE(newState); free(newListElem); newListElem = NULL; goto rangeExit_%1$s;}", OoaCADPVisitor.getUIntHashCode(assignment)));
+				break;
+			}
+		}
+		m_emitter.AppendLine("LISTLIST_INSERT_LIST(ARGOS_ALL_STATES,newListElem);");
+		m_emitter.AppendLine(String.format("rangeExit_%1$s:", OoaCADPVisitor.getUIntHashCode(assignment)));
+		m_emitter.AppendLine(String.format("LIST_INSERT_SINGLELIST(%1$s,newListElem);", m_procInfo.doneListString));
+		m_emitter.AppendLine("}");
+		if (assignment.nondetExpression() != null)
+			for (@SuppressWarnings("unused") final SimpleEntry<String, UlyssesType> key : nondetEnumerators)
+				m_emitter.AppendLine("} /* closing nondet assignment for loop */");
+
+		m_emitter.AppendLine("elems = elems->next;");
+		m_emitter.AppendLineDecIndent("} /*while loop, iterating through all states*/");
+		m_emitter.AppendLine("} /* end assignment*/");
+	}
+
+	@Override
+	public  void visit(Call call)
+	{
+		final Expression ce = call.callExpression();
+		String callstatement = "";
+
+		/*for each state in the worklist..*/
+
+		m_emitter.AppendLineIncIndent("{ /* begin named action call*/");
+		m_emitter.AppendLine("struct STATE_LIST *callresult = NULL;");
+		m_emitter.AppendLine(String.format("struct STATE_LIST *elem = %1$s;", m_procInfo.toDoListString));
+		m_emitter.AppendLine("while(elem != NULL)");
+		m_emitter.AppendLineIncIndent("{");
+		m_emitter.AppendLine("struct STATE_LIST *next = elem->next;");
+
+		final StringBuilder parameter = new StringBuilder("(CAESAR_TYPE_STATE)elem->aState");
+
+		if (ce.kind() == ExpressionKind.Identifier)
+			callstatement = ((IdentifierExpression)ce).identifier().tokenText();
+		else if (ce.kind() == ExpressionKind.Call)
+		{
+			final CallExpression parens = (CallExpression)ce;
+
+			final CadpExpression cadpexpr = new CadpExpression(m_procInfo);
+			parens.child().Accept(cadpexpr);
+
+			m_emitter.Append(cadpexpr.VariableDeclarations());
+
+			callstatement = cadpexpr.toString();
+			for (final Expression arg : parens.arguments())
+			{
+				parameter.append(", ");
+				final CadpExpression paramexpr = new CadpExpression(m_procInfo);
+				arg.Accept(paramexpr);
+				m_emitter.AppendLine(paramexpr.VariableDeclarations());
+				parameter.append(paramexpr.toString());
+			}
+			if (((FunctionType)parens.child().type()).returnType() != null)
+			{
+				final String tmpresult = String.format("detcallresult_%1$s", OoaCADPVisitor.getUIntHashCode(parens));
+				m_emitter.AppendLine(String.format("%1$s %2$s;", CadpType.DumpType(((FunctionType)parens.child().type()).returnType()), tmpresult));
+				parameter.append(String.format(", &(%1$s)", tmpresult));
+			}
+
+		}
+		else if (ce.kind() == ExpressionKind.foldRL
+				|| ce.kind() == ExpressionKind.foldLR)
+		{
+			// intermediate hack for map..
+			final CallExpression callexpr = (CallExpression)((TernaryOperator)ce).left();
+			final Expression alist = ((TernaryOperator)ce).right();
+
+			final CadpExpression cadplist = new CadpExpression(m_procInfo);
+			alist.Accept(cadplist);
+			final String listname = Integer.toString(OoaCADPVisitor.getUIntHashCode(alist)) + Integer.toString(OoaCADPVisitor.getUIntHashCode(callexpr));
+			//m_emitter.AppendLine("struct STATE_LIST *_map_tmp_result = elem;");
+			m_emitter.AppendLine(String.format("%1$s list_%2$s = %3$s;",
+					CadpType.DumpType(alist.type()), listname, cadplist.toString()));
+			m_emitter.AppendLine(String.format("int list_iterator_%1$s;", listname));
+			if (ce.kind() == ExpressionKind.foldLR)
+				m_emitter.AppendLine(String.format("for (list_iterator_%1$s = 0; list_iterator_%1$s < list_%1$s.length; list_iterator_%1$s++) {", listname));
+			else
+				m_emitter.AppendLine(String.format("for (list_iterator_%1$s = list_%1$s.length - 1; list_iterator_%1$s >= 0 ; list_iterator_%1$s--) {", listname));
+
+			m_emitter.AppendLine(String.format("%1$s list_elem%2$s = list_%2$s.elements[list_iterator_%2$s];", CadpType.DumpType(((ListType)alist.type()).innerType()),
+					listname));
+
+
+			final CadpExpression cadpexpr = new CadpExpression(m_procInfo);
+			callexpr.child().Accept(cadpexpr);
+			callstatement = cadpexpr.toString();
+			for (final Expression arg: callexpr.arguments())
+			{
+				parameter.append(", ");
+				final CadpExpression paramexpr = new CadpExpression(m_procInfo);
+				arg.Accept(paramexpr);
+				parameter.append(paramexpr.toString());
+			}
+			parameter.append(String.format(", list_elem%1$s", listname));
+
+		}
+		else
+			throw new UnsupportedOperationException();
+
+		m_emitter.AppendLine(String.format("callresult = %1$s(%2$s);", callstatement, parameter));
+		if (ce.kind() == ExpressionKind.foldRL || ce.kind() == ExpressionKind.foldLR)
+		{
+			m_emitter.AppendLine("if (callresult == NULL) break; /*if function of map/fold not enabled - abort*/");
+			m_emitter.AppendLine("if (callresult->next != NULL) { fprintf(stderr,\"\\nnon-deterministic fold/map not supported!\\n\");  CAESAR_TERMINATE(1); }");
+			m_emitter.AppendLine("elem = callresult; }");
+		}
+		m_emitter.AppendLine(String.format("LIST_INSERT_LIST(%1$s, callresult);", m_procInfo.doneListString));
+		m_emitter.AppendLine("elem = next;");
+		m_emitter.AppendLineDecIndent("}");
+		m_emitter.AppendLineDecIndent("} /* end named action call*/");
+	}
+
+	@Override
+	public  void visit(SkipStatement skipStatement)
+	{
+		m_emitter.AppendLine("{ /* skip */");
+		m_emitter.AppendLine(String.format("struct STATE_LIST *elems = %1$s;", m_procInfo.toDoListString));
+		m_emitter.AppendLine("CAESAR_TYPE_STATE newState = NULL;");
+		m_emitter.AppendLine("CAESAR_TYPE_STATE oldState;");
+		m_emitter.AppendLine("while (elems != NULL)");
+		m_emitter.AppendLineIncIndent("{");
+		m_emitter.AppendLine("oldState = (CAESAR_TYPE_STATE) elems->aState;");
+
+		m_emitter.AppendLine("{");
+
+		m_emitter.AppendLine("/* setup new state */");
+		m_emitter.AppendLine("CAESAR_CREATE_STATE(&newState);");
+		m_emitter.AppendLine("memcpy(newState,oldState,CAESAR_SIZE_STATE());");
+		m_emitter.AppendLine("newState->_hidden = 1;");
+		m_emitter.AppendLine("newState->_predecessor = oldState;");
+		m_emitter.AppendLine("struct STATE_LIST *newListElem;");
+		m_emitter.AppendLine("LIST_CREATE(newListElem);");
+		m_emitter.AppendLine("newListElem->aState = newState;");
+		m_emitter.AppendLine("newState->_successors = NULL;");
+		m_emitter.AppendLine(String.format("newState->_statenum = (char*)%1$s;", m_debugPosCount--));
+
+		m_emitter.AppendLine("LISTLIST_INSERT_LIST(ARGOS_ALL_STATES,newListElem);");
+		m_emitter.AppendLine(String.format("LIST_INSERT_SINGLELIST(%1$s,newListElem);", m_procInfo.doneListString));
+		m_emitter.AppendLine("}");
+		m_emitter.AppendLine("elems = elems->next;");
+		m_emitter.AppendLineDecIndent("} /*while loop, iterating through all states*/");
+		m_emitter.AppendLine("} /* end skip*/");
+	}
+
+	@Override
+	public  void visit(AbortStatement abortStatement)
+	{
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public  void visit(KillStatement killStatement)
+	{
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public  String toString()
+	{
+		return m_emitter.toString();
+	}
+
+	public CadpStatement(CadpActionInfo aProcInfo)
+	{
+		super();
+		if (aProcInfo == null)
+			throw new IllegalArgumentException();
+		m_procInfo = aProcInfo;
+		m_blockCount = 0;
+	}
+
+	public CadpStatement(CadpActionInfo aProcInfo, boolean labelHiddenStates)
+	{
+		this(aProcInfo);
+		//m_labelHiddenStates = labelHiddenStates;
+	}
+
+
+	public CadpStatement(CadpStatement toCopy)
+	{
+		super();
+		m_procInfo = toCopy.m_procInfo;
+		m_blockCount = toCopy.m_blockCount;
+		m_statePosCount = toCopy.m_statePosCount;
+		//m_labelHiddenStates = toCopy.m_labelHiddenStates;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/OoasCodeEmitter.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/OoasCodeEmitter.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/OoasCodeEmitter.java	(revision 2)
@@ -0,0 +1,118 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen;
+
+/// <summary>
+/// Class that is used as text buffer during code emission
+/// </summary>
+public class OoasCodeEmitter
+{
+	private StringBuilder output;
+	private int indentLevel;
+	private final int indentTabWidth;
+
+
+	public OoasCodeEmitter()
+	{
+		indentLevel = 0;
+		indentTabWidth = 4;
+		output = new StringBuilder();
+	}
+
+	public void Indent()
+	{
+		for (int i = 0; i < indentLevel * indentTabWidth; i++)
+			output.append(" ");
+	}
+
+	public void Append(int num)
+	{
+		output.append(num);
+	}
+
+	public void Append(String text)
+	{
+		output.append(text);
+	}
+
+	public void AppendLineIncIndent(String text)
+	{
+		indentLevel++;
+		this.AppendLine(text);
+	}
+
+	public void AppendLineDecIndent(String text)
+	{
+		if (indentLevel > 0)
+		{
+			indentLevel--;
+			int startIndex = output.length() - indentTabWidth;
+			output.delete(startIndex, output.length());
+		}
+		this.AppendLine(text);
+	}
+
+
+	public void AppendLine(String text)
+	{
+		output.append(text);
+		output.append("\n");
+		Indent();
+	}
+
+	public void AppendLine()
+	{
+		output.append("\n");
+		Indent();
+	}
+
+
+
+	public void IncIndent()
+	{
+		indentLevel++;
+	}
+
+	public void DecIndent()
+	{
+		indentLevel--;
+	}
+
+	public void Clear()
+	{
+		output = new StringBuilder();
+	}
+
+
+	@Override
+	public String toString()
+	{
+		return output.toString();
+	}
+
+}
Index: trunk/compiler/licenses/Licenses.txt
===================================================================
--- trunk/compiler/licenses/Licenses.txt	(nonexistent)
+++ trunk/compiler/licenses/Licenses.txt	(revision 2)
@@ -0,0 +1,39 @@
+
+The OOAS Compiler Component is based on the following open source software components.
+
+Java Version:
+~~~~~~~~~~~~~
+	* Eclipse Project, Eclipse Java Batch Compiler
+		- License: Eclipse Public License
+		- Libraries: ecj-4.4.2.jar
+
+	* ANTLR 3
+		- License: Berkeley Software Distribution (BSD)
+		- Libraries: antlr-3.4-complete.jar, (antlrworks-1.4.3.jar)
+
+	* Java Native Access (JNA)
+		- License: Apache License 2.0
+		- Libraries: jna-4.0.0.jar, jna-platform-4.0.0.jar
+
+	* Google Protocol Buffers
+		- License: Modified BSD
+		- Libraries: protobuf.jar
+
+C++ AST:
+~~~~~~~~
+	* Google Protocol Buffers
+		- License: Modified BSD
+		- Libraries: not included
+	* BOOST
+		- License: Boost License
+		- Libraries: not included
+
+C# Version:
+~~~~~~~~~~~
+	* C5 Libraries
+		- License: MIT style open license
+		- Libraries: source included
+	* ANTLR 3
+		- License: BSD
+		- Libraries: antlr.runtime.dll, Antlr3.Runtime.dll, Antlr3.Utility.dll, antlr-3.2.jar
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpExpression.java	(revision 2)
@@ -0,0 +1,1388 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.cadp;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.ExistsQuantifier;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.ForallQuantifier;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.ListConstructor;
+import org.momut.ooas.ast.expressions.MapConstructor;
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+import org.momut.ooas.ast.expressions.SetConstructor;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.TypeExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.UnresolvedIdentifierExpression;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.expressions.LeafExpression.LeafTypeEnum;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.OoActionSystemInstance;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.parser.SymbolTable;
+import org.momut.ooas.visitors.OoaExpressionVisitor;
+
+/// <summary>
+/// Knows how to construct a C-CADP expression from an AST-expression
+/// (only basic arithmetical operations supported)
+/// </summary>
+public final class CadpExpression extends OoaExpressionVisitor
+{
+	private OoasCodeEmitter m_emitter = new OoasCodeEmitter();
+	private final CadpActionInfo m_procInfo;
+	private final ArrayList<Identifier> m_usedIdentifier = new ArrayList<Identifier>();
+	private static OoasCodeEmitter m_helperCode = new OoasCodeEmitter();
+	private static OoasCodeEmitter m_resetCode = new OoasCodeEmitter();
+
+	public static HashSet<String> emittedOperations = new HashSet<String>();
+	public List<Identifier> usedIdentifiers() { return m_usedIdentifier; }
+
+	private String OperatorString(Expression expression)
+	{
+		switch (expression.kind())
+		{
+		case abs:    // T_ABS:
+		case card:   // T_CARD:
+		case dom:    // T_DOM:
+		case range:  // T_RNG:
+		case merge:  // T_MERGE:
+		case elems:  // T_ELEMS:
+		case inds:   // T_INDS:
+		case dinter: // T_DINTER:
+		case dunion: // T_DUNION:
+		case domresby:   // T_DOMRESBY:
+		case domresto:   // T_DOMRESTO:
+		case rngresby:   // T_RNGRESBY:
+		case rngresto:   // T_RNGRESTO:
+		case inter:  // T_INTER:
+		case union:  // T_UNION:
+		case munion: // T_MUNION:
+		case seqmod_mapoverride: // T_SEQMOD_MAPOVERRIDE:
+		case subset:
+		case biimplies:  // T_BIIMPLIES:
+		case Primed:
+			throw new UnsupportedOperationException();
+
+		case notelemin:
+		case elemin:
+		case implies:    // T_IMPLIES:
+		case conc:   // T_CONC:
+		case head:   // T_HEAD:
+		case tail:   // T_TAIL:
+		case len:    // T_LEN:
+			throw new IllegalArgumentException(); // handled directly in binary operator! (T_CONC instanceof still todo, however)
+
+
+		case div:    // T_DIV:
+			return "/";
+		case idiv:   // T_IDIV:
+			return "/";
+		case mod:    // T_MOD:
+			return "%";
+		case prod:   // T_PROD:
+			return "*";
+		case sum:    // T_SUM:
+			return "+";
+		case minus:  // T_MINUS:
+			return "-";
+		case less:
+			return "<";
+		case lessequal:
+			return "<=";
+		case greater:
+			return ">";
+		case greaterequal:
+			return ">=";
+		case equal:
+			return "==";
+		case notequal:
+			return "!=";
+		case and:    // T_AND:
+			return "&&";
+		case or:     // T_OR:
+			return "||";
+		case not:
+			return "!";
+
+		case Cast:
+			throw new IllegalArgumentException(); // handled elsewhere
+			/*if (expression.type != null)
+                    return "("+expression.type().ToString()+")";
+                else
+                    return "(??Cast??)";*/
+
+		default:
+			return expression.kind().toString();
+		}
+	}
+	@Override
+	public <T>void visit(ValueExpression<T> valueExpression)
+	{
+		if (valueExpression.value() == null)
+		{
+			m_emitter.Append("NULL");
+		}
+		else if (valueExpression.valueType() == LeafTypeEnum.bool)
+		{
+			// bad hack..
+			final boolean aboolval = (Boolean)valueExpression.value();
+			m_emitter.AppendLine(aboolval ? "1" : "0");
+		}
+		else if (valueExpression.valueType() == LeafTypeEnum.chr)
+			m_emitter.Append(String.format("'%1$s'", valueExpression.toString()));
+		else
+			m_emitter.Append(valueExpression.value().toString());
+	}
+	@Override
+	public  void visit(UnresolvedIdentifierExpression unresolvedIdentifierExpression)
+	{
+		throw new IllegalArgumentException();
+	}
+
+	@Override
+	public  void visit(IdentifierExpression identifierExpression)
+	{
+		final CadpIdentifier idvis = new CadpIdentifier(m_procInfo.stateVariableString);
+		identifierExpression.Accept(idvis);
+		m_emitter.Append(idvis.toString());
+
+		if (identifierExpression.identifier().kind() == IdentifierKind.ExpressionVariableIdentifier)
+		{
+			// we need to define the variable
+			// declare free variables
+			final ExpressionVariableIdentifier id = (ExpressionVariableIdentifier)identifierExpression.identifier();
+			if (!emittedVariabes.contains(id))
+			{
+				emittedVariabes.add(id);
+				final CadpType atype = new CadpType();
+				id.type().Accept(atype);
+				varDecl.Append(String.format("%1$s %2$s; ", atype.ToString(), idvis.toString()));
+			}
+		}
+		// we memorize all identifiers
+		if (!m_usedIdentifier.contains(identifierExpression.identifier()))
+			m_usedIdentifier.add(identifierExpression.identifier());
+	}
+
+	@Override
+	public  void visit(TypeExpression typeExpression)
+	{
+		m_emitter.Append(typeExpression.type().identifier().tokenText());
+	}
+
+	@Override
+	public  void visit(ListConstructor listConstructor)
+	{
+		final ListType aListType = (ListType)listConstructor.type();
+		if (!listConstructor.hasComprehension())
+		{
+			CadpType.EmitType(aListType);
+
+			m_emitter.Append(String.format("%1$s%2$s(%3$s", CadpType.constructorString, CadpIdentifier.GetIdentifierString(aListType.identifier()), listConstructor.elements().size()));
+			int i;
+			for (i = 0; i < aListType.maxNumberOfElements(); i++)
+			{
+				m_emitter.Append(", ");
+				if (i < listConstructor.elements().size())
+					listConstructor.elements().get(i).Accept(this);
+				else
+					m_emitter.Append(String.format("%1$s%2$s(%3$s%2$s())", CadpType.enumString, CadpIdentifier.GetIdentifierString(aListType.innerType().identifier()), CadpType.lowString));
+			}
+			m_emitter.Append(")");
+		}
+		else
+		{
+			final CadpExpression compExpr = new CadpExpression(new CadpActionInfo(null, -1, 0, m_procInfo.toDoListString, m_procInfo.doneListString, "aState"), emittedVariabes);
+			if (listConstructor.comprehension() != null)
+				listConstructor.comprehension().Accept(compExpr);
+			else
+				new ValueExpression<Integer>(1, 0, 0, Integer.class).Accept(compExpr);
+
+			final CadpExpression listElementExpr = new CadpExpression(m_procInfo, emittedVariabes);
+			listConstructor.elements().get(0).Accept(listElementExpr);
+
+			// get a list of imported variabes
+			compExpr.usedIdentifiers().addAll(listElementExpr.usedIdentifiers());
+			final List<Identifier> importVars = getListOfAccessedIdentifiers(compExpr, listConstructor.comprehensionVariables());
+
+
+			// Idea: reduce importVars by compExpr.VariableDeclarations
+			// importVars.RemoveAll( (x) => if (x in compExpr.Vara... ) return true);
+
+			// BEGIN FIXXME
+			final List<Identifier> varsToRemove = new ArrayList<Identifier>();
+
+			for (final Identifier id : importVars)
+			{
+				final CadpType atype = new CadpType();
+				id.type().Accept(atype);
+				final String typeAndName = (String.format("%1$s %2$s; ", atype.ToString(), id.tokenText()));
+
+				if (compExpr.VariableDeclarations().contains(typeAndName))
+					varsToRemove.add(id);
+			}
+			int tmpcntr = importVars.size() -1;
+			for (tmpcntr = importVars.size() -1; tmpcntr>=0; tmpcntr--)
+				if (varsToRemove.contains(importVars.get(tmpcntr)))
+					importVars.remove(tmpcntr);
+			// END FIXXME
+
+			final String functionName = String.format("create_dyn_list_%1$s", OoaCADPVisitor.getUIntHashCode(listConstructor));
+			m_emitter.Append(functionName);
+			m_emitter.Append(String.format("( %1$s", this.m_procInfo.stateVariableString));
+			for (final Identifier x : importVars)
+			{
+				m_emitter.Append(",");
+				m_emitter.Append(String.format("%1$s", CadpIdentifier.GetIdentifierString(x)));
+			}
+			m_emitter.Append(")");
+
+			// emit helper
+			final ListType listType = (ListType)listConstructor.type();
+			CadpType.EmitType(listType.innerType());
+			final OoasCodeEmitter helper = new OoasCodeEmitter();
+			final String listtypename = String.format("struct_list_%1$s", CadpType.DumpType(listType.innerType()).replaceAll(" ", "_"));
+
+
+			final StringBuilder typedefbuilder = new StringBuilder();
+			typedefbuilder.append("#ifdef WINDOWSPACK" + System.lineSeparator());
+			typedefbuilder.append("#pragma pack(1)" + System.lineSeparator());
+			typedefbuilder.append("#endif" + System.lineSeparator());
+			typedefbuilder.append(String.format("struct %2$s { struct %2$s *next; %1$s element;} UNIXPACK;", CadpType.DumpType(listType.innerType()), listtypename));
+			typedefbuilder.append(System.lineSeparator());
+			final String listStruct = typedefbuilder.toString();
+			CadpType.AddTypeDefinition(listStruct);
+
+			helper.AppendLine(String.format("struct %1$s* %2$s(CAESAR_TYPE_STATE aState", listtypename, functionName));
+			for (final Identifier x : importVars)
+			{
+				helper.Append(", ");
+				helper.Append(String.format("%1$s %2$s", CadpType.DumpType(x.type()), CadpIdentifier.GetIdentifierString(x)));
+			}
+			helper.AppendLine("){");
+
+			helper.AppendLine(String.format("struct %1$s* result = NULL;", listtypename));
+			helper.AppendLine(String.format("struct %1$s* __currhead = NULL;", listtypename));
+			helper.AppendLine(compExpr.VariableDeclarations());
+
+			int loops = 0;
+			for (final Identifier enumvar : listConstructor.comprehensionVariables().symbolList())
+			{
+				helper.AppendLine(String.format("long long iterator_%1$s;", CadpIdentifier.GetIdentifierString(enumvar)));
+				helper.AppendLine(String.format("for (iterator_%1$s = %2$s; iterator_%1$s <= %3$s; iterator_%1$s++) {",
+						CadpIdentifier.GetIdentifierString(enumvar), CadpType.GetMinVal(enumvar.type()), CadpType.GetMaxVal(enumvar.type())));
+
+				if (compExpr.VariableDeclarations().contains(String.format(" %1$s;", CadpIdentifier.GetIdentifierString(enumvar))))
+					helper.AppendLine(String.format("/*%1$s*/ %2$s = %3$s(iterator_%2$s);",
+							CadpType.DumpType(enumvar.type()), CadpIdentifier.GetIdentifierString(enumvar), CadpType.GetEnumVal(enumvar.type())));
+				else
+					helper.AppendLine(String.format("%1$s %2$s = %3$s(iterator_%2$s);",
+							CadpType.DumpType(enumvar.type()), CadpIdentifier.GetIdentifierString(enumvar), CadpType.GetEnumVal(enumvar.type())));
+				loops++;
+			}
+
+			helper.AppendLine(String.format("%1$s __newElem;", CadpType.DumpType(listType.innerType())));
+
+
+			helper.AppendLine(String.format("if ((%1$s) && (CALC_INVALID == 0)) { __newElem = %2$s; ", compExpr.toString(), listElementExpr.toString()));
+
+			helper.AppendLine(String.format("struct %1$s* __listelem =  (struct %1$s*) malloc(sizeof(struct %1$s));", listtypename));
+			helper.AppendLine(String.format("if (__listelem == NULL) { fprintf(stderr,\"malloc failure\"); exit(1);}"));
+			helper.AppendLine(String.format("memset((char*)__listelem,0,sizeof(struct %1$s));", listtypename));
+
+			helper.AppendLine(String.format(String.format("memcpy(&(__listelem->element),&__newElem, sizeof(%1$s));", CadpType.DumpType(listType.innerType()))));
+			helper.AppendLine(String.format("if (result == NULL) result = __listelem; else __currhead->next = __listelem; __currhead = __listelem;"));
+
+			helper.AppendLine("} /*if*/");
+			helper.AppendLine("if (CALC_INVALID == 1) CALC_INVALID = 0;");
+			while (loops > 0)
+			{
+				helper.AppendLine("}");
+				loops--;
+			}
+			helper.AppendLine("return result; }");
+
+			m_helperCode.Append(helper.toString());
+		}
+	}
+
+	@Override
+	public  void visit(SetConstructor setConstructor)
+	{
+		final ListType aSetType = (ListType)setConstructor.type();
+		m_emitter.Append(String.format(" /*set constr*/ %1$s%2$s(", CadpType.constructorString, CadpIdentifier.GetIdentifierString(aSetType.identifier())));
+		m_emitter.Append(setConstructor.items().size());
+		for (final Expression x : setConstructor.items())
+		{
+			m_emitter.Append(", ");
+			x.Accept(this);
+		}
+		m_emitter.Append(")");
+	}
+
+	@Override
+	public  void visit(MapConstructor mapConstructor)
+	{
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public  void visit(TupleConstructor tupleConstructor)
+	{
+		final TupleType aTupleType = (TupleType)tupleConstructor.type();
+
+		if (tupleConstructor.isMatcher())
+		{
+			// being dealt with in binaryoperator (since we only allow tuple=MyTuple(a,b))
+			throw new IllegalArgumentException();
+		}
+		else
+		{
+			m_emitter.Append(String.format("%1$s%2$s(", CadpType.constructorString, CadpIdentifier.GetIdentifierString(aTupleType.identifier())));
+			int i = 0;
+			for (final Expression x : tupleConstructor.values())
+			{
+				if (i != 0)
+					m_emitter.Append(", ");
+				else
+					i++;
+				x.Accept(this);
+			}
+			m_emitter.Append(")");
+		}
+	}
+
+	@Override
+	public void visit(ObjectConstructor objectConstructor)
+	{
+		final OoActionSystemInstance instance = objectConstructor.GetNextInstance();
+		CadpType.EmitType(instance.Type);
+		if (objectConstructor.instances().size() == 1)
+		{
+			m_emitter.Append(String.format("%1$s", instance.Name));
+		}
+		else
+		{
+			final String helpername = String.format("obj_constr_%1$s", OoaCADPVisitor.getUIntHashCode(objectConstructor));
+			m_emitter.Append(String.format("%1$s()", helpername));
+
+			// emit helper
+
+			final OoasCodeEmitter helper = new OoasCodeEmitter();
+			helper.AppendLine(String.format("int %1$s_counter = 0;", helpername));
+			m_resetCode.AppendLine(String.format("%1$s_counter = 0;", helpername));
+			helper.AppendLine(String.format("%1$s %2$s(){", CadpType.DumpType(objectConstructor.type()), helpername));
+			int i = 0;
+			for (final OoActionSystemInstance x : objectConstructor.instances())
+			{
+				CadpType.EmitType(x.Type);
+				helper.AppendLine(String.format("if (%1$s_counter == %2$s) {%1$s_counter++; return %3$s;}",
+						helpername, i, x.Name));
+				i++;
+			}
+			helper.AppendLine(String.format("fprintf(stderr,\"constructor called too often: %1$s\"); exit(1);", helpername));
+			helper.Append("}");
+			m_helperCode.AppendLine(helper.toString());
+		}
+	}
+
+
+	@Override
+	public  void visit(AccessExpression accessExpression)
+	{
+		// if this instanceof some "<enumType>.<enumValue>" access, then just print the numeric value of <enumValue>
+		if (accessExpression.left().kind() == ExpressionKind.Type &&
+		    ((TypeExpression)accessExpression.left()).type().kind() == TypeKind.EnumeratedType )
+		{
+			accessExpression.right().Accept(this);
+			return;
+		}
+
+		// we normally skip the self, except for the case of method
+		// accesses (where we need to go over the jumptable
+		if (accessExpression.left().kind() == ExpressionKind.Identifier &&
+				((IdentifierExpression)accessExpression.left()).isSelf())
+		{
+			if (accessExpression.right().kind() != ExpressionKind.Identifier ||
+					((IdentifierExpression)accessExpression.right()).identifier().kind() != IdentifierKind.MethodIdentifier)
+			{
+				accessExpression.right().Accept(this);
+				return;
+			}
+		}
+
+		accessExpression.left().Accept(this);
+		m_emitter.Append(".");
+		// in oder to save memory, we do method access via a jump table
+		if (((IdentifierExpression)accessExpression.right()).identifier().kind() == IdentifierKind.MethodIdentifier ||
+				((IdentifierExpression)accessExpression.right()).identifier().kind() == IdentifierKind.NamedActionIdentifier)
+			m_emitter.Append("methods->");
+		accessExpression.right().Accept(this);
+	}
+
+
+	OoasCodeEmitter varDecl = new OoasCodeEmitter();
+	HashSet<Identifier> emittedVariabes = new HashSet<Identifier>();
+
+	public void addEmittedVariables(HashSet<Identifier> elementsToAdd)
+	{
+		emittedVariabes.addAll(elementsToAdd);
+	}
+
+	private void EmitMatcher(TupleConstructor tupleConstructor, Expression expression)
+	{
+		final OoasCodeEmitter tmp = m_emitter;
+		// get the expression
+		m_emitter = new OoasCodeEmitter();
+		expression.Accept(this);
+		final OoasCodeEmitter expr = m_emitter;
+		m_emitter = tmp;
+
+		// treat cases of MyTuple(a,b..) = <expr>
+		final Iterator<UlyssesType> elem = ((TupleType)tupleConstructor.type()).innerTypes().iterator();
+		int i = 0;
+		m_emitter.Append("(");
+		while (elem.hasNext())
+		{
+			final Expression var = tupleConstructor.values().get(i);
+
+			if (i != 0)
+				m_emitter.Append(" , ");
+
+			var.Accept(this);
+			m_emitter.Append(String.format(" = (%1$s).elem_%2$s ", expr.toString(), i));
+
+			i++;
+		}
+		m_emitter.Append(", 1==1)");
+	}
+
+	private void EmitDefaultBinaryOperator(BinaryOperator binaryOperator)
+	{
+		m_emitter.Append("(");
+		VisitSub(binaryOperator.left(), binaryOperator);
+		m_emitter.Append(") ");
+		m_emitter.Append(OperatorString(binaryOperator));
+		m_emitter.Append(" (");
+		VisitSub(binaryOperator.right(), binaryOperator);
+		m_emitter.Append(")");
+	}
+
+	@Override
+	public  void visit(BinaryOperator binaryOperator)
+	{
+		switch (binaryOperator.kind())
+		{
+		case equal:
+			/*check if we have tupleconstructors as matchers*/
+			if (binaryOperator.left().kind() == ExpressionKind.TupleConstr &&
+			((TupleConstructor)binaryOperator.left()).isMatcher())
+			{
+				EmitMatcher((TupleConstructor)binaryOperator.left(), binaryOperator.right());
+			}
+			else if (binaryOperator.right().kind() == ExpressionKind.TupleConstr &&
+					((TupleConstructor)binaryOperator.right()).isMatcher())
+			{
+				EmitMatcher((TupleConstructor)binaryOperator.right(), binaryOperator.left());
+			}/* check whether we must use memcmp */
+			else if (!CadpType.IsNumeric(binaryOperator.left().type()))
+			{
+				m_emitter.Append("0 == ");
+				EmitComplexEqual(binaryOperator);
+			}
+			else
+				EmitDefaultBinaryOperator(binaryOperator);
+			break;
+		case notequal:
+			if (!CadpType.IsNumeric(binaryOperator.left().type()))
+			{
+				m_emitter.Append("0 != ");
+				EmitComplexEqual(binaryOperator);
+			}
+			else
+				EmitDefaultBinaryOperator(binaryOperator);
+			break;
+		case conc:
+			final String conc = EmitConcOperation(binaryOperator);
+			m_emitter.Append(String.format("%1$s(", conc));
+			VisitSub(binaryOperator.left(), binaryOperator);
+			m_emitter.Append(",");
+			VisitSub(binaryOperator.right(), binaryOperator);
+			m_emitter.Append(")");
+			break;
+		case implies:
+			m_emitter.Append("!(");
+			VisitSub(binaryOperator.left(), binaryOperator);
+			m_emitter.Append(") || (");
+			VisitSub(binaryOperator.right(), binaryOperator);
+			m_emitter.Append(")");
+			break;
+		case elemin:
+			EmitInOperator(binaryOperator);
+			break;
+		case notelemin:
+			EmitNotInOperator(binaryOperator);
+			break;
+		case diff:   // T_DIFF:
+			final String diff = EmitSetDifference(binaryOperator);
+			m_emitter.Append(String.format("%1$s(", diff));
+			VisitSub(binaryOperator.left(), binaryOperator);
+			m_emitter.Append(",");
+			VisitSub(binaryOperator.right(), binaryOperator);
+			m_emitter.Append(")");
+			break;
+		default:
+			EmitDefaultBinaryOperator(binaryOperator);
+			break;
+		}
+	}
+
+	private String EmitSetDifference(BinaryOperator binaryOperator)
+	{
+		final String childBTypeName = CadpIdentifier.GetIdentifierString(binaryOperator.right().type().identifier());
+		final String childATypeName = CadpIdentifier.GetIdentifierString(binaryOperator.left().type().identifier());
+		final String result = String.format("op_listdiff_%1$s_%2$s", childATypeName, childBTypeName);
+		if (emittedOperations.contains(result))
+			return result;
+
+		CadpType.EmitType(binaryOperator.type());
+		final ListType alist = (ListType)binaryOperator.type();
+		final UlyssesType innerType = alist.innerType();
+		final String resultTypeName = CadpIdentifier.GetIdentifierString(binaryOperator.type().identifier());
+
+		m_helperCode.AppendLine(String.format("%4$s %3$s(%1$s listA, %2$s listB){", childATypeName, childBTypeName, result, resultTypeName));
+		m_helperCode.AppendLine(String.format("%1$s result;", resultTypeName));
+		m_helperCode.AppendLine(String.format("int len = 0; int i; int j;"));
+
+		m_helperCode.AppendLine(String.format("for (i = 0; i < listA.length; i++) {"));
+		m_helperCode.AppendLine(String.format("for (j = 0; j < listB.length; j++) {"));
+		m_helperCode.AppendLine(String.format("if (memcmp(&listA.elements[i],&listB.elements[j],sizeof(%1$s))==0)", CadpType.DumpType(innerType)));
+		m_helperCode.AppendLine("goto NotCopy;");
+		m_helperCode.AppendLine("}");
+		m_helperCode.AppendLine(String.format("memcpy(&result.elements[len],&listA.elements[i],sizeof(%1$s));", CadpType.DumpType(innerType)));
+		m_helperCode.AppendLine("len++;");
+		m_helperCode.AppendLine("NotCopy:");
+		m_helperCode.AppendLine("len = len;");
+		m_helperCode.AppendLine("}");
+		m_helperCode.AppendLine("result.length = len;");
+
+		// in case our resulttype was set wider..
+		m_helperCode.AppendLine(String.format("int counter;"));
+		m_helperCode.AppendLine(String.format("for (counter = %1$s; counter >= result.length; counter--) {", ((ListType)binaryOperator.type()).maxNumberOfElements() - 1));
+		m_helperCode.AppendLine(String.format("result.elements[counter] = %1$s%2$s(%3$s%2$s());}",
+				CadpType.enumString, CadpIdentifier.GetIdentifierString(alist.innerType().identifier()), CadpType.lowString));
+
+		m_helperCode.AppendLine("return result; }");
+
+		emittedOperations.add(result);
+		return result;
+	}
+
+	private void EmitInOperator(BinaryOperator binop)
+	{
+		m_emitter.Append(String.format("0 != setin_%1$s(", OoaCADPVisitor.getUIntHashCode(binop)));
+		VisitSub(binop.left(), binop);
+		m_emitter.Append(",");
+		VisitSub(binop.right(), binop);
+		m_emitter.Append(")");
+
+		CadpType.EmitType(binop.left().type());
+		CadpType.EmitType(binop.right().type());
+		final OoasCodeEmitter helper = new OoasCodeEmitter();
+		helper.Append(String.format("int setin_%1$s(", OoaCADPVisitor.getUIntHashCode(binop)));
+		helper.AppendLine(String.format("%1$s arg1, %2$s arg2){", CadpType.DumpType(binop.left().type()), CadpType.DumpType(binop.right().type())));
+		helper.AppendLine("int __counter;");
+		helper.AppendLine(String.format("for (__counter = 0; __counter < arg2.length; __counter++)"/*, CadpType.GetMaxVal(binop.right().type)*/));
+		helper.AppendLine(String.format("if (memcmp(&arg1,&(arg2.elements[__counter]),sizeof(%1$s))==0) return 1;", CadpType.DumpType(binop.left().type())));
+		helper.AppendLine("return 0;}");
+		m_helperCode.Append(helper.toString());
+	}
+
+
+	private void EmitNotInOperator(BinaryOperator binop)
+	{
+		m_emitter.Append(String.format("0 == setin_%1$s(", OoaCADPVisitor.getUIntHashCode(binop)));
+		VisitSub(binop.left(), binop);
+		m_emitter.Append(",");
+		VisitSub(binop.right(), binop);
+		m_emitter.Append(")");
+
+		CadpType.EmitType(binop.left().type());
+		CadpType.EmitType(binop.right().type());
+		final OoasCodeEmitter helper = new OoasCodeEmitter();
+		helper.Append(String.format("int setin_%1$s(", OoaCADPVisitor.getUIntHashCode(binop)));
+		helper.AppendLine(String.format("%1$s arg1, %2$s arg2){", CadpType.DumpType(binop.left().type()), CadpType.DumpType(binop.right().type())));
+		helper.AppendLine("int __counter;");
+		helper.AppendLine(String.format("for (__counter = 0; __counter < arg2.length; __counter++)"/*, CadpType.GetMaxVal(binop.right().type)*/));
+		helper.AppendLine(String.format("if (memcmp(&arg1,&(arg2.elements[__counter]),sizeof(%1$s))==0) return 1;", CadpType.DumpType(binop.left().type())));
+		helper.AppendLine("return 0;}");
+		m_helperCode.Append(helper.toString());
+	}
+
+
+
+	private void EmitComplexEqual(BinaryOperator binop)
+	{
+		m_emitter.Append(String.format("complex_equal_%1$s(", OoaCADPVisitor.getUIntHashCode(binop)));
+		VisitSub(binop.left(), binop);
+		m_emitter.Append(",");
+		VisitSub(binop.right(), binop);
+		m_emitter.Append(")");
+
+		CadpType.EmitType(binop.left().type());
+		CadpType.EmitType(binop.right().type());
+		final OoasCodeEmitter helper = new OoasCodeEmitter();
+		helper.Append(String.format("int complex_equal_%1$s(", OoaCADPVisitor.getUIntHashCode(binop)));
+		helper.AppendLine(String.format("%1$s arg1, %2$s arg2){", CadpType.DumpType(binop.left().type()), CadpType.DumpType(binop.right().type())));
+		helper.AppendLine(String.format("return memcmp(&arg1, &arg2, sizeof(%1$s));}", CadpIdentifier.GetIdentifierString(binop.left().type().identifier())));
+		m_helperCode.Append(helper.toString());
+	}
+
+	private String EmitConcOperation(BinaryOperator binaryOperator)
+	{
+		final String childBTypeName = CadpIdentifier.GetIdentifierString(binaryOperator.right().type().identifier());
+		final String childATypeName = CadpIdentifier.GetIdentifierString(binaryOperator.left().type().identifier());
+		final String result = String.format("op_conc_%1$s_%2$s", childATypeName, childBTypeName);
+		if (emittedOperations.contains(result))
+			return result;
+
+		CadpType.EmitType(binaryOperator.type());
+		final ListType alist = (ListType)binaryOperator.type();
+		final UlyssesType innerType = alist.innerType();
+		final String resultTypeName = CadpIdentifier.GetIdentifierString(binaryOperator.type().identifier());
+
+		m_helperCode.AppendLine(String.format("%4$s %3$s(%1$s listA, %2$s listB){", childATypeName, childBTypeName, result, resultTypeName));
+		m_helperCode.AppendLine(String.format("%1$s result;", resultTypeName));
+		m_helperCode.AppendLine(String.format("result.length = listA.length + listB.length;"));
+
+		m_helperCode.AppendLine(String.format("if (result.length > %1$s) { printf(\"Concatenation result too long! %2$s\\n\"); abort();}", alist.maxNumberOfElements(), result));
+		m_helperCode.AppendLine(String.format("memcpy(&result.elements[0],&listA.elements[0],listA.length * sizeof(%1$s));", CadpType.DumpType(innerType)));
+		m_helperCode.AppendLine(String.format("memcpy(&result.elements[listA.length],&listB.elements[0],listB.length * sizeof(%1$s));", CadpType.DumpType(innerType)));
+		m_helperCode.AppendLine(String.format("int counter;"));
+		m_helperCode.AppendLine(String.format("for (counter = %1$s; counter >= (listA.length + listB.length); counter--) {", alist.maxNumberOfElements() - 1));
+		m_helperCode.AppendLine(String.format("result.elements[counter] = %1$s%2$s(%3$s%2$s());}",
+				CadpType.enumString, CadpIdentifier.GetIdentifierString(alist.innerType().identifier()), CadpType.lowString));
+		m_helperCode.AppendLine("return result; }");
+
+		emittedOperations.add(result);
+		return result;
+	}
+
+	@Override
+	public  void visit(TernaryOperator ternaryOperator)
+	{
+		if (ternaryOperator.kind() == ExpressionKind.conditional)
+		{
+			m_emitter.Append("(");
+			VisitSub(ternaryOperator.left(), ternaryOperator);
+			m_emitter.Append(" ? ");
+
+			VisitSub(ternaryOperator.mid(), ternaryOperator);
+			m_emitter.Append(" : ");
+
+			VisitSub(ternaryOperator.right(), ternaryOperator);
+			m_emitter.Append(")");
+		}
+		else if (ternaryOperator.kind() == ExpressionKind.foldLR ||
+				ternaryOperator.kind() == ExpressionKind.foldRL)
+		{
+			final CallExpression leftcall = (CallExpression)ternaryOperator.left();
+			final Expression initializer = ternaryOperator.mid();
+			final Expression listgetter = ternaryOperator.right();
+
+			m_emitter.Append(String.format("fold_%1$s(%2$s", OoaCADPVisitor.getUIntHashCode(ternaryOperator), m_procInfo.stateVariableString));
+
+
+			final CadpExpression cadpexpr = new CadpExpression(m_procInfo, emittedVariabes);
+			leftcall.child().Accept(cadpexpr);
+			final List<String> paramtypes = new ArrayList<String>();
+			final List<String> parameters = new ArrayList<String>();
+			for (int i = 0; i < leftcall.arguments().size() - 2; i++)
+			{
+				final Expression arg = leftcall.arguments().get(i);
+				final CadpExpression paramexpr = new CadpExpression(m_procInfo, emittedVariabes);
+				arg.Accept(paramexpr);
+				m_emitter.Append(",");
+				m_emitter.Append(paramexpr.toString());
+			}
+
+			final FunctionType fun = (FunctionType)leftcall.child().type();
+			final FunctionIdentifier funid = (FunctionIdentifier) fun.identifier();
+			final Iterator<UlyssesType> node = fun.parameter().iterator();
+			for (int i = 0; i < fun.parameter().size() - 2; i++)
+			{
+				final UlyssesType nodeValue = node.next();
+				paramtypes.add(CadpType.DumpType(nodeValue));
+				final CadpIdentifier paramid = new CadpIdentifier(m_procInfo.stateVariableString);
+				funid.parameter().get(i).Accept(paramid);
+				parameters.add(paramid.toString());
+			}
+
+			m_emitter.Append(")");
+
+
+			CadpType.EmitType(initializer.type());
+			CadpType.EmitType(listgetter.type());
+			final ListType thelist = (ListType)listgetter.type();
+			CadpType.EmitType(thelist.innerType());
+			final OoasCodeEmitter helper = new OoasCodeEmitter();
+			helper.Append(String.format("%2$s fold_%1$s(CAESAR_TYPE_STATE oldState", OoaCADPVisitor.getUIntHashCode(ternaryOperator), CadpType.DumpType(leftcall.type())));
+			if (paramtypes.size() > 0)
+			{
+				for (int i = 0; i < paramtypes.size(); i++)
+				{
+					helper.Append(",");
+					helper.Append(paramtypes.get(i));
+					helper.Append(" ");
+					helper.Append(parameters.get(i));
+				}
+			}
+			helper.AppendLine("){");
+
+			helper.AppendLine(String.format("int __iterator;"));
+			helper.AppendLine(String.format("%1$s param__result;", CadpType.DumpType(leftcall.type())));
+			helper.AppendLine(String.format("%1$s __thelist;", CadpType.DumpType(listgetter.type())));
+			helper.AppendLine(String.format("%1$s param__elem;", CadpType.DumpType(thelist.innerType())));
+
+			final CadpActionInfo actionInfo = new CadpActionInfo(m_procInfo.action, -1, 0, m_procInfo.toDoListString, m_procInfo.doneListString, "oldState");
+
+			final CadpExpression initvizcode = new CadpExpression(actionInfo, emittedVariabes);
+			initializer.Accept(initvizcode);
+			helper.AppendLine(initvizcode.VariableDeclarations());
+			helper.AppendLine(String.format("param__result = %1$s;", initvizcode.toString()));
+
+			final CadpExpression listgettercode = new CadpExpression(actionInfo, emittedVariabes);
+			listgetter.Accept(listgettercode);
+			helper.AppendLine(listgettercode.VariableDeclarations());
+			helper.AppendLine(String.format("__thelist = %1$s;", listgettercode.toString()));
+
+			final CadpExpression filtercall = new CadpExpression(actionInfo, emittedVariabes);
+			leftcall.Accept(filtercall);
+			helper.AppendLine(filtercall.VariableDeclarations());
+
+			if (ternaryOperator.kind() == ExpressionKind.foldLR)
+				helper.AppendLine(String.format("for (__iterator = 0; __iterator < __thelist.length; __iterator++) {"));
+			else
+				helper.AppendLine(String.format("for (__iterator = __thelist.length - 1; __iterator >= 0; __iterator--) {"));
+
+			helper.AppendLine(String.format("param__elem = __thelist.elements[__iterator];"));
+			helper.AppendLine(String.format("param__result = %1$s;", filtercall.toString()));
+
+
+			helper.AppendLine("}");
+			helper.AppendLine("return param__result;}");
+			m_helperCode.Append(helper.toString());
+		}
+		else
+			throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public  void visit(TupleMapAccessExpression tupleMapAccessExpression)
+	{
+		VisitSub(tupleMapAccessExpression.child(), tupleMapAccessExpression);
+		if (tupleMapAccessExpression.child().type().kind() == TypeKind.TupleType)
+		{
+			// the access value needs to be a constant integer
+			@SuppressWarnings("unchecked")
+			final ValueExpression<Integer> accessValue = (ValueExpression<Integer>)tupleMapAccessExpression.argument();
+			m_emitter.Append(String.format(".elem_%1$s", accessValue.value()));
+		}
+		else if (tupleMapAccessExpression.child().type().kind() == TypeKind.ListType)
+		{
+			m_emitter.Append(".elements[");
+			VisitSub(tupleMapAccessExpression.argument(), tupleMapAccessExpression);
+			m_emitter.Append("]");
+		}
+		else
+			throw new UnsupportedOperationException();
+	}
+	@Override
+	public  void visit(CallExpression callExpression)
+	{
+		/* this only supports calls to functions that return ONE value (deterministically) and do not change the state
+		 * in a non-deterministic way
+		 * ATTENTION: call-statements are treated in cadpstatement. this code only deals with calls within expressions!!
+		 */
+
+		final FunctionType funtype = (FunctionType)callExpression.child().type();
+		if (funtype.returnType() == null)
+			throw new IllegalArgumentException("Internal error: Function call in expression with return-type void!");
+
+		/* create temp variable for result */
+		final String tmpresult = String.format("detcallresult_%1$s", OoaCADPVisitor.getUIntHashCode(callExpression));
+		final String tmpaftercallstates = String.format("callresult_%1$s", OoaCADPVisitor.getUIntHashCode(callExpression));
+
+		varDecl.AppendLine(String.format("%1$s %2$s;", CadpType.DumpType(funtype.returnType()), tmpresult));
+		varDecl.AppendLine(String.format("struct STATE_LIST * %1$s;", tmpaftercallstates));
+		/* create call */
+		final CadpExpression cadpexpr = new CadpExpression(m_procInfo, emittedVariabes);
+		callExpression.child().Accept(cadpexpr);
+		final String callstatement = cadpexpr.toString();
+		varDecl.Append(cadpexpr.VariableDeclarations());
+		m_usedIdentifier.addAll(cadpexpr.usedIdentifiers());
+		final StringBuilder parameter = new StringBuilder(m_procInfo.stateVariableString);
+		for (final Expression arg : callExpression.arguments())
+		{
+			parameter.append(", ");
+			final CadpExpression paramexpr = new CadpExpression(m_procInfo, emittedVariabes);
+			arg.Accept(paramexpr);
+			parameter.append(paramexpr.toString());
+		}
+		parameter.append(String.format(", &(%1$s)", tmpresult));
+
+		m_emitter.Append("(");
+		m_emitter.Append(String.format("%3$s = %1$s(%2$s)", callstatement, parameter, tmpaftercallstates));
+		m_emitter.Append(",");
+		m_emitter.Append(String.format(" CALC_INVALID = %1$s == NULL ? (fprintf(stderr,\"call to %2$s returns NULL!\\n\"), 1) : (%1$s->next == NULL ? CALC_INVALID : (fprintf(stderr,\"call to %2$s non-deterministic!\\n\"), 1))", tmpaftercallstates, callstatement.replaceAll("\"", "'")));
+		if (!funtype.isPureFunction())
+		{
+			m_emitter.Append(",");
+			m_emitter.Append(String.format(" elem = %1$s == NULL ? elem : (list_insert_list(%2$s, %1$s),%1$s)", tmpaftercallstates, m_procInfo.doneListString));
+		}
+		m_emitter.Append(",");
+		m_emitter.Append(String.format("%1$s", tmpresult));
+		m_emitter.Append(")");
+	}
+
+
+	private interface IFilter<T> {
+		boolean apply (T input); // poor man's anonymous function
+	}
+
+	private static <T> void removeAll(List<T> list, IFilter<T> filter) {
+		int max;
+		for (max = list.size() - 1; max >= 0; max --) {
+			if (filter.apply(list.get(max)))
+				list.remove(max);
+		}
+	}
+
+	private List<Identifier> getListOfAccessedIdentifiers(CadpExpression child, final SymbolTable currentScopeSymbols)
+	{
+		final List<Identifier> importVars = new ArrayList<Identifier>(child.usedIdentifiers());
+		if (currentScopeSymbols != null)
+			removeAll(importVars, new IFilter<Identifier>(){
+				@Override
+				public boolean apply(Identifier input) {
+					return currentScopeSymbols.symbolList().contains(input);
+				}});
+
+		removeAll(importVars, new IFilter<Identifier>(){
+			@Override
+			public boolean apply(Identifier input) {
+				return input.kind() == IdentifierKind.AttributeIdentifier || // we pass the complete state..
+				       input.kind() == IdentifierKind.EnumIdentifier ||      // constant
+				       input.kind() == IdentifierKind.MethodIdentifier ||
+				       input.kind() == IdentifierKind.NamedActionIdentifier;
+			}
+		});
+		return importVars;
+	}
+
+
+	@Override
+	public  void visit(ForallQuantifier quantifier)
+	{
+		final CadpActionInfo info = new CadpActionInfo(null, -1, -1, m_procInfo.toDoListString, m_procInfo.doneListString, "oldstate");
+		final CadpExpression compExpr = new CadpExpression(info, emittedVariabes);
+		quantifier.child().Accept(compExpr);
+
+		// get a list of imported variabes
+		final List<Identifier> importVars = getListOfAccessedIdentifiers(compExpr, quantifier.symbols());
+
+		final String functionName = String.format("forall_%1$s", OoaCADPVisitor.getUIntHashCode(quantifier));
+		m_emitter.Append(String.format("1 == %1$s", functionName));
+		m_emitter.Append(String.format("( %1$s", this.m_procInfo.stateVariableString));
+		for (final Identifier x : importVars)
+		{
+			m_emitter.Append(",");
+			m_emitter.Append(String.format("%1$s", CadpIdentifier.GetIdentifierString(x)));
+		}
+		m_emitter.Append(")");
+
+		// emit helper
+		final OoasCodeEmitter helper = new OoasCodeEmitter();
+		helper.AppendLine(String.format("int %1$s(CAESAR_TYPE_STATE %2$s", functionName, "oldstate"));
+		for (final Identifier x : importVars)
+		{
+			helper.Append(", ");
+			helper.Append(String.format("%1$s %2$s", CadpType.DumpType(x.type()), CadpIdentifier.GetIdentifierString(x)));
+		}
+		helper.AppendLine("){");
+
+		helper.AppendLine(compExpr.VariableDeclarations());
+
+		int loops = 0;
+		for (final Identifier enumvar : quantifier.symbols().symbolList())
+		{
+			CadpType.EmitType(enumvar.type());
+			helper.AppendLine(String.format("long long iterator_%1$s;", CadpIdentifier.GetIdentifierString(enumvar)));
+			helper.AppendLine(String.format("for (iterator_%1$s = %2$s; iterator_%1$s <= %3$s; iterator_%1$s++) {",
+					CadpIdentifier.GetIdentifierString(enumvar), CadpType.GetMinVal(enumvar.type()), CadpType.GetMaxVal(enumvar.type())));
+			helper.AppendLine(String.format("/*%1$s*/ %2$s = %3$s(iterator_%2$s);",
+					CadpType.DumpType(enumvar.type()), CadpIdentifier.GetIdentifierString(enumvar), CadpType.GetEnumVal(enumvar.type())));
+			if (enumvar.type().kind() == TypeKind.OoActionSystemType)
+			{
+				// treat nulls - ignore them
+				helper.AppendLine(String.format("if (memcmp(&%1$s, &%2$s, sizeof(%3$s)) == 0) continue;",
+						CadpIdentifier.GetIdentifierString(enumvar), CadpType.GetNullConstant((OoActionSystemType)enumvar.type()), CadpType.DumpType(enumvar.type())));
+			}
+			loops++;
+		}
+
+		helper.AppendLine(String.format("if (!("));
+		helper.AppendLine(compExpr.toString());
+		helper.AppendLine(String.format(") ) return 0;"));
+
+
+		while (loops > 0)
+		{
+			helper.AppendLine("}");
+			loops--;
+		}
+		helper.AppendLine("return 1; }");
+
+		m_helperCode.Append(helper.toString());
+	}
+
+	@Override
+	public  void visit(ExistsQuantifier quantifier)
+	{
+		final CadpActionInfo info = new CadpActionInfo(null, -1, -1, m_procInfo.toDoListString, m_procInfo.doneListString, "oldstate");
+		final CadpExpression compExpr = new CadpExpression(info, emittedVariabes);
+		quantifier.child().Accept(compExpr);
+
+		// get a list of imported variabes
+		final List<Identifier> importVars = getListOfAccessedIdentifiers(compExpr, quantifier.symbols());
+
+		final String functionName = String.format("exists_%1$s",  OoaCADPVisitor.getUIntHashCode(quantifier));
+		m_emitter.Append(String.format("1 == %1$s", functionName));
+		m_emitter.Append(String.format("( %1$s", this.m_procInfo.stateVariableString));
+		for (final Identifier x : importVars)
+		{
+			m_emitter.Append(",");
+			m_emitter.Append(String.format("%1$s", CadpIdentifier.GetIdentifierString(x)));
+		}
+		m_emitter.Append(")");
+
+		// emit helper
+		final OoasCodeEmitter helper = new OoasCodeEmitter();
+		helper.Append(String.format("int %1$s(CAESAR_TYPE_STATE %2$s", functionName, "oldstate"));
+		for (final Identifier x : importVars)
+		{
+			helper.Append(", ");
+			helper.Append(String.format("%1$s %2$s", CadpType.DumpType(x.type()), CadpIdentifier.GetIdentifierString(x)));
+		}
+		helper.AppendLine("){");
+
+		helper.AppendLine(compExpr.VariableDeclarations());
+
+		int loops = 0;
+		for (final Identifier enumvar : quantifier.symbols().symbolList())
+		{
+			CadpType.EmitType(enumvar.type());
+			helper.AppendLine(String.format("long long iterator_%1$s;", CadpIdentifier.GetIdentifierString(enumvar)));
+			helper.AppendLine(String.format("for (iterator_%1$s = %2$s; iterator_%1$s <= %3$s; iterator_%1$s++) {",
+					CadpIdentifier.GetIdentifierString(enumvar), CadpType.GetMinVal(enumvar.type()), CadpType.GetMaxVal(enumvar.type())));
+			helper.AppendLine(String.format("/*%1$s*/ %2$s = %3$s(iterator_%2$s);",
+					CadpType.DumpType(enumvar.type()), CadpIdentifier.GetIdentifierString(enumvar), CadpType.GetEnumVal(enumvar.type())));
+			if (enumvar.type().kind() == TypeKind.OoActionSystemType)
+			{
+				// treat nulls - ignore them
+				helper.AppendLine(String.format("if (memcmp(&%1$s, &%2$s, sizeof(%3$s)) == 0) continue;",
+						CadpIdentifier.GetIdentifierString(enumvar), CadpType.GetNullConstant((OoActionSystemType)enumvar.type()), CadpType.DumpType(enumvar.type())));
+			}
+			loops++;
+		}
+
+		helper.AppendLine(String.format("if (("));
+		helper.AppendLine(compExpr.toString());
+		helper.AppendLine(String.format(") ) return 1;"));
+
+
+		while (loops > 0)
+		{
+			helper.AppendLine("}");
+			loops--;
+		}
+		helper.AppendLine("return 0; }");
+
+		m_helperCode.Append(helper.toString());
+	}
+
+	private static final class RefBool {
+		boolean value = false;
+	}
+
+	@Override
+	public  void visit(UnaryOperator unaryOperator)
+	{
+		switch (unaryOperator.kind())
+		{
+		case tail:
+			final String tail = EmitTailOperation(unaryOperator);
+			m_emitter.Append(String.format("%1$s(", tail));
+			VisitSub(unaryOperator.child(), unaryOperator);
+			m_emitter.Append(")");
+			break;
+		case head:
+			m_emitter.Append("(");
+			VisitSub(unaryOperator.child(), unaryOperator);
+			m_emitter.Append(String.format(").elements[0]"));
+			break;
+		case len:
+			m_emitter.Append("(");
+			VisitSub(unaryOperator.child(), unaryOperator);
+			m_emitter.Append(String.format(").length"));
+			break;
+		case Cast:
+			m_emitter.Append("/*cast*/");
+			final RefBool doSub = new RefBool();
+			final String cast = EmitCastOperation(unaryOperator, /*out*/ doSub);
+			if (doSub.value)
+			{
+				m_emitter.Append(String.format("(%1$s(", cast));
+				VisitSub(unaryOperator.child(), unaryOperator);
+				m_emitter.Append("))");
+			}
+			break;
+		default:
+			m_emitter.Append(" ");
+			m_emitter.Append(OperatorString(unaryOperator));
+			m_emitter.Append("(");
+			VisitSub(unaryOperator.child(), unaryOperator);
+			m_emitter.Append(")");
+			break;
+		}
+	}
+
+	/* The cast support in this target instanceof limited: We can not cast differently sized types!
+	 * Hence list and map lengths must be equal.
+	 * */
+	private boolean CADPCastEquivalent(UlyssesType type1, UlyssesType type2)
+	{
+		if ((type1 == null) || (type2 == null))
+			return false;
+
+		final TypeKind tk1 = type1.kind();
+		final TypeKind tk2 = type2.kind();
+
+		// if of different kind, then return false..
+		if (tk1 != tk2)
+			return false;
+
+		// if same kind, make a rigorous check
+		switch (tk1)
+		{
+		case IntType:
+			return true; // we don't care about the range, since all ints are 32bit wide, which is the max that can be defined in OOAS
+		case BoolType:
+			return true;
+		case FloatType:
+			throw new UnsupportedOperationException(); // float type instanceof not used. other than that, we could return true
+		case EnumeratedType:
+			return type1 == type2; // reference equals!
+		case ListType:
+			final ListType listt1 = (ListType)type1;
+			final ListType listt2 = (ListType)type2;
+			return CADPCastEquivalent(listt1.innerType(), listt2.innerType()) &&
+					listt1.maxNumberOfElements() == listt2.maxNumberOfElements();
+		case MapType:
+			final MapType mapt1 = (MapType)type1;
+			final MapType mapt2 = (MapType)type2;
+			return CADPCastEquivalent(mapt1.fromType(), mapt2.fromType()) &&
+					CADPCastEquivalent(mapt1.toType(), mapt2.toType()) &&
+					mapt1.maxNumberOfElements() == mapt2.maxNumberOfElements();
+		case QrType:
+			final QrType qr1 = (QrType)type1;
+			final QrType qr2 = (QrType)type2;
+			return qr1 == qr2; // ref eq.
+		case TupleType:
+			final TupleType tuplet1 = (TupleType)type1;
+			final TupleType tuplet2 = (TupleType)type2;
+			if (tuplet1.innerTypes().size() != tuplet2.innerTypes().size())
+				return false;
+			final Iterator<UlyssesType> innert1 = tuplet1.innerTypes().iterator();
+			final Iterator<UlyssesType> innert2 = tuplet2.innerTypes().iterator();
+			while (innert1.hasNext())
+			{
+				final UlyssesType innert1Value = innert1.next();
+				final UlyssesType innert2Value = innert2.next();
+
+				if (!CADPCastEquivalent(innert1Value, innert2Value))
+					return false;
+			}
+			return true;
+		case OoActionSystemType:
+			return type1 == type2 /*ref. eq.*/ ||
+					UlyssesType.Covariance((OoActionSystemType)type2, (OoActionSystemType)type1);
+		case OpaqueType:
+			throw new IllegalArgumentException();
+		case Null:
+		case Any:
+			return true;
+		default:
+			throw new UnsupportedOperationException();
+		}
+	}
+
+
+	private String EmitCastOperation(UnaryOperator unaryOperator, /*out*/ RefBool doSub)
+	{
+		doSub.value = true;
+		if (unaryOperator.child().kind() == ExpressionKind.ListConstr &&
+				((ListConstructor)unaryOperator.child()).hasComprehension())
+		{
+			// we get a malloced list an have to cut it down
+			final String childTypeName = CadpIdentifier.GetIdentifierString(unaryOperator.child().type().identifier());
+			final String resultTypeName = CadpIdentifier.GetIdentifierString(unaryOperator.type().identifier());
+			final String result = String.format("op_cast_malloc_%1$s_%2$s", childTypeName, resultTypeName);
+
+			if (emittedOperations.contains(result))
+				return result;
+
+			// emit target type
+			CadpType.EmitType(unaryOperator.type());
+
+			switch (unaryOperator.type().kind())
+			{
+			case ListType:
+				final ListType toType = (ListType)unaryOperator.type();
+				final ListType fromType = (ListType)unaryOperator.child().type();
+				final String listStruct = String.format("struct struct_list_%1$s", CadpType.DumpType(fromType.innerType()).replaceAll(" ", "_"));
+
+				if (!(fromType.innerType().kind() == TypeKind.Null || CADPCastEquivalent(fromType.innerType(), toType.innerType())))
+					throw new UnsupportedOperationException(String.format("CADP Target does not support this type of cast: '%1$s' to '%2$s'", fromType.innerType().toString(), toType.innerType().toString()));
+				m_helperCode.AppendLine(String.format("%3$s %2$s(%1$s *toCast){", listStruct, result, resultTypeName));
+				m_helperCode.AppendLine(String.format("%1$s result;", resultTypeName));
+				m_helperCode.AppendLine(String.format("%1$s *tmp = toCast;", listStruct));
+				m_helperCode.AppendLine(String.format("int len = 0;"));
+				m_helperCode.AppendLine(String.format("result.length = 0;"));
+
+				m_helperCode.AppendLine("while (toCast != NULL)");
+				m_helperCode.AppendLine("{");
+				m_helperCode.AppendLine(String.format("    if (len < %1$s)", toType.maxNumberOfElements()));
+				m_helperCode.AppendLine("    {");
+				m_helperCode.AppendLine(String.format("memcpy(&result.elements[len],&(toCast->element),sizeof(%1$s));", CadpType.DumpType(toType.innerType())));
+				m_helperCode.AppendLine(String.format("result.length = len+1;"));
+				m_helperCode.AppendLine("    }");
+				m_helperCode.AppendLine("    else ");
+				m_helperCode.AppendLine("        CALC_INVALID = 1;");
+				m_helperCode.AppendLine("    len++;");
+				m_helperCode.AppendLine("    tmp = toCast->next;");
+				m_helperCode.AppendLine("    free(toCast);");
+				m_helperCode.AppendLine("    toCast = tmp;");
+				m_helperCode.AppendLine("}");
+				m_helperCode.AppendLine("    if (CALC_INVALID == 1)");
+				m_helperCode.AppendLine(String.format("        printf(\"\\n\\nCalculation invalid: Cast to smaller list in %1$s\\n\\n\");", result));
+
+
+				m_helperCode.AppendLine(String.format("int counter;"));
+				m_helperCode.AppendLine(String.format("for (counter = %1$s; counter >= result.length; counter--) {", toType.maxNumberOfElements() - 1));
+				m_helperCode.AppendLine(String.format("result.elements[counter] = %1$s%2$s(%3$s%2$s());}",
+						CadpType.enumString, CadpIdentifier.GetIdentifierString(toType.innerType().identifier()), CadpType.lowString));
+				m_helperCode.AppendLine("return result; }");
+
+
+				break;
+			default:
+				// no cast
+				return "";
+			}
+			emittedOperations.add(result);
+			return result;
+
+
+		}
+		else
+		{
+			final String childTypeName = CadpIdentifier.GetIdentifierString(unaryOperator.child().type().identifier());
+			final String resultTypeName = CadpIdentifier.GetIdentifierString(unaryOperator.type().identifier());
+			final String result = String.format("op_cast_%1$s_%2$s", childTypeName, resultTypeName);
+
+			if (emittedOperations.contains(result))
+				return result;
+
+			// emit target type
+			CadpType.EmitType(unaryOperator.type());
+
+			switch (unaryOperator.type().kind())
+			{
+			case ListType:
+				final ListType toType = (ListType)unaryOperator.type();
+				final ListType fromType = (ListType)unaryOperator.child().type();
+				if (!(fromType.innerType().kind() == TypeKind.Null || CADPCastEquivalent(fromType.innerType(), toType.innerType())))
+					throw new UnsupportedOperationException(String.format("CADP Target does not support this type of cast: '%1$s' to '%2$s'", fromType.innerType().toString(), toType.innerType().toString()));
+				m_helperCode.AppendLine(String.format("%3$s %2$s(%1$s toCast){", childTypeName, result, resultTypeName));
+				m_helperCode.AppendLine(String.format("%1$s result;", resultTypeName));
+				m_helperCode.AppendLine(String.format("if (toCast.length > %1$s) { printf(\"Cast to smaller list! %2$s\\n\"); ", toType.maxNumberOfElements(), result));
+				m_helperCode.AppendLine(String.format("%1$s%2$s(stdout, toCast); fflush(stdout); CALC_INVALID=1; result.length = %3$s;} else", CadpType.printString, childTypeName, toType.maxNumberOfElements()));
+				m_helperCode.AppendLine(String.format("result.length = toCast.length;"));
+				m_helperCode.AppendLine(String.format("if (result.length > 0)"));
+				m_helperCode.AppendLine(String.format("memcpy(result.elements,toCast.elements,result.length * sizeof(%1$s));", CadpType.DumpType(toType.innerType())));
+				m_helperCode.AppendLine(String.format("int counter;"));
+				m_helperCode.AppendLine(String.format("for (counter = %1$s; counter >= result.length; counter--) {", toType.maxNumberOfElements() - 1));
+				m_helperCode.AppendLine(String.format("result.elements[counter] = %1$s%2$s(%3$s%2$s());}",
+						CadpType.enumString, CadpIdentifier.GetIdentifierString(toType.innerType().identifier()), CadpType.lowString));
+				m_helperCode.AppendLine("return result; }");
+
+
+				break;
+			case OoActionSystemType:
+				if (unaryOperator.child().kind() == ExpressionKind.Value &&
+				(unaryOperator.child() instanceof ValueExpression<?>) &&
+				((ValueExpression<?>)unaryOperator.child()).value() == null)
+				{
+					m_emitter.Append(String.format("NULL_%1$s", CadpIdentifier.GetIdentifierString(unaryOperator.type().identifier())));
+					doSub.value = false;
+				}
+				else
+				{
+					doSub.value = true;
+					final CadpType targetType = new CadpType();
+					unaryOperator.type().Accept(targetType);
+					final CadpType sourceType = new CadpType();
+					unaryOperator.child().type().Accept(sourceType);
+					if (!(UlyssesType.Covariance((OoActionSystemType)unaryOperator.child().type(), (OoActionSystemType)unaryOperator.type())))
+					{
+						// cast result type (unaryOperator.type) not a sub-type of unaryOperator.child.type
+						return String.format("/* up-cast: %1$s as %2$s */ *(%2$s*)&", sourceType.ToString(), targetType.ToString());
+					}
+					else
+					{
+						return String.format(" /* down-cast: %1$s as %2$s */ *(%2$s*)&", sourceType.ToString(), targetType.ToString());
+					}
+
+				}
+				return "";
+			default:
+				// no cast
+				return "";
+			}
+			emittedOperations.add(result);
+			return result;
+		}
+	}
+
+	private String EmitTailOperation(UnaryOperator unaryOperator)
+	{
+		final String childTypeName = CadpIdentifier.GetIdentifierString(unaryOperator.child().type().identifier());
+		final String result = String.format("op_tail_%1$s", childTypeName);
+		if (emittedOperations.contains(result))
+			return result;
+
+		final ListType alist = (ListType)unaryOperator.child().type();
+		CadpType.EmitType(unaryOperator.type());
+		final String resultType = CadpIdentifier.GetIdentifierString(unaryOperator.type().identifier());
+		final ListType resultList = (ListType)unaryOperator.type();
+
+		// -- tail constructor
+		m_helperCode.AppendLine(String.format("%3$s %2$s(%1$s toCopy){", childTypeName, result, resultType));
+		m_helperCode.AppendLine(String.format("%1$s result;", resultType));
+		m_helperCode.AppendLine(String.format("if (toCopy.length == 0) { printf(\"Tail from empty list! %1$s\\n\"); abort();}", childTypeName));
+		m_helperCode.AppendLine(String.format("result.length = toCopy.length - 1;"));
+		m_helperCode.AppendLine(String.format("if (result.length == 0)"));
+		m_helperCode.AppendLine(String.format("memset(&result,0,sizeof(%1$s));", resultType));
+		m_helperCode.AppendLine(String.format("else"));
+		m_helperCode.AppendLine(String.format("memcpy(&result.elements[0],&toCopy.elements[1],result.length * sizeof(%1$s));", CadpType.DumpType(alist.innerType()), alist.maxNumberOfElements() - 1));
+
+		// in case our resulttype was set wider..
+		m_helperCode.AppendLine(String.format("int counter;"));
+		m_helperCode.AppendLine(String.format("for (counter = %1$s; counter >= result.length; counter--) {", resultList.maxNumberOfElements() - 1));
+		m_helperCode.AppendLine(String.format("result.elements[counter] = %1$s%2$s(%3$s%2$s());}",
+				CadpType.enumString, CadpIdentifier.GetIdentifierString(alist.innerType().identifier()), CadpType.lowString));
+
+
+		m_helperCode.AppendLine("return result; }");
+
+
+		emittedOperations.add(result);
+		return result;
+	}
+
+	public String VariableDeclarations()
+	{
+		return varDecl.toString();
+	}
+
+	@Override
+	public  String toString()
+	{
+		return m_emitter.toString();
+	}
+
+	public static String GetHelperCode()
+	{
+		final StringBuilder result = new StringBuilder(m_helperCode.toString());
+		result.append("void Model_Reset() {");
+		result.append(System.lineSeparator());
+		result.append(m_resetCode.toString());
+		result.append("}");
+		result.append(System.lineSeparator());
+		return result.toString();
+	}
+
+	public CadpExpression(CadpActionInfo aProcInfo)
+	{
+		if (aProcInfo == null)
+			throw new IllegalArgumentException();
+		m_procInfo = aProcInfo;
+	}
+
+
+	public CadpExpression(CadpActionInfo aProcInfo, HashSet<Identifier> varDecls)
+	{
+		if (aProcInfo == null)
+			throw new IllegalArgumentException();
+		m_procInfo = aProcInfo;
+		emittedVariabes.addAll(varDecls);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/gen/FunctionNames.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/gen/FunctionNames.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/gen/FunctionNames.java	(revision 2)
@@ -0,0 +1,1111 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: FunctionNames.proto
+
+package org.momut.ooas.codegen.ast.protobuf.gen;
+
+public final class FunctionNames {
+  private FunctionNames() {}
+  public static void registerAllExtensions(
+      com.google.protobuf.ExtensionRegistry registry) {
+  }
+  /**
+   * Protobuf enum {@code serialize.PBAdd}
+   */
+  public enum PBAdd
+      implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <code>TIRESIAS_ADD_IDENTIFIERTOLIST = 0;</code>
+     */
+    TIRESIAS_ADD_IDENTIFIERTOLIST(0, 0),
+    /**
+     * <code>TIRESIAS_ADD_TYPETOLIST = 1;</code>
+     */
+    TIRESIAS_ADD_TYPETOLIST(1, 1),
+    /**
+     * <code>TIRESIAS_ADD_STATEMENTTOLIST = 2;</code>
+     */
+    TIRESIAS_ADD_STATEMENTTOLIST(2, 2),
+    /**
+     * <code>TIRESIAS_ADD_EXPRESSIONTOLIST = 3;</code>
+     */
+    TIRESIAS_ADD_EXPRESSIONTOLIST(3, 3),
+    /**
+     * <code>TIRESIAS_ADD_IDTOSYMBTAB = 4;</code>
+     */
+    TIRESIAS_ADD_IDTOSYMBTAB(4, 4),
+    /**
+     * <code>TIRESIAS_ADD_PARAMTOLIST = 5;</code>
+     */
+    TIRESIAS_ADD_PARAMTOLIST(5, 5),
+    /**
+     * <code>TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST = 6;</code>
+     */
+    TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST(6, 6),
+    /**
+     * <code>TIRESIAS_ADD_IDENTIFIERTOBLOCK = 7;</code>
+     */
+    TIRESIAS_ADD_IDENTIFIERTOBLOCK(7, 7),
+    ;
+
+    /**
+     * <code>TIRESIAS_ADD_IDENTIFIERTOLIST = 0;</code>
+     */
+    public static final int TIRESIAS_ADD_IDENTIFIERTOLIST_VALUE = 0;
+    /**
+     * <code>TIRESIAS_ADD_TYPETOLIST = 1;</code>
+     */
+    public static final int TIRESIAS_ADD_TYPETOLIST_VALUE = 1;
+    /**
+     * <code>TIRESIAS_ADD_STATEMENTTOLIST = 2;</code>
+     */
+    public static final int TIRESIAS_ADD_STATEMENTTOLIST_VALUE = 2;
+    /**
+     * <code>TIRESIAS_ADD_EXPRESSIONTOLIST = 3;</code>
+     */
+    public static final int TIRESIAS_ADD_EXPRESSIONTOLIST_VALUE = 3;
+    /**
+     * <code>TIRESIAS_ADD_IDTOSYMBTAB = 4;</code>
+     */
+    public static final int TIRESIAS_ADD_IDTOSYMBTAB_VALUE = 4;
+    /**
+     * <code>TIRESIAS_ADD_PARAMTOLIST = 5;</code>
+     */
+    public static final int TIRESIAS_ADD_PARAMTOLIST_VALUE = 5;
+    /**
+     * <code>TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST = 6;</code>
+     */
+    public static final int TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST_VALUE = 6;
+    /**
+     * <code>TIRESIAS_ADD_IDENTIFIERTOBLOCK = 7;</code>
+     */
+    public static final int TIRESIAS_ADD_IDENTIFIERTOBLOCK_VALUE = 7;
+
+
+    public final int getNumber() { return value; }
+
+    public static PBAdd valueOf(int value) {
+      switch (value) {
+        case 0: return TIRESIAS_ADD_IDENTIFIERTOLIST;
+        case 1: return TIRESIAS_ADD_TYPETOLIST;
+        case 2: return TIRESIAS_ADD_STATEMENTTOLIST;
+        case 3: return TIRESIAS_ADD_EXPRESSIONTOLIST;
+        case 4: return TIRESIAS_ADD_IDTOSYMBTAB;
+        case 5: return TIRESIAS_ADD_PARAMTOLIST;
+        case 6: return TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST;
+        case 7: return TIRESIAS_ADD_IDENTIFIERTOBLOCK;
+        default: return null;
+      }
+    }
+
+    public static com.google.protobuf.Internal.EnumLiteMap<PBAdd>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static com.google.protobuf.Internal.EnumLiteMap<PBAdd>
+        internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<PBAdd>() {
+            public PBAdd findValueByNumber(int number) {
+              return PBAdd.valueOf(number);
+            }
+          };
+
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
+      return getDescriptor().getValues().get(index);
+    }
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
+      return getDescriptor();
+    }
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.getDescriptor().getEnumTypes().get(0);
+    }
+
+    private static final PBAdd[] VALUES = values();
+
+    public static PBAdd valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      if (desc.getType() != getDescriptor()) {
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
+      }
+      return VALUES[desc.getIndex()];
+    }
+
+    private final int index;
+    private final int value;
+
+    private PBAdd(int index, int value) {
+      this.index = index;
+      this.value = value;
+    }
+
+    // @@protoc_insertion_point(enum_scope:serialize.PBAdd)
+  }
+
+  /**
+   * Protobuf enum {@code serialize.PBAllocation}
+   */
+  public enum PBAllocation
+      implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <code>TIRESIAS_CREATE_IDENTIFIER = 0;</code>
+     */
+    TIRESIAS_CREATE_IDENTIFIER(0, 0),
+    /**
+     * <code>TIRESIAS_CREATE_TYPE = 1;</code>
+     */
+    TIRESIAS_CREATE_TYPE(1, 1),
+    /**
+     * <code>TIRESIAS_CREATE_STATEMENT = 2;</code>
+     */
+    TIRESIAS_CREATE_STATEMENT(2, 2),
+    /**
+     * <code>TIRESIAS_CREATE_EXPRESSION = 3;</code>
+     */
+    TIRESIAS_CREATE_EXPRESSION(3, 3),
+    /**
+     * <code>TIRESIAS_CREATE_STATEMENTLIST = 4;</code>
+     */
+    TIRESIAS_CREATE_STATEMENTLIST(4, 4),
+    /**
+     * <code>TIRESIAS_CREATE_EXPRESSIONLIST = 5;</code>
+     */
+    TIRESIAS_CREATE_EXPRESSIONLIST(5, 5),
+    /**
+     * <code>TIRESIAS_CREATE_IDENTIFIERLIST = 6;</code>
+     */
+    TIRESIAS_CREATE_IDENTIFIERLIST(6, 6),
+    /**
+     * <code>TIRESIAS_CREATE_SYMBTAB = 7;</code>
+     */
+    TIRESIAS_CREATE_SYMBTAB(7, 7),
+    /**
+     * <code>TIRESIAS_CREATE_PARAMLIST = 8;</code>
+     */
+    TIRESIAS_CREATE_PARAMLIST(8, 8),
+    /**
+     * <code>TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE = 9;</code>
+     */
+    TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE(9, 9),
+    /**
+     * <code>TIRESIAS_CREATE_TYPELIST = 10;</code>
+     */
+    TIRESIAS_CREATE_TYPELIST(10, 10),
+    /**
+     * <code>TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST = 11;</code>
+     */
+    TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST(11, 11),
+    /**
+     * <code>TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE = 12;</code>
+     */
+    TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE(12, 12),
+    ;
+
+    /**
+     * <code>TIRESIAS_CREATE_IDENTIFIER = 0;</code>
+     */
+    public static final int TIRESIAS_CREATE_IDENTIFIER_VALUE = 0;
+    /**
+     * <code>TIRESIAS_CREATE_TYPE = 1;</code>
+     */
+    public static final int TIRESIAS_CREATE_TYPE_VALUE = 1;
+    /**
+     * <code>TIRESIAS_CREATE_STATEMENT = 2;</code>
+     */
+    public static final int TIRESIAS_CREATE_STATEMENT_VALUE = 2;
+    /**
+     * <code>TIRESIAS_CREATE_EXPRESSION = 3;</code>
+     */
+    public static final int TIRESIAS_CREATE_EXPRESSION_VALUE = 3;
+    /**
+     * <code>TIRESIAS_CREATE_STATEMENTLIST = 4;</code>
+     */
+    public static final int TIRESIAS_CREATE_STATEMENTLIST_VALUE = 4;
+    /**
+     * <code>TIRESIAS_CREATE_EXPRESSIONLIST = 5;</code>
+     */
+    public static final int TIRESIAS_CREATE_EXPRESSIONLIST_VALUE = 5;
+    /**
+     * <code>TIRESIAS_CREATE_IDENTIFIERLIST = 6;</code>
+     */
+    public static final int TIRESIAS_CREATE_IDENTIFIERLIST_VALUE = 6;
+    /**
+     * <code>TIRESIAS_CREATE_SYMBTAB = 7;</code>
+     */
+    public static final int TIRESIAS_CREATE_SYMBTAB_VALUE = 7;
+    /**
+     * <code>TIRESIAS_CREATE_PARAMLIST = 8;</code>
+     */
+    public static final int TIRESIAS_CREATE_PARAMLIST_VALUE = 8;
+    /**
+     * <code>TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE = 9;</code>
+     */
+    public static final int TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE_VALUE = 9;
+    /**
+     * <code>TIRESIAS_CREATE_TYPELIST = 10;</code>
+     */
+    public static final int TIRESIAS_CREATE_TYPELIST_VALUE = 10;
+    /**
+     * <code>TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST = 11;</code>
+     */
+    public static final int TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST_VALUE = 11;
+    /**
+     * <code>TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE = 12;</code>
+     */
+    public static final int TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE_VALUE = 12;
+
+
+    public final int getNumber() { return value; }
+
+    public static PBAllocation valueOf(int value) {
+      switch (value) {
+        case 0: return TIRESIAS_CREATE_IDENTIFIER;
+        case 1: return TIRESIAS_CREATE_TYPE;
+        case 2: return TIRESIAS_CREATE_STATEMENT;
+        case 3: return TIRESIAS_CREATE_EXPRESSION;
+        case 4: return TIRESIAS_CREATE_STATEMENTLIST;
+        case 5: return TIRESIAS_CREATE_EXPRESSIONLIST;
+        case 6: return TIRESIAS_CREATE_IDENTIFIERLIST;
+        case 7: return TIRESIAS_CREATE_SYMBTAB;
+        case 8: return TIRESIAS_CREATE_PARAMLIST;
+        case 9: return TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE;
+        case 10: return TIRESIAS_CREATE_TYPELIST;
+        case 11: return TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST;
+        case 12: return TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE;
+        default: return null;
+      }
+    }
+
+    public static com.google.protobuf.Internal.EnumLiteMap<PBAllocation>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static com.google.protobuf.Internal.EnumLiteMap<PBAllocation>
+        internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<PBAllocation>() {
+            public PBAllocation findValueByNumber(int number) {
+              return PBAllocation.valueOf(number);
+            }
+          };
+
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
+      return getDescriptor().getValues().get(index);
+    }
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
+      return getDescriptor();
+    }
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.getDescriptor().getEnumTypes().get(1);
+    }
+
+    private static final PBAllocation[] VALUES = values();
+
+    public static PBAllocation valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      if (desc.getType() != getDescriptor()) {
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
+      }
+      return VALUES[desc.getIndex()];
+    }
+
+    private final int index;
+    private final int value;
+
+    private PBAllocation(int index, int value) {
+      this.index = index;
+      this.value = value;
+    }
+
+    // @@protoc_insertion_point(enum_scope:serialize.PBAllocation)
+  }
+
+  /**
+   * Protobuf enum {@code serialize.PBIdentifiers}
+   */
+  public enum PBIdentifiers
+      implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <code>TIRESIAS_INIT_ENUMIDENTIFIER = 1;</code>
+     */
+    TIRESIAS_INIT_ENUMIDENTIFIER(0, 1),
+    /**
+     * <code>TIRESIAS_INIT_CONSTIDENTIFIER = 2;</code>
+     */
+    TIRESIAS_INIT_CONSTIDENTIFIER(1, 2),
+    /**
+     * <code>TIRESIAS_INIT_ATTRIDENTIFIER = 3;</code>
+     */
+    TIRESIAS_INIT_ATTRIDENTIFIER(2, 3),
+    /**
+     * <code>TIRESIAS_INIT_EXPRVARIDENTIFIER = 4;</code>
+     */
+    TIRESIAS_INIT_EXPRVARIDENTIFIER(3, 4),
+    /**
+     * <code>TIRESIAS_INIT_PARAMIDENTIFIER = 5;</code>
+     */
+    TIRESIAS_INIT_PARAMIDENTIFIER(4, 5),
+    /**
+     * <code>TIRESIAS_INIT_LOCVARIDENTIFIER = 6;</code>
+     */
+    TIRESIAS_INIT_LOCVARIDENTIFIER(5, 6),
+    /**
+     * <code>TIRESIAS_INIT_TYPEIDENTIFIER = 7;</code>
+     */
+    TIRESIAS_INIT_TYPEIDENTIFIER(6, 7),
+    /**
+     * <code>TIRESIAS_INIT_SELFIDENTIFIER = 8;</code>
+     */
+    TIRESIAS_INIT_SELFIDENTIFIER(7, 8),
+    /**
+     * <code>TIRESIAS_INIT_METHODIDENTIFIER = 9;</code>
+     */
+    TIRESIAS_INIT_METHODIDENTIFIER(8, 9),
+    /**
+     * <code>TIRESIAS_INIT_MODULE = 10;</code>
+     */
+    TIRESIAS_INIT_MODULE(9, 10),
+    /**
+     * <code>TIRESIAS_INIT_MAINMODULE = 0;</code>
+     */
+    TIRESIAS_INIT_MAINMODULE(10, 0),
+    ;
+
+    /**
+     * <code>TIRESIAS_INIT_ENUMIDENTIFIER = 1;</code>
+     */
+    public static final int TIRESIAS_INIT_ENUMIDENTIFIER_VALUE = 1;
+    /**
+     * <code>TIRESIAS_INIT_CONSTIDENTIFIER = 2;</code>
+     */
+    public static final int TIRESIAS_INIT_CONSTIDENTIFIER_VALUE = 2;
+    /**
+     * <code>TIRESIAS_INIT_ATTRIDENTIFIER = 3;</code>
+     */
+    public static final int TIRESIAS_INIT_ATTRIDENTIFIER_VALUE = 3;
+    /**
+     * <code>TIRESIAS_INIT_EXPRVARIDENTIFIER = 4;</code>
+     */
+    public static final int TIRESIAS_INIT_EXPRVARIDENTIFIER_VALUE = 4;
+    /**
+     * <code>TIRESIAS_INIT_PARAMIDENTIFIER = 5;</code>
+     */
+    public static final int TIRESIAS_INIT_PARAMIDENTIFIER_VALUE = 5;
+    /**
+     * <code>TIRESIAS_INIT_LOCVARIDENTIFIER = 6;</code>
+     */
+    public static final int TIRESIAS_INIT_LOCVARIDENTIFIER_VALUE = 6;
+    /**
+     * <code>TIRESIAS_INIT_TYPEIDENTIFIER = 7;</code>
+     */
+    public static final int TIRESIAS_INIT_TYPEIDENTIFIER_VALUE = 7;
+    /**
+     * <code>TIRESIAS_INIT_SELFIDENTIFIER = 8;</code>
+     */
+    public static final int TIRESIAS_INIT_SELFIDENTIFIER_VALUE = 8;
+    /**
+     * <code>TIRESIAS_INIT_METHODIDENTIFIER = 9;</code>
+     */
+    public static final int TIRESIAS_INIT_METHODIDENTIFIER_VALUE = 9;
+    /**
+     * <code>TIRESIAS_INIT_MODULE = 10;</code>
+     */
+    public static final int TIRESIAS_INIT_MODULE_VALUE = 10;
+    /**
+     * <code>TIRESIAS_INIT_MAINMODULE = 0;</code>
+     */
+    public static final int TIRESIAS_INIT_MAINMODULE_VALUE = 0;
+
+
+    public final int getNumber() { return value; }
+
+    public static PBIdentifiers valueOf(int value) {
+      switch (value) {
+        case 1: return TIRESIAS_INIT_ENUMIDENTIFIER;
+        case 2: return TIRESIAS_INIT_CONSTIDENTIFIER;
+        case 3: return TIRESIAS_INIT_ATTRIDENTIFIER;
+        case 4: return TIRESIAS_INIT_EXPRVARIDENTIFIER;
+        case 5: return TIRESIAS_INIT_PARAMIDENTIFIER;
+        case 6: return TIRESIAS_INIT_LOCVARIDENTIFIER;
+        case 7: return TIRESIAS_INIT_TYPEIDENTIFIER;
+        case 8: return TIRESIAS_INIT_SELFIDENTIFIER;
+        case 9: return TIRESIAS_INIT_METHODIDENTIFIER;
+        case 10: return TIRESIAS_INIT_MODULE;
+        case 0: return TIRESIAS_INIT_MAINMODULE;
+        default: return null;
+      }
+    }
+
+    public static com.google.protobuf.Internal.EnumLiteMap<PBIdentifiers>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static com.google.protobuf.Internal.EnumLiteMap<PBIdentifiers>
+        internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<PBIdentifiers>() {
+            public PBIdentifiers findValueByNumber(int number) {
+              return PBIdentifiers.valueOf(number);
+            }
+          };
+
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
+      return getDescriptor().getValues().get(index);
+    }
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
+      return getDescriptor();
+    }
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.getDescriptor().getEnumTypes().get(2);
+    }
+
+    private static final PBIdentifiers[] VALUES = values();
+
+    public static PBIdentifiers valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      if (desc.getType() != getDescriptor()) {
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
+      }
+      return VALUES[desc.getIndex()];
+    }
+
+    private final int index;
+    private final int value;
+
+    private PBIdentifiers(int index, int value) {
+      this.index = index;
+      this.value = value;
+    }
+
+    // @@protoc_insertion_point(enum_scope:serialize.PBIdentifiers)
+  }
+
+  /**
+   * Protobuf enum {@code serialize.PBTypes}
+   */
+  public enum PBTypes
+      implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <code>TIRESIAS_INIT_INTTYPE = 1;</code>
+     */
+    TIRESIAS_INIT_INTTYPE(0, 1),
+    /**
+     * <code>TIRESIAS_INIT_BOOLTYPE = 2;</code>
+     */
+    TIRESIAS_INIT_BOOLTYPE(1, 2),
+    /**
+     * <code>TIRESIAS_INIT_VALUEDENUMTYPE = 3;</code>
+     */
+    TIRESIAS_INIT_VALUEDENUMTYPE(2, 3),
+    /**
+     * <code>TIRESIAS_INIT_ENUMTYPE = 4;</code>
+     */
+    TIRESIAS_INIT_ENUMTYPE(3, 4),
+    /**
+     * <code>TIRESIAS_INIT_LISTTYPE = 5;</code>
+     */
+    TIRESIAS_INIT_LISTTYPE(4, 5),
+    /**
+     * <code>TIRESIAS_INIT_TUPLETYPE = 6;</code>
+     */
+    TIRESIAS_INIT_TUPLETYPE(5, 6),
+    /**
+     * <code>TIRESIAS_INIT_FUNCTIONTYPE = 7;</code>
+     */
+    TIRESIAS_INIT_FUNCTIONTYPE(6, 7),
+    /**
+     * <code>TIRESIAS_INIT_ACTIONSYSTEMINSTANCE = 8;</code>
+     */
+    TIRESIAS_INIT_ACTIONSYSTEMINSTANCE(7, 8),
+    /**
+     * <code>TIRESIAS_INIT_ACTIONSYSTEMTYPE = 9;</code>
+     */
+    TIRESIAS_INIT_ACTIONSYSTEMTYPE(8, 9),
+    /**
+     * <code>TIRESIAS_INIT_NULLTYPE = 0;</code>
+     */
+    TIRESIAS_INIT_NULLTYPE(9, 0),
+    ;
+
+    /**
+     * <code>TIRESIAS_INIT_INTTYPE = 1;</code>
+     */
+    public static final int TIRESIAS_INIT_INTTYPE_VALUE = 1;
+    /**
+     * <code>TIRESIAS_INIT_BOOLTYPE = 2;</code>
+     */
+    public static final int TIRESIAS_INIT_BOOLTYPE_VALUE = 2;
+    /**
+     * <code>TIRESIAS_INIT_VALUEDENUMTYPE = 3;</code>
+     */
+    public static final int TIRESIAS_INIT_VALUEDENUMTYPE_VALUE = 3;
+    /**
+     * <code>TIRESIAS_INIT_ENUMTYPE = 4;</code>
+     */
+    public static final int TIRESIAS_INIT_ENUMTYPE_VALUE = 4;
+    /**
+     * <code>TIRESIAS_INIT_LISTTYPE = 5;</code>
+     */
+    public static final int TIRESIAS_INIT_LISTTYPE_VALUE = 5;
+    /**
+     * <code>TIRESIAS_INIT_TUPLETYPE = 6;</code>
+     */
+    public static final int TIRESIAS_INIT_TUPLETYPE_VALUE = 6;
+    /**
+     * <code>TIRESIAS_INIT_FUNCTIONTYPE = 7;</code>
+     */
+    public static final int TIRESIAS_INIT_FUNCTIONTYPE_VALUE = 7;
+    /**
+     * <code>TIRESIAS_INIT_ACTIONSYSTEMINSTANCE = 8;</code>
+     */
+    public static final int TIRESIAS_INIT_ACTIONSYSTEMINSTANCE_VALUE = 8;
+    /**
+     * <code>TIRESIAS_INIT_ACTIONSYSTEMTYPE = 9;</code>
+     */
+    public static final int TIRESIAS_INIT_ACTIONSYSTEMTYPE_VALUE = 9;
+    /**
+     * <code>TIRESIAS_INIT_NULLTYPE = 0;</code>
+     */
+    public static final int TIRESIAS_INIT_NULLTYPE_VALUE = 0;
+
+
+    public final int getNumber() { return value; }
+
+    public static PBTypes valueOf(int value) {
+      switch (value) {
+        case 1: return TIRESIAS_INIT_INTTYPE;
+        case 2: return TIRESIAS_INIT_BOOLTYPE;
+        case 3: return TIRESIAS_INIT_VALUEDENUMTYPE;
+        case 4: return TIRESIAS_INIT_ENUMTYPE;
+        case 5: return TIRESIAS_INIT_LISTTYPE;
+        case 6: return TIRESIAS_INIT_TUPLETYPE;
+        case 7: return TIRESIAS_INIT_FUNCTIONTYPE;
+        case 8: return TIRESIAS_INIT_ACTIONSYSTEMINSTANCE;
+        case 9: return TIRESIAS_INIT_ACTIONSYSTEMTYPE;
+        case 0: return TIRESIAS_INIT_NULLTYPE;
+        default: return null;
+      }
+    }
+
+    public static com.google.protobuf.Internal.EnumLiteMap<PBTypes>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static com.google.protobuf.Internal.EnumLiteMap<PBTypes>
+        internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<PBTypes>() {
+            public PBTypes findValueByNumber(int number) {
+              return PBTypes.valueOf(number);
+            }
+          };
+
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
+      return getDescriptor().getValues().get(index);
+    }
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
+      return getDescriptor();
+    }
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.getDescriptor().getEnumTypes().get(3);
+    }
+
+    private static final PBTypes[] VALUES = values();
+
+    public static PBTypes valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      if (desc.getType() != getDescriptor()) {
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
+      }
+      return VALUES[desc.getIndex()];
+    }
+
+    private final int index;
+    private final int value;
+
+    private PBTypes(int index, int value) {
+      this.index = index;
+      this.value = value;
+    }
+
+    // @@protoc_insertion_point(enum_scope:serialize.PBTypes)
+  }
+
+  /**
+   * Protobuf enum {@code serialize.PBStatements}
+   */
+  public enum PBStatements
+      implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <code>TIRESIAS_INIT_SKIP = 3;</code>
+     */
+    TIRESIAS_INIT_SKIP(0, 3),
+    /**
+     * <code>TIRESIAS_INIT_BREAK = 4;</code>
+     */
+    TIRESIAS_INIT_BREAK(1, 4),
+    /**
+     * <code>TIRESIAS_INIT_ABORT = 5;</code>
+     */
+    TIRESIAS_INIT_ABORT(2, 5),
+    /**
+     * <code>TIRESIAS_INIT_NONDETBLOCK = 6;</code>
+     */
+    TIRESIAS_INIT_NONDETBLOCK(3, 6),
+    /**
+     * <code>TIRESIAS_INIT_SEQBLOCK = 7;</code>
+     */
+    TIRESIAS_INIT_SEQBLOCK(4, 7),
+    /**
+     * <code>TIRESIAS_INIT_PRIOBLOCK = 8;</code>
+     */
+    TIRESIAS_INIT_PRIOBLOCK(5, 8),
+    /**
+     * <code>TIRESIAS_INIT_GUARDEDCOMMAND = 2;</code>
+     */
+    TIRESIAS_INIT_GUARDEDCOMMAND(6, 2),
+    /**
+     * <code>TIRESIAS_INIT_ASSIGNMENT = 1;</code>
+     */
+    TIRESIAS_INIT_ASSIGNMENT(7, 1),
+    /**
+     * <code>TIRESIAS_INIT_CALL = 0;</code>
+     */
+    TIRESIAS_INIT_CALL(8, 0),
+    ;
+
+    /**
+     * <code>TIRESIAS_INIT_SKIP = 3;</code>
+     */
+    public static final int TIRESIAS_INIT_SKIP_VALUE = 3;
+    /**
+     * <code>TIRESIAS_INIT_BREAK = 4;</code>
+     */
+    public static final int TIRESIAS_INIT_BREAK_VALUE = 4;
+    /**
+     * <code>TIRESIAS_INIT_ABORT = 5;</code>
+     */
+    public static final int TIRESIAS_INIT_ABORT_VALUE = 5;
+    /**
+     * <code>TIRESIAS_INIT_NONDETBLOCK = 6;</code>
+     */
+    public static final int TIRESIAS_INIT_NONDETBLOCK_VALUE = 6;
+    /**
+     * <code>TIRESIAS_INIT_SEQBLOCK = 7;</code>
+     */
+    public static final int TIRESIAS_INIT_SEQBLOCK_VALUE = 7;
+    /**
+     * <code>TIRESIAS_INIT_PRIOBLOCK = 8;</code>
+     */
+    public static final int TIRESIAS_INIT_PRIOBLOCK_VALUE = 8;
+    /**
+     * <code>TIRESIAS_INIT_GUARDEDCOMMAND = 2;</code>
+     */
+    public static final int TIRESIAS_INIT_GUARDEDCOMMAND_VALUE = 2;
+    /**
+     * <code>TIRESIAS_INIT_ASSIGNMENT = 1;</code>
+     */
+    public static final int TIRESIAS_INIT_ASSIGNMENT_VALUE = 1;
+    /**
+     * <code>TIRESIAS_INIT_CALL = 0;</code>
+     */
+    public static final int TIRESIAS_INIT_CALL_VALUE = 0;
+
+
+    public final int getNumber() { return value; }
+
+    public static PBStatements valueOf(int value) {
+      switch (value) {
+        case 3: return TIRESIAS_INIT_SKIP;
+        case 4: return TIRESIAS_INIT_BREAK;
+        case 5: return TIRESIAS_INIT_ABORT;
+        case 6: return TIRESIAS_INIT_NONDETBLOCK;
+        case 7: return TIRESIAS_INIT_SEQBLOCK;
+        case 8: return TIRESIAS_INIT_PRIOBLOCK;
+        case 2: return TIRESIAS_INIT_GUARDEDCOMMAND;
+        case 1: return TIRESIAS_INIT_ASSIGNMENT;
+        case 0: return TIRESIAS_INIT_CALL;
+        default: return null;
+      }
+    }
+
+    public static com.google.protobuf.Internal.EnumLiteMap<PBStatements>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static com.google.protobuf.Internal.EnumLiteMap<PBStatements>
+        internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<PBStatements>() {
+            public PBStatements findValueByNumber(int number) {
+              return PBStatements.valueOf(number);
+            }
+          };
+
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
+      return getDescriptor().getValues().get(index);
+    }
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
+      return getDescriptor();
+    }
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.getDescriptor().getEnumTypes().get(4);
+    }
+
+    private static final PBStatements[] VALUES = values();
+
+    public static PBStatements valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      if (desc.getType() != getDescriptor()) {
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
+      }
+      return VALUES[desc.getIndex()];
+    }
+
+    private final int index;
+    private final int value;
+
+    private PBStatements(int index, int value) {
+      this.index = index;
+      this.value = value;
+    }
+
+    // @@protoc_insertion_point(enum_scope:serialize.PBStatements)
+  }
+
+  /**
+   * Protobuf enum {@code serialize.PBExpressions}
+   */
+  public enum PBExpressions
+      implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <code>TIRESIAS_INIT_TYPEEXPRESSION = 4;</code>
+     */
+    TIRESIAS_INIT_TYPEEXPRESSION(0, 4),
+    /**
+     * <code>TIRESIAS_INIT_IDENTIFIEREXPRESSION = 5;</code>
+     */
+    TIRESIAS_INIT_IDENTIFIEREXPRESSION(1, 5),
+    /**
+     * <code>TIRESIAS_INIT_UNARYEXPRESSION = 6;</code>
+     */
+    TIRESIAS_INIT_UNARYEXPRESSION(2, 6),
+    /**
+     * <code>TIRESIAS_INIT_BINARYEXPRESSION = 7;</code>
+     */
+    TIRESIAS_INIT_BINARYEXPRESSION(3, 7),
+    /**
+     * <code>TIRESIAS_INIT_TERNARYEXPRESSION = 8;</code>
+     */
+    TIRESIAS_INIT_TERNARYEXPRESSION(4, 8),
+    /**
+     * <code>TIRESIAS_INIT_INTVALUEEXPRESSION = 9;</code>
+     */
+    TIRESIAS_INIT_INTVALUEEXPRESSION(5, 9),
+    /**
+     * <code>TIRESIAS_INIT_BOOLVALUEEXPRESSION = 10;</code>
+     */
+    TIRESIAS_INIT_BOOLVALUEEXPRESSION(6, 10),
+    /**
+     * <code>TIRESIAS_INIT_REFVALUEEXPRESSION = 11;</code>
+     */
+    TIRESIAS_INIT_REFVALUEEXPRESSION(7, 11),
+    /**
+     * <code>TIRESIAS_INIT_LISTCONSTRUCTOR = 12;</code>
+     */
+    TIRESIAS_INIT_LISTCONSTRUCTOR(8, 12),
+    /**
+     * <code>TIRESIAS_INIT_SETCONSTRUCTOR = 13;</code>
+     */
+    TIRESIAS_INIT_SETCONSTRUCTOR(9, 13),
+    /**
+     * <code>TIRESIAS_INIT_TUPLECONSTRUCTOR = 14;</code>
+     */
+    TIRESIAS_INIT_TUPLECONSTRUCTOR(10, 14),
+    /**
+     * <code>TIRESIAS_INIT_ACCESSEXPRESSION = 15;</code>
+     */
+    TIRESIAS_INIT_ACCESSEXPRESSION(11, 15),
+    /**
+     * <code>TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION = 3;</code>
+     */
+    TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION(12, 3),
+    /**
+     * <code>TIRESIAS_INIT_CALLEXPRESSION = 2;</code>
+     */
+    TIRESIAS_INIT_CALLEXPRESSION(13, 2),
+    /**
+     * <code>TIRESIAS_INIT_QUANTIFIEREXPRESSION = 1;</code>
+     */
+    TIRESIAS_INIT_QUANTIFIEREXPRESSION(14, 1),
+    /**
+     * <code>TIRESIAS_INIT_OBJECTCONSTRUCTOR = 0;</code>
+     */
+    TIRESIAS_INIT_OBJECTCONSTRUCTOR(15, 0),
+    ;
+
+    /**
+     * <code>TIRESIAS_INIT_TYPEEXPRESSION = 4;</code>
+     */
+    public static final int TIRESIAS_INIT_TYPEEXPRESSION_VALUE = 4;
+    /**
+     * <code>TIRESIAS_INIT_IDENTIFIEREXPRESSION = 5;</code>
+     */
+    public static final int TIRESIAS_INIT_IDENTIFIEREXPRESSION_VALUE = 5;
+    /**
+     * <code>TIRESIAS_INIT_UNARYEXPRESSION = 6;</code>
+     */
+    public static final int TIRESIAS_INIT_UNARYEXPRESSION_VALUE = 6;
+    /**
+     * <code>TIRESIAS_INIT_BINARYEXPRESSION = 7;</code>
+     */
+    public static final int TIRESIAS_INIT_BINARYEXPRESSION_VALUE = 7;
+    /**
+     * <code>TIRESIAS_INIT_TERNARYEXPRESSION = 8;</code>
+     */
+    public static final int TIRESIAS_INIT_TERNARYEXPRESSION_VALUE = 8;
+    /**
+     * <code>TIRESIAS_INIT_INTVALUEEXPRESSION = 9;</code>
+     */
+    public static final int TIRESIAS_INIT_INTVALUEEXPRESSION_VALUE = 9;
+    /**
+     * <code>TIRESIAS_INIT_BOOLVALUEEXPRESSION = 10;</code>
+     */
+    public static final int TIRESIAS_INIT_BOOLVALUEEXPRESSION_VALUE = 10;
+    /**
+     * <code>TIRESIAS_INIT_REFVALUEEXPRESSION = 11;</code>
+     */
+    public static final int TIRESIAS_INIT_REFVALUEEXPRESSION_VALUE = 11;
+    /**
+     * <code>TIRESIAS_INIT_LISTCONSTRUCTOR = 12;</code>
+     */
+    public static final int TIRESIAS_INIT_LISTCONSTRUCTOR_VALUE = 12;
+    /**
+     * <code>TIRESIAS_INIT_SETCONSTRUCTOR = 13;</code>
+     */
+    public static final int TIRESIAS_INIT_SETCONSTRUCTOR_VALUE = 13;
+    /**
+     * <code>TIRESIAS_INIT_TUPLECONSTRUCTOR = 14;</code>
+     */
+    public static final int TIRESIAS_INIT_TUPLECONSTRUCTOR_VALUE = 14;
+    /**
+     * <code>TIRESIAS_INIT_ACCESSEXPRESSION = 15;</code>
+     */
+    public static final int TIRESIAS_INIT_ACCESSEXPRESSION_VALUE = 15;
+    /**
+     * <code>TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION = 3;</code>
+     */
+    public static final int TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION_VALUE = 3;
+    /**
+     * <code>TIRESIAS_INIT_CALLEXPRESSION = 2;</code>
+     */
+    public static final int TIRESIAS_INIT_CALLEXPRESSION_VALUE = 2;
+    /**
+     * <code>TIRESIAS_INIT_QUANTIFIEREXPRESSION = 1;</code>
+     */
+    public static final int TIRESIAS_INIT_QUANTIFIEREXPRESSION_VALUE = 1;
+    /**
+     * <code>TIRESIAS_INIT_OBJECTCONSTRUCTOR = 0;</code>
+     */
+    public static final int TIRESIAS_INIT_OBJECTCONSTRUCTOR_VALUE = 0;
+
+
+    public final int getNumber() { return value; }
+
+    public static PBExpressions valueOf(int value) {
+      switch (value) {
+        case 4: return TIRESIAS_INIT_TYPEEXPRESSION;
+        case 5: return TIRESIAS_INIT_IDENTIFIEREXPRESSION;
+        case 6: return TIRESIAS_INIT_UNARYEXPRESSION;
+        case 7: return TIRESIAS_INIT_BINARYEXPRESSION;
+        case 8: return TIRESIAS_INIT_TERNARYEXPRESSION;
+        case 9: return TIRESIAS_INIT_INTVALUEEXPRESSION;
+        case 10: return TIRESIAS_INIT_BOOLVALUEEXPRESSION;
+        case 11: return TIRESIAS_INIT_REFVALUEEXPRESSION;
+        case 12: return TIRESIAS_INIT_LISTCONSTRUCTOR;
+        case 13: return TIRESIAS_INIT_SETCONSTRUCTOR;
+        case 14: return TIRESIAS_INIT_TUPLECONSTRUCTOR;
+        case 15: return TIRESIAS_INIT_ACCESSEXPRESSION;
+        case 3: return TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION;
+        case 2: return TIRESIAS_INIT_CALLEXPRESSION;
+        case 1: return TIRESIAS_INIT_QUANTIFIEREXPRESSION;
+        case 0: return TIRESIAS_INIT_OBJECTCONSTRUCTOR;
+        default: return null;
+      }
+    }
+
+    public static com.google.protobuf.Internal.EnumLiteMap<PBExpressions>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static com.google.protobuf.Internal.EnumLiteMap<PBExpressions>
+        internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<PBExpressions>() {
+            public PBExpressions findValueByNumber(int number) {
+              return PBExpressions.valueOf(number);
+            }
+          };
+
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
+      return getDescriptor().getValues().get(index);
+    }
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
+      return getDescriptor();
+    }
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
+      return org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.getDescriptor().getEnumTypes().get(5);
+    }
+
+    private static final PBExpressions[] VALUES = values();
+
+    public static PBExpressions valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      if (desc.getType() != getDescriptor()) {
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
+      }
+      return VALUES[desc.getIndex()];
+    }
+
+    private final int index;
+    private final int value;
+
+    private PBExpressions(int index, int value) {
+      this.index = index;
+      this.value = value;
+    }
+
+    // @@protoc_insertion_point(enum_scope:serialize.PBExpressions)
+  }
+
+
+  public static com.google.protobuf.Descriptors.FileDescriptor
+      getDescriptor() {
+    return descriptor;
+  }
+  private static com.google.protobuf.Descriptors.FileDescriptor
+      descriptor;
+  static {
+    java.lang.String[] descriptorData = {
+      "\n\023FunctionNames.proto\022\tserialize*\231\002\n\005PBA" +
+      "dd\022!\n\035TIRESIAS_ADD_IDENTIFIERTOLIST\020\000\022\033\n" +
+      "\027TIRESIAS_ADD_TYPETOLIST\020\001\022 \n\034TIRESIAS_A" +
+      "DD_STATEMENTTOLIST\020\002\022!\n\035TIRESIAS_ADD_EXP" +
+      "RESSIONTOLIST\020\003\022\034\n\030TIRESIAS_ADD_IDTOSYMB" +
+      "TAB\020\004\022\034\n\030TIRESIAS_ADD_PARAMTOLIST\020\005\022+\n\'T" +
+      "IRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST\020\006" +
+      "\022\"\n\036TIRESIAS_ADD_IDENTIFIERTOBLOCK\020\007*\314\003\n" +
+      "\014PBAllocation\022\036\n\032TIRESIAS_CREATE_IDENTIF" +
+      "IER\020\000\022\030\n\024TIRESIAS_CREATE_TYPE\020\001\022\035\n\031TIRES",
+      "IAS_CREATE_STATEMENT\020\002\022\036\n\032TIRESIAS_CREAT" +
+      "E_EXPRESSION\020\003\022!\n\035TIRESIAS_CREATE_STATEM" +
+      "ENTLIST\020\004\022\"\n\036TIRESIAS_CREATE_EXPRESSIONL" +
+      "IST\020\005\022\"\n\036TIRESIAS_CREATE_IDENTIFIERLIST\020" +
+      "\006\022\033\n\027TIRESIAS_CREATE_SYMBTAB\020\007\022\035\n\031TIRESI" +
+      "AS_CREATE_PARAMLIST\020\010\022(\n$TIRESIAS_CREATE" +
+      "_ACTIONSYSTEMINSTANCE\020\t\022\034\n\030TIRESIAS_CREA" +
+      "TE_TYPELIST\020\n\022,\n(TIRESIAS_CREATE_ACTIONS" +
+      "YSTEMINSTANCELIST\020\013\022&\n\"TIRESIAS_CAST_AST" +
+      "ELEMENT_TO_ISCOPE\020\014*\202\003\n\rPBIdentifiers\022 \n",
+      "\034TIRESIAS_INIT_ENUMIDENTIFIER\020\001\022!\n\035TIRES" +
+      "IAS_INIT_CONSTIDENTIFIER\020\002\022 \n\034TIRESIAS_I" +
+      "NIT_ATTRIDENTIFIER\020\003\022#\n\037TIRESIAS_INIT_EX" +
+      "PRVARIDENTIFIER\020\004\022!\n\035TIRESIAS_INIT_PARAM" +
+      "IDENTIFIER\020\005\022\"\n\036TIRESIAS_INIT_LOCVARIDEN" +
+      "TIFIER\020\006\022 \n\034TIRESIAS_INIT_TYPEIDENTIFIER" +
+      "\020\007\022 \n\034TIRESIAS_INIT_SELFIDENTIFIER\020\010\022\"\n\036" +
+      "TIRESIAS_INIT_METHODIDENTIFIER\020\t\022\030\n\024TIRE" +
+      "SIAS_INIT_MODULE\020\n\022\034\n\030TIRESIAS_INIT_MAIN" +
+      "MODULE\020\000*\277\002\n\007PBTypes\022\031\n\025TIRESIAS_INIT_IN",
+      "TTYPE\020\001\022\032\n\026TIRESIAS_INIT_BOOLTYPE\020\002\022 \n\034T" +
+      "IRESIAS_INIT_VALUEDENUMTYPE\020\003\022\032\n\026TIRESIA" +
+      "S_INIT_ENUMTYPE\020\004\022\032\n\026TIRESIAS_INIT_LISTT" +
+      "YPE\020\005\022\033\n\027TIRESIAS_INIT_TUPLETYPE\020\006\022\036\n\032TI" +
+      "RESIAS_INIT_FUNCTIONTYPE\020\007\022&\n\"TIRESIAS_I" +
+      "NIT_ACTIONSYSTEMINSTANCE\020\010\022\"\n\036TIRESIAS_I" +
+      "NIT_ACTIONSYSTEMTYPE\020\t\022\032\n\026TIRESIAS_INIT_" +
+      "NULLTYPE\020\000*\210\002\n\014PBStatements\022\026\n\022TIRESIAS_" +
+      "INIT_SKIP\020\003\022\027\n\023TIRESIAS_INIT_BREAK\020\004\022\027\n\023" +
+      "TIRESIAS_INIT_ABORT\020\005\022\035\n\031TIRESIAS_INIT_N",
+      "ONDETBLOCK\020\006\022\032\n\026TIRESIAS_INIT_SEQBLOCK\020\007" +
+      "\022\033\n\027TIRESIAS_INIT_PRIOBLOCK\020\010\022 \n\034TIRESIA" +
+      "S_INIT_GUARDEDCOMMAND\020\002\022\034\n\030TIRESIAS_INIT" +
+      "_ASSIGNMENT\020\001\022\026\n\022TIRESIAS_INIT_CALL\020\000*\340\004" +
+      "\n\rPBExpressions\022 \n\034TIRESIAS_INIT_TYPEEXP" +
+      "RESSION\020\004\022&\n\"TIRESIAS_INIT_IDENTIFIEREXP" +
+      "RESSION\020\005\022!\n\035TIRESIAS_INIT_UNARYEXPRESSI" +
+      "ON\020\006\022\"\n\036TIRESIAS_INIT_BINARYEXPRESSION\020\007" +
+      "\022#\n\037TIRESIAS_INIT_TERNARYEXPRESSION\020\010\022$\n" +
+      " TIRESIAS_INIT_INTVALUEEXPRESSION\020\t\022%\n!T",
+      "IRESIAS_INIT_BOOLVALUEEXPRESSION\020\n\022$\n TI" +
+      "RESIAS_INIT_REFVALUEEXPRESSION\020\013\022!\n\035TIRE" +
+      "SIAS_INIT_LISTCONSTRUCTOR\020\014\022 \n\034TIRESIAS_" +
+      "INIT_SETCONSTRUCTOR\020\r\022\"\n\036TIRESIAS_INIT_T" +
+      "UPLECONSTRUCTOR\020\016\022\"\n\036TIRESIAS_INIT_ACCES" +
+      "SEXPRESSION\020\017\022*\n&TIRESIAS_INIT_TUPLEMAPA" +
+      "CCESSEXPRESSION\020\003\022 \n\034TIRESIAS_INIT_CALLE" +
+      "XPRESSION\020\002\022&\n\"TIRESIAS_INIT_QUANTIFIERE" +
+      "XPRESSION\020\001\022#\n\037TIRESIAS_INIT_OBJECTCONST" +
+      "RUCTOR\020\000BA\n0org.momut.ooas.argos.c",
+      "odegen.serialize.genB\rFunctionNames"
+    };
+    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
+        public com.google.protobuf.ExtensionRegistry assignDescriptors(
+            com.google.protobuf.Descriptors.FileDescriptor root) {
+          descriptor = root;
+          return null;
+        }
+      };
+    com.google.protobuf.Descriptors.FileDescriptor
+      .internalBuildGeneratedFileFrom(descriptorData,
+        new com.google.protobuf.Descriptors.FileDescriptor[] {
+        }, assigner);
+  }
+
+  // @@protoc_insertion_point(outer_class_scope)
+}
Index: trunk/compiler/licenses/jna/LICENSE-2.0.txt
===================================================================
--- trunk/compiler/licenses/jna/LICENSE-2.0.txt	(nonexistent)
+++ trunk/compiler/licenses/jna/LICENSE-2.0.txt	(revision 2)
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/OoaCADPVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/OoaCADPVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/OoaCADPVisitor.java	(revision 2)
@@ -0,0 +1,1392 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.cadp;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.momut.ooas.Version;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.ast.types.FunctionType.FunctionTypeEnum;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+
+/*
+ * OoaCADPVisitor
+ *
+ */
+
+public final class OoaCADPVisitor extends OoaCompleteAstTraversalVisitor
+{
+	final static int s_codeGenVersion = 10;
+
+	private OoasCodeEmitter m_output;
+	private final List<AttributeIdentifier> m_statevector;
+	private final int GraphImplementationVersion = 24;
+	private final List<NamedActionIdentifier> actions = new ArrayList<NamedActionIdentifier>();
+	private final List<MethodIdentifier> methods = new ArrayList<MethodIdentifier>();
+//	private final String m_AttributePre;
+	public int m_internalActionNumber = 0;
+
+	public static int getUIntHashCode(Object o) {
+		int hash = o.hashCode();
+		if (hash >= 0)
+			return hash;
+		if (hash == Integer.MIN_VALUE)
+			hash +=1;
+		return -hash;
+	}
+
+	/// <summary>
+	/// Dumps a comment containing all the version information
+	/// </summary>
+	private void DumpHeader(OoasCodeEmitter m_output)
+	{
+		m_output.AppendLine();
+		m_output.AppendLine("/* Argos Generated");
+		m_output.AppendLine(Version.asString());
+		m_output.AppendLine(String.format(" Code-Gen Version: %s", s_codeGenVersion));
+		m_output.Append("        Generated: "); m_output.AppendLine((new Date()).toString());
+		m_output.AppendLine("------------------------------------------------------------------------");
+		m_output.AppendLine();
+		m_output.AppendLine("    assumed data-type sizes:");
+		for( final String x : CadpType.sizeOfTypes().keySet())
+		m_output.AppendLine(String.format("%s: %s", new Object[] { x, CadpType.sizeOfTypes().get(x).toString() }));
+		m_output.AppendLine("");
+		m_output.AppendLine("------------------------------------------------------------------------");
+		m_output.AppendLine("------------------------------------------------------------------------");
+		m_output.AppendLine("*/");
+	}
+
+	/// <summary>
+	/// Prints out general definitions, includes
+	/// </summary>
+	private void DumpDefinitions(OoasCodeEmitter m_output)
+	{
+		// write Graph version and include header
+		m_output.AppendLine("/*define next symbol if you want to see named internal actions (otherwise they are mapped to 'i')*/");
+		m_output.AppendLine("#define ALL_ACTIONS_VISIBLE");
+		m_output.AppendLine("/*define next symbol if you need to re-eval internal (hidden) states - attention: memory leaks*/");
+		m_output.AppendLine("//#define UNLIMITED_REEVAL");
+		m_output.AppendLine(String.format("#define CAESAR_GRAPH_IMPLEMENTATION %s", GraphImplementationVersion));
+		m_output.AppendLine("#include \"caesar_graph.h\"");
+		m_output.AppendLine("#include \"argos_runtime.h\"");
+		m_output.AppendLine("#if defined(unix) || defined(__MACH__)");
+		m_output.AppendLine("#define UNIXPACK __attribute__((__packed__))");
+		m_output.AppendLine("#undef WINDOWSPACK");
+		m_output.AppendLine("#include <netinet/in.h>");
+		m_output.AppendLine("#else");
+		m_output.AppendLine("#include <winsock.h>");
+		m_output.AppendLine("#define WINDOWSPACK");
+		m_output.AppendLine("#define UNIXPACK");
+		m_output.AppendLine("#endif");
+
+		m_output.AppendLine("  typedef unsigned long CAESAR_TYPE_WORD;");
+		m_output.AppendLine("  #define CAESAR_WORD_SIZE (sizeof (CAESAR_TYPE_WORD))");
+		m_output.AppendLine("  #define CAESAR_FULL_MASK ((CAESAR_TYPE_WORD) ~0)");
+
+		m_output.AppendLine("");
+		m_output.AppendLine("unsigned char  CALC_INVALID = 0;");
+
+		m_output.AppendLine("");
+		m_output.AppendLine("void CAESAR_TERMINATE (int CAESAR_ABORT)");
+		m_output.AppendLine("{printf(\"aborted...\"); abort();}");
+		m_output.AppendLine("");
+	}
+	/// <summary>
+	/// Prints out compiler String
+	/// </summary>
+	private void DumpCompilerString()
+	{
+		m_output.AppendLine("CAESAR_TYPE_STRING CAESAR_GRAPH_COMPILER ()");
+		lp();
+		m_output.AppendLine("  return (\"ARGOS\");");
+		rp();
+	}
+
+	/// <summary>
+	/// Prints out compiler version
+	/// </summary>
+	private void DumpCompilerVersion()
+	{
+		m_output.AppendLine("CAESAR_TYPE_VERSION CAESAR_GRAPH_VERSION ()");
+		lp();
+		m_output.AppendLine("            return (" + Version.s_releaseMajor + "." + Version.s_releaseMinor + ");");
+		rp();
+	}
+	/// <summary>
+	/// Exports a function returning the maximum number of formats for states.
+	/// Exports a const for the default format.
+	/// Exports a function CAESAR_FORMAT_STATE (default cadp implementation).
+	/// </summary>
+	private void DumpFormat()
+	{
+		m_output.AppendLine("CAESAR_TYPE_NATURAL CAESAR_MAX_FORMAT_STATE ()");
+		lp();
+		m_output.AppendLine(" return (0);");
+		rp();
+
+		line();
+		m_output.AppendLine("static CAESAR_TYPE_NATURAL CAESAR_CURRENT_STATE_FORMAT = 0;");
+
+
+		line();
+		m_output.AppendLine("void CAESAR_FORMAT_STATE (CAESAR_TYPE_NATURAL CAESAR_FORMAT)");
+		lp();
+		m_output.AppendLine("  if (CAESAR_FORMAT > CAESAR_MAX_FORMAT_STATE ()) ");
+		m_output.AppendLine("    printf(\"#233 bug during simulation:\\n     unknown state printing format\\n\");");
+		m_output.AppendLine("  else");
+		m_output.AppendLine("    CAESAR_CURRENT_STATE_FORMAT = CAESAR_FORMAT;");
+		m_output.AppendLine("}");
+	}
+
+
+	/// <summary>
+	/// Exports a function to print a state header. (standard cadp implementation)
+	/// </summary>
+	private void DumpStateHeader()
+	{
+		m_output.AppendLine("void CAESAR_PRINT_STATE_HEADER (CAESAR_TYPE_FILE CAESAR_FILE)");
+		m_output.AppendLine("{");
+		m_output.AppendLine("  switch (CAESAR_CURRENT_STATE_FORMAT) {");
+		m_output.AppendLine("  case 0:");
+		m_output.Append("    fprintf (CAESAR_FILE, \"\\t marquage = {\");");
+		m_output.AppendLine("    fprintf (CAESAR_FILE, \"unite 0}\\n\");");
+		m_output.AppendLine("    break;");
+		m_output.AppendLine("  default:");
+		m_output.AppendLine("  {");
+		m_output.AppendLine("    printf(\"#233 bug during simulation:\\n     unknown state printing format\\n\");");
+		m_output.AppendLine("  }");
+		m_output.AppendLine("  break;");
+		m_output.AppendLine("  }");
+		m_output.AppendLine("}");
+	}
+
+
+
+
+	/// <summary>
+	/// Main Routine, dumps an action system
+	/// </summary>
+	/// <param name="ooActionSystemType">action system to write out</param>
+	private void Dump(OoActionSystemType ooActionSystemType)
+	{
+
+
+		// write name of type we print out.
+		m_output.AppendLine();
+		m_output.Append("/* Type: "); m_output.Append(ooActionSystemType.identifier().tokenText());
+		m_output.AppendLine(" */");
+		m_output.AppendLine();
+
+		// export state variables
+		DefineCadpState(ooActionSystemType);
+
+		// export compiler String function
+		line();
+		DumpCompilerString();
+
+		// export compiler version function
+		line();
+		DumpCompilerVersion();
+
+		// export state comparison function
+		line();
+		DefineCompareCadpStates();
+
+		// export a state hash function
+		line();
+		DefineCadpStateHash();
+
+
+		line();
+		DumpFormat();
+
+		line();
+		DumpStateHeader();
+
+		line();
+		DefineCadpPrintState();
+
+		line();
+		DefineCadpPrintDeltaState();
+
+
+		line();
+		DefineCadpLabel(ooActionSystemType);  // populates actions list
+
+		line();
+		m_output.AppendLine();
+		m_output.AppendLine("typedef struct CAESAR_STRUCT_ALIGNMENT_LABEL {");
+		m_output.AppendLine("  char CAESAR_BYTE;");
+		m_output.AppendLine("  CAESAR_BODY_LABEL CAESAR_L;");
+		m_output.AppendLine("} CAESAR_BODY_ALIGNMENT_LABEL;");
+		m_output.AppendLine("CAESAR_TYPE_NATURAL CAESAR_HINT_ALIGNMENT_LABEL = sizeof (CAESAR_BODY_ALIGNMENT_LABEL) - sizeof (CAESAR_BODY_LABEL);");
+
+
+		line();
+		m_output.AppendLine();
+		m_output.AppendLine("CAESAR_TYPE_BOOLEAN CAESAR_VISIBLE_LABEL (CAESAR_TYPE_LABEL CAESAR_L)");
+		m_output.AppendLine("{");
+		m_output.AppendLine("  return 1;");
+		m_output.AppendLine("}");
+
+
+		line();
+		m_output.AppendLine("CAESAR_TYPE_STRING CAESAR_GATE_LABEL (CAESAR_TYPE_LABEL CAESAR_L)");
+		lp();
+		m_output.AppendLine(String.format("  if(CAESAR_L->CAESAR_TRANSITION_NUMBER < %1$s)", this.actions.size()));
+		m_output.AppendLine("#ifndef ALL_ACTIONS_VISIBLE");
+		m_output.AppendLine("    return CAESAR_GATEKIND[CAESAR_L->CAESAR_TRANSITION_NUMBER] == INTERNAL_ACTION ? CAESAR_GATE[INTERNAL_ACTION_NUMBER] : CAESAR_GATE[CAESAR_L->CAESAR_TRANSITION_NUMBER];");
+		m_output.AppendLine("#else");
+		m_output.AppendLine("    return CAESAR_GATE[CAESAR_L->CAESAR_TRANSITION_NUMBER];");
+		m_output.AppendLine("#endif");
+		m_output.AppendLine("  else");
+		m_output.AppendLine("    {printf(\"#233 bug during simulation:\\n     unknown gate number\\n\"); CAESAR_TERMINATE(1);}");
+		m_output.AppendLine(" return \"\";");
+		rp();
+
+
+		line();
+		m_output.AppendLine("CAESAR_TYPE_NATURAL CAESAR_CARDINAL_LABEL (CAESAR_TYPE_LABEL CAESAR_L)");
+		lp();
+		m_output.AppendLine(String.format("  if(CAESAR_L->CAESAR_TRANSITION_NUMBER < %1$s)", this.actions.size()));
+		m_output.AppendLine("    return CAESAR_CARDINAL[CAESAR_L->CAESAR_TRANSITION_NUMBER];");
+		m_output.AppendLine("  else");
+		m_output.AppendLine("    {printf(\"#233 bug during simulation:\\n     unknown gate number\\n\"); CAESAR_TERMINATE(1);}");
+		m_output.AppendLine("return 0;");
+		rp();
+
+
+		line();
+		DefineCadpGetStringLabel();
+
+
+		line();
+		DefineCadpCompareLabel();
+
+		line();
+		DefineCadpHashLabel();
+
+
+		line();
+		DefineCadpPrintLabel();
+
+
+		line();
+		m_output.AppendLine("CAESAR_TYPE_NATURAL CAESAR_MAX_FORMAT_LABEL ()");
+		lp();
+		m_output.AppendLine("  return (0);");
+		rp();
+		m_output.AppendLine();
+		m_output.AppendLine("static CAESAR_TYPE_NATURAL CAESAR_CURRENT_LABEL_FORMAT = 0;");
+
+
+
+		line();
+		m_output.AppendLine("void CAESAR_FORMAT_LABEL (CAESAR_TYPE_NATURAL CAESAR_FORMAT)");
+		lp();
+		m_output.AppendLine("  if (CAESAR_FORMAT > CAESAR_MAX_FORMAT_LABEL ()){");
+		lp();
+		m_output.AppendLine("    printf(\"#234 bug during simulation:\\n     unknown label printing format\\n\");");
+		rp();
+		rp(); m_output.Append(" else  CAESAR_CURRENT_LABEL_FORMAT = CAESAR_FORMAT;");
+		rp();
+
+
+
+		line();
+		m_output.AppendLine("CAESAR_TYPE_STRING CAESAR_INFORMATION_LABEL (CAESAR_TYPE_LABEL CAESAR_L)");
+		lp();
+		m_output.AppendLine("  static char CAESAR_RESULT [11];");
+		m_output.AppendLine("  switch (CAESAR_CURRENT_LABEL_FORMAT) ");
+		m_output.AppendLine("  {");
+		m_output.AppendLine("    case 0:");
+		m_output.AppendLine("      sprintf (CAESAR_RESULT, \"%u\", CAESAR_L->CAESAR_TRANSITION_NUMBER);");
+		m_output.AppendLine("      return (CAESAR_RESULT);");
+		m_output.AppendLine("    default:");
+		m_output.AppendLine("    {");
+		m_output.AppendLine("      printf(\"#234 bogue pendant la simulation :\\n     format d'impression inconnu pour les etiquettes\\n\");");
+		m_output.AppendLine("    }");
+		m_output.AppendLine("    return (\"\");");
+		m_output.AppendLine("  }");
+		rp();
+
+
+		///
+		///   START STATE
+		///
+		line();
+		line();
+		DefineCadpStartState();
+
+
+		///
+		///   Dump Methods
+		///
+		for (final MethodIdentifier method: methods)
+		{
+			line();
+			m_output.AppendLine(String.format("  /* Code for method '%1$s' */", method.tokenText()));
+			DefineCadpAction(method, -1);
+		}
+
+
+
+
+		///
+		///   Dump Actions
+		///
+		int actnum = 0;
+		for (final NamedActionIdentifier action : actions)
+		{
+			line();
+			m_output.AppendLine(String.format("  /* Code for action '%1$s' */", action.tokenText()));
+			DefineCadpAction(action, actnum);
+			actnum++;
+		}
+
+
+		///
+		///   ITERATE STATE
+		///
+		line();
+		line();
+		DefineCadpIterateState(ooActionSystemType);
+
+
+
+		line();
+		m_output.AppendLine("void CAESAR_INIT_GRAPH ()");
+		lp();
+		m_output.AppendLine("  CAESAR_CHECK_VERSION (2.4, 2.4);");
+		rp();
+		m_output.AppendLine();
+	}
+
+	@Override
+	public  void visit(MainModule mainModule)
+	{
+		// define complex types
+		DumpTypes(mainModule);
+
+		// export action system
+		Dump(mainModule.instance());
+	}
+
+
+
+
+//	private String GetIdentifierString(TypeIdentifier typeIdentifier)
+//	{
+//		return CadpIdentifier.GetIdentifierString(typeIdentifier);
+//	}
+
+
+
+	private void DumpTypes(MainModule mainModule)
+	{
+		for (final Identifier x: mainModule.symbolTable().symbolList())
+		{
+			if (x.kind() == IdentifierKind.TypeIdentifier)/* &&
+				((TypeIdentifier)x).type.kind != TypeKind.OoActionSystemType)*/
+			{
+				final TypeIdentifier aTypeId = (TypeIdentifier)x;
+				CadpType.EmitType(aTypeId.type());
+			}
+		}
+	}
+
+	public OoaCADPVisitor(ParserState aState)
+	{
+		super(aState);
+		m_output = new OoasCodeEmitter();
+		m_statevector = new ArrayList<AttributeIdentifier>();
+//		m_AttributePre = "";
+
+		// clear helpers
+		CadpExpression.emittedOperations.clear();
+	}
+
+
+	@Override
+	public  String toString()
+	{
+		final OoasCodeEmitter result = new OoasCodeEmitter();
+		DumpHeader(result);           // comments, version
+		DumpDefinitions(result);      // includes, definitions
+
+		result.AppendLine(CadpType.GetTypeDefintions());
+		result.AppendLine(cadpstate.toString());
+		result.AppendLine(CadpExpression.GetHelperCode());
+		result.AppendLine(m_output.toString());
+
+		return result.toString();
+	}
+
+
+
+
+
+
+	private void line()
+	{
+		m_output.AppendLine();
+		m_output.AppendLine("//----------------------------------------------------------------------");
+	}
+	private void rp()
+	{
+		m_output.AppendLine("}");
+	}
+	private void lp()
+	{
+		m_output.AppendLine("{");
+	}
+
+
+	public static String DumpType(UlyssesType atype)
+	{
+		final CadpType newtype = new CadpType();
+		atype.Accept(newtype);
+		return newtype.ToString();
+	}
+
+
+	/// <summary>
+	/// Dumps a state variable (attribute)
+	/// </summary>
+	private void DumpAttribute(AttributeIdentifier attributeIdentifier)
+	{
+		m_output.Append(DumpType(attributeIdentifier.type()));
+		m_output.Append(" ");
+		m_output.Append(attributeIdentifier.tokenText());
+		m_statevector.add(attributeIdentifier);
+	}
+
+	private final OoasCodeEmitter cadpstate = new OoasCodeEmitter();
+
+	/// <summary>
+	/// Exports the state of the ooActionSystem
+	/// </summary>
+	private void DefineCadpState(OoActionSystemType ooActionSystemType)
+	{
+		final OoasCodeEmitter tmp = m_output;
+		m_output = cadpstate;
+
+		m_output.AppendLine("typedef struct CAESAR_STRUCT_STATE CAESAR_BODY_STATE;");
+		m_output.AppendLine("#ifdef WINDOWSPACK");
+		m_output.AppendLine("#pragma pack(1)");
+		m_output.AppendLine("#endif");
+		m_output.AppendLine("struct CAESAR_STRUCT_STATE {");
+		m_output.AppendLine("struct CAESAR_STRUCT_STATE *_predecessor;");
+		m_output.AppendLine("struct STATE_LIST          *_successors;");
+		m_output.AppendLine("char *_statenum;");
+		m_output.AppendLine("char _hidden;");
+		for (final Identifier sym: ooActionSystemType.symbols().symbolList())
+		{
+			if (sym.kind() == IdentifierKind.AttributeIdentifier)
+			{
+				DumpAttribute((AttributeIdentifier)sym);
+				m_output.AppendLine(";");
+			}
+		}
+		m_output.AppendLine("} UNIXPACK;");
+
+		m_output = tmp;
+
+		// now define the hash sizes, malloc and free routines, and aligned state
+		m_output.AppendLine();
+		m_output.AppendLine("#undef CAESAR_SIZE_STATE");
+		m_output.AppendLine("#undef CAESAR_HASH_SIZE_STATE");
+		m_output.AppendLine("#undef CAESAR_CREATE_STATE");
+		m_output.AppendLine("#undef CAESAR_DELETE_STATE");
+		m_output.AppendLine("");
+
+		m_output.AppendLine();
+		m_output.AppendLine("#define CAESAR_SIZE_STATE() (sizeof (CAESAR_BODY_STATE))");
+		m_output.AppendLine("CAESAR_TYPE_NATURAL CAESAR_HINT_SIZE_STATE = CAESAR_SIZE_STATE();");
+
+		m_output.AppendLine();
+		m_output.AppendLine("#define CAESAR_HASH_SIZE_STATE() (CAESAR_SIZE_STATE ())");
+		m_output.AppendLine("CAESAR_TYPE_NATURAL CAESAR_HINT_HASH_SIZE_STATE = CAESAR_HASH_SIZE_STATE();");
+
+		m_output.AppendLine("#define CAESAR_CREATE_STATE(CAESAR_S)\\");
+		m_output.AppendLine("   { CAESAR_CREATE (*(CAESAR_S), CAESAR_SIZE_STATE(), CAESAR_TYPE_STATE); ((struct CAESAR_STRUCT_STATE*)(*(CAESAR_S)))->_hidden = 0; }");
+
+		m_output.AppendLine("");
+		m_output.AppendLine("#define CAESAR_DELETE_STATE(CAESAR_S)\\");
+		m_output.AppendLine("   { DELETE_STATES(((struct CAESAR_STRUCT_STATE*)*(CAESAR_S))->_successors); CAESAR_DELETE(*(CAESAR_S)); *(CAESAR_S) = NULL; }");
+
+		m_output.AppendLine();
+		m_output.AppendLine("typedef struct CAESAR_STRUCT_ALIGNMENT_STATE {");
+		m_output.AppendLine("  char CAESAR_BYTE;");
+		m_output.AppendLine("  CAESAR_BODY_STATE CAESAR_S;");
+		m_output.AppendLine("} CAESAR_BODY_ALIGNMENT_STATE;");
+		m_output.AppendLine("CAESAR_TYPE_NATURAL CAESAR_HINT_ALIGNMENT_STATE = sizeof (CAESAR_BODY_ALIGNMENT_STATE) - sizeof (CAESAR_BODY_STATE);");
+
+		line();
+
+		DefineCadpStateHelpers(ooActionSystemType);
+
+		line();
+	}
+
+	private void DefineCadpStateHelpers(OoActionSystemType ooActionSystemType)
+	{
+		m_output.AppendLine("#include \"argos_runtime_helpers.c\"");
+		m_output.AppendLine("");
+
+
+//		final IScope ascope = ooActionSystemType.GetParentScope();
+//		final MainModule mainscope = (MainModule)ascope;
+
+	}
+
+
+
+	/// <summary>
+	/// Exports a function that compares two states.
+	/// </summary>
+	private void DefineCompareCadpStates()
+	{
+		m_output.AppendLine("CAESAR_TYPE_BOOLEAN CAESAR_COMPARE_STATE (CAESAR_TYPE_STATE CAESAR_S1, CAESAR_TYPE_STATE CAESAR_S2)");
+		lp();
+		m_output.AppendLine("  CAESAR_TYPE_BOOLEAN CAESAR_RESULT;");
+		m_output.AppendLine("  if ((char*)CAESAR_S1 == (char*)CAESAR_S2) return 1;");
+		m_output.AppendLine("  if (CAESAR_S1->_hidden != CAESAR_S2->_hidden)");
+		m_output.AppendLine("    return 0;");
+		m_output.AppendLine("  else  if (CAESAR_S1->_hidden == 0)");
+		m_output.AppendLine(String.format("    CAESAR_RESULT = (memcmp (((char *) CAESAR_S1) + 3* %1$s, ((char *) CAESAR_S2)+3* %1$s , CAESAR_HASH_SIZE_STATE ()-3*%1$s) == 0);", "sizeof(char*)"/*, CadpType.sizeOfTypes["pointer"]*/));
+		m_output.AppendLine("  else");
+		m_output.AppendLine("  {");
+		m_output.AppendLine(String.format("/*    CAESAR_RESULT = (memcmp (((char *) CAESAR_S1)+3* %1$s, ((char *) CAESAR_S2)+3* %1$s, CAESAR_HASH_SIZE_STATE ()-3*%1$s) == 0);", "sizeof(char*)"/*CadpType.sizeOfTypes["pointer"]*/));
+		m_output.AppendLine("    if (CAESAR_RESULT) {");
+		m_output.AppendLine("    char succequal;");
+		m_output.AppendLine("    COMPARE_STATES(CAESAR_S1->_successors,CAESAR_S2->_successors,succequal);");
+		m_output.AppendLine("    CAESAR_RESULT = CAESAR_RESULT && succequal;}*/");
+		m_output.AppendLine("    CAESAR_RESULT = 0;");
+		/*m_output.AppendLine("");
+            m_output.AppendLine(String.format("    CAESAR_RESULT = CAESAR_S1->_statenum == CAESAR_S2->_statenum && (memcmp (((char *) CAESAR_S1)+3* %1$s, ((char *) CAESAR_S2)+3* %1$s, CAESAR_HASH_SIZE_STATE ()-3*%1$s) == 0);", "sizeof(char*)"));*/
+		m_output.AppendLine("  }");
+		m_output.AppendLine("  return (CAESAR_RESULT);");
+		rp();
+	}
+
+	/// <summary>
+	/// Exports a hash function. Standard CADP implementation.
+	/// </summary>
+	private void DefineCadpStateHash()
+	{
+		m_output.AppendLine("CAESAR_TYPE_NATURAL CAESAR_HASH_STATE (CAESAR_TYPE_STATE CAESAR_ST, CAESAR_TYPE_NATURAL CAESAR_MODULUS)");
+		lp();
+		m_output.AppendLine("  /* we do not care about the pre/succ/... pointers here */");
+		m_output.AppendLine("int beg_offset = 3 * sizeof(unsigned char*);");
+		m_output.AppendLine("  CAESAR_TYPE_STATE CAESAR_S = (CAESAR_TYPE_STATE) ((unsigned char*)CAESAR_ST + beg_offset);");
+		m_output.AppendLine("  CAESAR_TYPE_NATURAL CAESAR_RESULT;");
+		m_output.AppendLine("  CAESAR_TYPE_WORD CAESAR_SHIFT_LOW, CAESAR_SHIFT_HIGH;");
+		m_output.AppendLine("  CAESAR_TYPE_WORD *CAESAR_LOW, *CAESAR_HIGH;");
+		m_output.AppendLine("  CAESAR_SHIFT_LOW = ((CAESAR_TYPE_WORD) CAESAR_S) % CAESAR_WORD_SIZE;");
+		m_output.AppendLine("  CAESAR_LOW = (CAESAR_TYPE_WORD *) ((unsigned char *) CAESAR_S - CAESAR_SHIFT_LOW);");
+		m_output.AppendLine("  CAESAR_HIGH = (CAESAR_TYPE_WORD *) ((unsigned char *) CAESAR_S + CAESAR_HASH_SIZE_STATE () - beg_offset);");
+		m_output.AppendLine("  CAESAR_SHIFT_HIGH = ((CAESAR_TYPE_WORD) CAESAR_HIGH) % CAESAR_WORD_SIZE;");
+		m_output.AppendLine("  CAESAR_HIGH = (CAESAR_TYPE_WORD *) ((unsigned char *) CAESAR_HIGH - CAESAR_SHIFT_HIGH);");
+		m_output.AppendLine("  if (CAESAR_LOW == CAESAR_HIGH) {");
+		m_output.AppendLine("		CAESAR_RESULT = htonl (*CAESAR_LOW);");
+		m_output.AppendLine("		if (CAESAR_SHIFT_LOW)");
+		m_output.AppendLine("			CAESAR_RESULT &= CAESAR_FULL_MASK >> (8 * CAESAR_SHIFT_LOW);");
+		m_output.AppendLine("		if (CAESAR_SHIFT_HIGH)");
+		m_output.AppendLine("			CAESAR_RESULT &= CAESAR_FULL_MASK << (8 * (CAESAR_WORD_SIZE - CAESAR_SHIFT_HIGH));");
+		m_output.AppendLine("	}");
+		m_output.AppendLine("	else");
+		m_output.AppendLine("	{");
+		m_output.AppendLine("		CAESAR_RESULT = 0;");
+		m_output.AppendLine("		if (CAESAR_SHIFT_LOW) {");
+		m_output.AppendLine("			CAESAR_RESULT = htonl (*(CAESAR_LOW++)) & (CAESAR_FULL_MASK >> (8 * CAESAR_SHIFT_LOW));");
+		m_output.AppendLine("		}");
+		m_output.AppendLine("		while (CAESAR_LOW < CAESAR_HIGH) {");
+		m_output.AppendLine("			CAESAR_RESULT ^= htonl (*(CAESAR_LOW++));");
+		m_output.AppendLine("		}");
+		m_output.AppendLine("		if (CAESAR_SHIFT_HIGH) {");
+		m_output.AppendLine("			CAESAR_RESULT ^= htonl (*CAESAR_LOW) & (CAESAR_FULL_MASK << (8 * (CAESAR_WORD_SIZE - CAESAR_SHIFT_HIGH)));");
+		m_output.AppendLine("		}");
+		m_output.AppendLine("	}");
+		m_output.AppendLine("	if (CAESAR_SHIFT_LOW) ");
+		m_output.AppendLine("		CAESAR_RESULT = ((CAESAR_RESULT >> ((CAESAR_WORD_SIZE - CAESAR_SHIFT_LOW) * 8)) | (CAESAR_RESULT << (CAESAR_SHIFT_LOW * 8)));");
+		m_output.AppendLine("  CAESAR_RESULT = CAESAR_RESULT % CAESAR_MODULUS;");
+		m_output.AppendLine("  return (CAESAR_RESULT);");
+		rp();
+	}
+
+	/// <summary>
+	/// Exports a function to print the state
+	/// </summary>
+	private void DefineCadpPrintState()
+	{
+		m_output.AppendLine("void CAESAR_PRINT_STATE (CAESAR_TYPE_FILE CAESAR_FILE, CAESAR_TYPE_STATE CAESAR_S)");
+		m_output.AppendLine("{");
+		m_output.AppendLine("  switch (CAESAR_CURRENT_STATE_FORMAT) {");
+		m_output.AppendLine("  case 0:");
+		m_output.AppendLine("    fprintf (CAESAR_FILE, \"{\\n_hidden: %s,\\n\", CAESAR_S->_hidden == 0 ? \"0\": \"1\");");
+		int i = 0;
+		for (final AttributeIdentifier x: m_statevector)
+		{
+			CadpType.EmitType(x.type());
+			if (i != 0)
+				m_output.AppendLine("    fprintf (CAESAR_FILE, \",\\n\");");
+
+			i++;
+			m_output.AppendLine(String.format("    fprintf (CAESAR_FILE, \"%1$s: \");", x.tokenText()));
+			m_output.AppendLine(String.format("    %1$s%2$s(CAESAR_FILE, CAESAR_S->%3$s);", CadpType.printString,
+					CadpIdentifier.GetIdentifierString(x.type().identifier()), x.tokenText()));
+		}
+		m_output.Append("    fprintf (CAESAR_FILE, \"\\n}\");");
+		m_output.AppendLine("    break;");
+		m_output.AppendLine("  default:");
+		m_output.AppendLine("  {");
+		m_output.AppendLine("    printf(\"#233 bug during simulation:\\n     unknown state printing format\\n\");");
+		m_output.AppendLine("  }");
+		m_output.AppendLine("  break;");
+		m_output.AppendLine("  }");
+		m_output.AppendLine("}");
+	}
+
+	/// <summary>
+	/// Exports a function to print the delta state..
+	/// </summary>
+	private void DefineCadpPrintDeltaState()
+	{
+		m_output.AppendLine("void CAESAR_DELTA_STATE (CAESAR_TYPE_FILE CAESAR_FILE, CAESAR_TYPE_STATE CAESAR_S1, CAESAR_TYPE_STATE CAESAR_S2)");
+		m_output.AppendLine("{");
+		m_output.AppendLine("  switch (CAESAR_CURRENT_STATE_FORMAT) {");
+		m_output.AppendLine("  case 0:");
+
+		m_output.AppendLine("    fprintf (CAESAR_FILE, \"{_hidden: %s, \", CAESAR_S1->_hidden == 0 ? \"0\": \"1\");");
+		int i = 0;
+		for (final AttributeIdentifier x: m_statevector)
+		{
+			if (i != 0)
+				m_output.AppendLine("    fprintf (CAESAR_FILE, \", \");");
+
+			i++;
+			m_output.AppendLine(String.format("    fprintf (CAESAR_FILE, \"%1$s: \");", x.tokenText()));
+			m_output.AppendLine(String.format("    %1$s%2$s(CAESAR_FILE, CAESAR_S1->%3$s);", CadpType.printString,
+					CadpIdentifier.GetIdentifierString(x.type().identifier()), x.tokenText()));
+		}
+		m_output.Append("    fprintf (CAESAR_FILE, \"}\");");
+
+
+
+		m_output.Append("    fprintf (CAESAR_FILE, \" --->> \");");
+
+
+
+		m_output.AppendLine("    fprintf (CAESAR_FILE, \"{_hidden: %s, \", CAESAR_S2->_hidden == 0 ? \"0\": \"1\");");
+		i = 0;
+		for (final AttributeIdentifier x: m_statevector)
+		{
+			if (i != 0)
+				m_output.AppendLine("    fprintf (CAESAR_FILE, \", \");");
+
+			i++;
+			m_output.AppendLine(String.format("    fprintf (CAESAR_FILE, \"%1$s: \");", x.tokenText()));
+			m_output.AppendLine(String.format("    %1$s%2$s(CAESAR_FILE, CAESAR_S2->%3$s);", CadpType.printString,
+					CadpIdentifier.GetIdentifierString(x.type().identifier()), x.tokenText()));
+		}
+		m_output.Append("    fprintf (CAESAR_FILE, \"}\");");
+
+
+		m_output.AppendLine("  break;");
+		m_output.AppendLine("  default:");
+		m_output.AppendLine("  {");
+		m_output.AppendLine("    printf(\"#233 bug during simulation:\\n     unknown state printing format\\n\");");
+		m_output.AppendLine("  }");
+		m_output.AppendLine("  break;");
+		m_output.AppendLine("  }");
+		m_output.AppendLine("}");
+	}
+
+	/// <summary>
+	/// Defines CADP label data type and helper information
+	/// </summary>
+	private void DefineCadpLabel(OoActionSystemType ooActionSystemType)
+	{
+		m_output.AppendLine("typedef unsigned int CAESAR_TYPE_PACKED_TRANSITION_NUMBER;");
+		m_output.AppendLine("typedef unsigned char CAESAR_TYPE_UNIQUE_GATE_AND_PROFILE_NUMBER;");
+
+		m_output.AppendLine("typedef struct CAESAR_STRUCT_LABEL {");
+		m_output.AppendLine("  CAESAR_TYPE_PACKED_TRANSITION_NUMBER CAESAR_TRANSITION_NUMBER;");
+
+		int i = 0;
+		final StringBuilder param = new StringBuilder();
+		for (final Identifier sym: ooActionSystemType.symbols().symbolList())
+		{
+			if (sym.kind() == IdentifierKind.NamedActionIdentifier)
+			{
+				final NamedActionIdentifier namedAction = (NamedActionIdentifier)sym;
+
+				if (((FunctionType)namedAction.type()).parameter().size() > 0)
+				{
+					param.append("    struct {"); param.append(System.lineSeparator());
+					int parnum = 0;
+					for (final UlyssesType parameter: ((FunctionType)namedAction.type()).parameter())
+					{
+						param.append(String.format("        %1$s PARAM_%2$s;", DumpType(parameter), parnum));
+						param.append(System.lineSeparator());
+						parnum++;
+					}
+					param.append(String.format("    } CAESAR_PROFILE_%1$s;", i));
+					param.append(System.lineSeparator());
+				}
+				actions.add(namedAction);
+				i++;
+			}
+			else if (sym.kind() == IdentifierKind.MethodIdentifier)
+			{
+				methods.add((MethodIdentifier)sym);
+			}
+		}
+		m_output.AppendLine("    union {");
+		if (param.length() > 0)
+			m_output.Append(param.toString());
+		m_output.AppendLine(" } CAESAR_UNION;");
+		m_output.AppendLine("} CAESAR_BODY_LABEL;");
+		m_output.AppendLine();
+		m_internalActionNumber = actions.size();
+
+		m_output.AppendLine(String.format("#define INTERNAL_ACTION_NUMBER %1$s", m_internalActionNumber));
+		m_output.AppendLine("#define INTERNAL_ACTION 0");
+		m_output.AppendLine("#define OBSERVABLE_ACTION 1");
+		m_output.AppendLine("#define CONTROLLABLE_ACTION 2");
+
+		final StringBuilder gatelist = new StringBuilder(String.format("CAESAR_TYPE_STRING CAESAR_GATE[%1$s] = {", (actions.size() + 1)));
+		final StringBuilder cardlist = new StringBuilder(String.format("CAESAR_TYPE_NATURAL CAESAR_CARDINAL[%1$s] = {", (actions.size() + 1)));
+		final StringBuilder intObsCtrList = new StringBuilder(String.format("CAESAR_TYPE_NATURAL CAESAR_GATEKIND[%1$s] = {", (actions.size() + 1)));
+		int j = 0;
+		for (final NamedActionIdentifier action: actions)
+		{
+			if (j != 0)
+			{
+				gatelist.append(", ");
+				cardlist.append(", ");
+				intObsCtrList.append(", ");
+			}
+			j++;
+			gatelist.append(String.format("\"%1$s\"", action.tokenText()));
+			cardlist.append(((FunctionType)action.type()).parameter().size());
+			if (((FunctionType)action.type()).functionType() == FunctionTypeEnum.Observable)
+				intObsCtrList.append("OBSERVABLE_ACTION");
+			else if (((FunctionType)action.type()).functionType() == FunctionTypeEnum.Controllable)
+				intObsCtrList.append("CONTROLLABLE_ACTION");
+			else
+				intObsCtrList.append("INTERNAL_ACTION");
+		}
+		gatelist.append(",\"i\"};");
+		cardlist.append(",0};");
+		intObsCtrList.append(",INTERNAL_ACTION};");
+
+		m_output.AppendLine("/* Names of actions (= gates) */");
+		m_output.AppendLine(gatelist.toString());
+		m_output.AppendLine("/* Number of parameters of actions (= cardinality) */");
+		m_output.AppendLine(cardlist.toString());
+		m_output.AppendLine("/* Internal (0), Observable (1), or Controllable (2) action? */");
+		m_output.AppendLine(intObsCtrList.toString());
+
+		m_output.AppendLine("#undef CAESAR_SIZE_LABEL");
+		m_output.AppendLine("#define CAESAR_SIZE_LABEL() (sizeof (CAESAR_BODY_LABEL))");
+		m_output.AppendLine("CAESAR_TYPE_NATURAL CAESAR_HINT_SIZE_LABEL = CAESAR_SIZE_LABEL();");
+		m_output.AppendLine("#undef CAESAR_HASH_SIZE_LABEL");
+		m_output.AppendLine("CAESAR_TYPE_NATURAL CAESAR_HINT_HASH_SIZE_LABEL;");
+		m_output.AppendLine("#define CAESAR_HASH_SIZE_LABEL() CAESAR_HINT_HASH_SIZE_LABEL");
+	}
+
+	/// <summary>
+	/// Method that exports the CAESAR_STRING_LABEL function
+	/// </summary>
+	private void DefineCadpGetStringLabel()
+	{
+
+		m_output.AppendLine("CAESAR_TYPE_FILE CAESAR_BUFFER = NULL;");
+		m_output.AppendLine("");
+		m_output.AppendLine("CAESAR_TYPE_STRING CAESAR_STRING_LABEL (CAESAR_TYPE_LABEL CAESAR_L)");
+		lp();
+
+		m_output.AppendLine("  CAESAR_TYPE_STRING CAESAR_RESULT;");
+		m_output.AppendLine("");
+		m_output.AppendLine("	#define CAESAR_LABEL_HASH_SIZE 10007");
+		m_output.AppendLine("	typedef struct CAESAR_STRUCT_LABEL_STRING {");
+		m_output.AppendLine("		CAESAR_BODY_LABEL CAESAR_LABEL;");
+		m_output.AppendLine("		CAESAR_TYPE_STRING CAESAR_STRING;");
+		m_output.AppendLine("	} CAESAR_BODY_LABEL_STRING, *CAESAR_TYPE_LABEL_STRING;");
+		m_output.AppendLine("	static CAESAR_TYPE_LABEL_STRING CAESAR_LABEL_STRING_TABLE = NULL;");
+		m_output.AppendLine("	/*static CAESAR_TYPE_FILE CAESAR_BUFFER = NULL;*/");
+		m_output.AppendLine("	CAESAR_TYPE_NATURAL CAESAR_N;");
+		m_output.AppendLine("	CAESAR_TYPE_LABEL_STRING CAESAR_ITEM;");
+		m_output.AppendLine("#ifdef CAESAR_LABEL_STRING_STATISTICS");
+		m_output.AppendLine("	static CAESAR_TYPE_NATURAL CAESAR_LABEL_STRING_TABLE_HIT = 0;");
+		m_output.AppendLine("	static CAESAR_TYPE_NATURAL CAESAR_LABEL_STRING_TABLE_MISS = 0;");
+		m_output.AppendLine("	static CAESAR_TYPE_NATURAL CAESAR_LABEL_STRING_TABLE_CONFLICT = 0;");
+		m_output.AppendLine("#endif");
+		m_output.AppendLine("");
+
+		m_output.AppendLine("    /* If action has no params, then label is name of action */");
+		m_output.AppendLine("    //if (CAESAR_CARDINAL[CAESAR_L->CAESAR_TRANSITION_NUMBER] == 0)");
+		m_output.AppendLine("    //   CAESAR_RESULT = CAESAR_GATE[CAESAR_L->CAESAR_TRANSITION_NUMBER];");
+		m_output.AppendLine("    //else");
+		m_output.AppendLine("    {");
+		m_output.AppendLine("        /* otherwise.. (standard CADP) */");
+
+		m_output.AppendLine("		if (CAESAR_LABEL_STRING_TABLE == NULL) {");
+		m_output.AppendLine("			CAESAR_CREATE (CAESAR_LABEL_STRING_TABLE, CAESAR_LABEL_HASH_SIZE * sizeof (CAESAR_BODY_LABEL_STRING), CAESAR_TYPE_LABEL_STRING);");
+		m_output.AppendLine("			if (CAESAR_LABEL_STRING_TABLE == NULL)");
+		m_output.AppendLine("			{");
+		m_output.AppendLine("				printf(\"#211 bug during simulation:\\n     out of memory when allocating string table\\n\");");
+		m_output.AppendLine("				printf(\"     abandon\\n\");");
+		m_output.AppendLine("				CAESAR_TERMINATE (1);");
+		m_output.AppendLine("				exit(1);");
+		m_output.AppendLine("			}");
+		m_output.AppendLine("			for (CAESAR_N = 0; CAESAR_N < CAESAR_LABEL_HASH_SIZE; CAESAR_N++)");
+		m_output.AppendLine("				CAESAR_LABEL_STRING_TABLE [CAESAR_N].CAESAR_STRING = NULL;");
+		m_output.AppendLine("		}");
+		m_output.AppendLine("		CAESAR_ITEM = CAESAR_LABEL_STRING_TABLE + CAESAR_HASH_LABEL (CAESAR_L, CAESAR_LABEL_HASH_SIZE);");
+		m_output.AppendLine("		if ((CAESAR_ITEM->CAESAR_STRING != NULL) && CAESAR_COMPARE_LABEL (&(CAESAR_ITEM->CAESAR_LABEL), CAESAR_L)) {");
+		m_output.AppendLine("			CAESAR_RESULT = CAESAR_ITEM->CAESAR_STRING;");
+		m_output.AppendLine("#ifdef CAESAR_LABEL_STRING_STATISTICS");
+		m_output.AppendLine("			CAESAR_LABEL_STRING_TABLE_HIT++;");
+		m_output.AppendLine("#endif");
+		m_output.AppendLine("		} else {");
+		m_output.AppendLine("			if (CAESAR_ITEM->CAESAR_STRING == NULL) {");
+		m_output.AppendLine("#ifdef CAESAR_LABEL_STRING_STATISTICS");
+		m_output.AppendLine("				CAESAR_LABEL_STRING_TABLE_MISS++;");
+		m_output.AppendLine("#endif");
+		m_output.AppendLine("			} else {");
+		m_output.AppendLine("				CAESAR_DELETE (CAESAR_ITEM->CAESAR_STRING);");
+		m_output.AppendLine("#ifdef CAESAR_LABEL_STRING_STATISTICS");
+		m_output.AppendLine("				CAESAR_LABEL_STRING_TABLE_CONFLICT++;");
+		m_output.AppendLine("#endif");
+		m_output.AppendLine("			}");
+		m_output.AppendLine("			CAESAR_ITEM->CAESAR_LABEL = *CAESAR_L;");
+		m_output.AppendLine("			if (CAESAR_BUFFER == NULL) {");
+		m_output.AppendLine("				CAESAR_BUFFER = (CAESAR_TYPE_FILE) tmpfile ();");
+		m_output.AppendLine("				if (CAESAR_BUFFER == NULL)");
+		m_output.AppendLine("				{");
+		m_output.AppendLine("					printf(\"#212 bug during simulation :\\n     cannot allocate tmpfile\\n\");");
+		m_output.AppendLine("					printf(\"     aborting.\\n\");");
+		m_output.AppendLine("					CAESAR_TERMINATE (1);");
+		m_output.AppendLine("					exit(1);");
+		m_output.AppendLine("				}");
+		m_output.AppendLine("			}");
+		m_output.AppendLine("			CAESAR_PRINT_LABEL (CAESAR_BUFFER, CAESAR_L);");
+		m_output.AppendLine("			CAESAR_N = ftell (CAESAR_BUFFER) + 1;");
+		m_output.AppendLine("			rewind (CAESAR_BUFFER);");
+		m_output.AppendLine("			CAESAR_CREATE (CAESAR_ITEM->CAESAR_STRING, CAESAR_N, CAESAR_TYPE_STRING);");
+		m_output.AppendLine("			if (CAESAR_ITEM->CAESAR_STRING == NULL)");
+		m_output.AppendLine("			{");
+		m_output.AppendLine("				printf(\"#213 bug during simulation :\\n     out of memory\\n\");");
+		m_output.AppendLine("				printf(\"     aborting\\n\");");
+		m_output.AppendLine("				CAESAR_TERMINATE (1);");
+		m_output.AppendLine("				exit(1);");
+		m_output.AppendLine("			}");
+		m_output.AppendLine("			if (fgets (CAESAR_ITEM->CAESAR_STRING, CAESAR_N, CAESAR_BUFFER) == NULL)");
+		m_output.AppendLine("			{");
+		m_output.AppendLine("				printf(\"#214 bug during simulation :\\n   fgets  \\n\");");
+		m_output.AppendLine("				printf(\"     aborting.\\n\");");
+		m_output.AppendLine("				CAESAR_TERMINATE (1);");
+		m_output.AppendLine("				exit(1);");
+		m_output.AppendLine("			}");
+		m_output.AppendLine("			rewind (CAESAR_BUFFER);");
+		m_output.AppendLine("			CAESAR_RESULT = CAESAR_ITEM->CAESAR_STRING;");
+		m_output.AppendLine("		}");
+		m_output.AppendLine("	}");
+		m_output.AppendLine("#ifdef CAESAR_LABEL_STRING_STATISTICS");
+		m_output.AppendLine("	fprintf (stderr, \"label table statistics: hit=%u miss=%u conflict=%u total=%u\\n\", CAESAR_LABEL_STRING_TABLE_HIT, CAESAR_LABEL_STRING_TABLE_MISS, CAESAR_LABEL_STRING_TABLE_CONFLICT, CAESAR_LABEL_STRING_TABLE_HIT + CAESAR_LABEL_STRING_TABLE_MISS+CAESAR_LABEL_STRING_TABLE_CONFLICT);");
+		m_output.AppendLine("#endif");
+		m_output.AppendLine("  return CAESAR_RESULT;");
+		rp();
+	}
+
+	/// <summary>
+	/// Method that exports the CAESAR_COMPARE_LABEL function
+	/// </summary>
+	private void DefineCadpCompareLabel()
+	{
+		m_output.AppendLine("CAESAR_TYPE_BOOLEAN CAESAR_COMPARE_LABEL (CAESAR_TYPE_LABEL CAESAR_L1, CAESAR_TYPE_LABEL CAESAR_L2)");
+		lp();
+		m_output.AppendLine("  CAESAR_TYPE_PACKED_TRANSITION_NUMBER CAESAR_N1, CAESAR_N2;");
+		m_output.AppendLine("  CAESAR_N1 = CAESAR_L1->CAESAR_TRANSITION_NUMBER;");
+		m_output.AppendLine("  CAESAR_N2 = CAESAR_L2->CAESAR_TRANSITION_NUMBER;");
+		m_output.AppendLine("");
+		m_output.AppendLine("#ifndef ALL_ACTIONS_VISIBLE");
+		m_output.AppendLine("if (CAESAR_GATEKIND[CAESAR_N1] == INTERNAL_ACTION && CAESAR_GATEKIND[CAESAR_N2] == INTERNAL_ACTION)");
+		m_output.AppendLine("    return 1;");
+		m_output.AppendLine("#endif");
+		m_output.AppendLine("");
+		m_output.AppendLine("  /* if the labels encode different actions, then they are different.. */");
+		m_output.AppendLine("  if (CAESAR_N1 != CAESAR_N2)");
+		m_output.AppendLine("    return 0;");
+		m_output.AppendLine("  /* if it is the same action, then compare the parameters */ ");
+		m_output.AppendLine("  if (CAESAR_CARDINAL[CAESAR_N1] == 0)");
+		m_output.AppendLine("    return 1;  /*no params, hence the same*/");
+		m_output.AppendLine("  switch(CAESAR_N1)");
+		m_output.AppendLine("  {");
+
+		int num = 0;
+		for (final NamedActionIdentifier action: actions)
+		{
+			if (((FunctionType)action.type()).parameter().size() > 0)
+			{
+				m_output.AppendLine(String.format("    case %1$s:", num));
+				m_output.Append("      return ");
+				int paramnr = 0;
+				for (final UlyssesType param: ((FunctionType)action.type()).parameter())
+				{
+					if (paramnr != 0)
+						m_output.AppendLine(" && ");
+					if (CadpType.IsNumeric(param))
+
+						m_output.Append(
+								String.format("CAESAR_L1->CAESAR_UNION.CAESAR_PROFILE_%1$s.PARAM_%2$s == CAESAR_L2->CAESAR_UNION.CAESAR_PROFILE_%1$s.PARAM_%2$s", num, paramnr));
+					else
+						m_output.Append(
+								String.format("0 == memcmp(&(CAESAR_L1->CAESAR_UNION.CAESAR_PROFILE_%1$s.PARAM_%2$s),&(CAESAR_L2->CAESAR_UNION.CAESAR_PROFILE_%1$s.PARAM_%2$s),sizeof(%3$s))", num, paramnr, CadpType.DumpType(param)));
+
+					paramnr++;
+				}
+				m_output.AppendLine(";");
+			}
+			num++;
+		}
+		m_output.AppendLine("  }");
+		m_output.AppendLine("  printf(\"#211 bug during simulation :\\n     CAESAR_COMPARE_LABEL\\n\");");
+		m_output.AppendLine("  printf(\"     aborting\\n\");");
+		m_output.AppendLine("  CAESAR_TERMINATE (1);");
+		m_output.AppendLine("  exit(1);");
+		rp();
+	}
+
+	/// <summary>
+	/// Method that exports the CAESAR_HASH_LABEL function
+	/// </summary>
+	private void DefineCadpHashLabel()
+	{
+		m_output.AppendLine("CAESAR_TYPE_NATURAL CAESAR_HASH_LABEL (CAESAR_TYPE_LABEL CAESAR_L, CAESAR_TYPE_NATURAL CAESAR_MODULUS)");
+		lp();
+		m_output.AppendLine("  CAESAR_TYPE_NATURAL CAESAR_RESULT;");
+		m_output.AppendLine("  CAESAR_TYPE_NATURAL CAESAR_SIZE;");
+		m_output.AppendLine("");
+		m_output.AppendLine("#ifndef ALL_ACTIONS_VISIBLE");
+		m_output.AppendLine("  if (CAESAR_GATEKIND[CAESAR_L->CAESAR_TRANSITION_NUMBER] == INTERNAL_ACTION)");
+		m_output.AppendLine("    return INTERNAL_ACTION_NUMBER % CAESAR_MODULUS;");
+		m_output.AppendLine("#endif");
+		m_output.AppendLine("");
+		m_output.AppendLine("  /* if action has no params, then hash is trans num */");
+		m_output.AppendLine("  if (CAESAR_CARDINAL[CAESAR_L->CAESAR_TRANSITION_NUMBER] == 0)");
+		m_output.AppendLine("     return CAESAR_L->CAESAR_TRANSITION_NUMBER % CAESAR_MODULUS;");
+		m_output.AppendLine("  /* otherwise it gets more complicated.. */");
+		m_output.AppendLine("  switch (CAESAR_L->CAESAR_TRANSITION_NUMBER)");
+		m_output.AppendLine("  {");
+
+		int num = 0;
+		for (final NamedActionIdentifier action : actions)
+		{
+			if (((FunctionType)action.type()).parameter().size() > 0)
+			{
+				m_output.AppendLine(String.format("    case %1$s:", num));
+//				int paramnr = 0;
+				for (@SuppressWarnings("unused") final UlyssesType param: ((FunctionType)action.type()).parameter())
+				{
+					m_output.AppendLine(
+							String.format("      CAESAR_SIZE = sizeof (CAESAR_L->CAESAR_UNION.CAESAR_PROFILE_%1$s);", num));
+					m_output.AppendLine("      break;");
+//					paramnr++;
+				}
+			}
+			num++;
+		}
+		m_output.AppendLine("    default:");
+		m_output.AppendLine("      return CAESAR_L->CAESAR_TRANSITION_NUMBER % CAESAR_MODULUS;");
+		m_output.AppendLine("  }");
+		m_output.AppendLine("  {");
+		m_output.AppendLine("    CAESAR_TYPE_WORD CAESAR_SHIFT_LOW, CAESAR_SHIFT_HIGH;");
+		m_output.AppendLine("    CAESAR_TYPE_WORD *CAESAR_LOW, *CAESAR_HIGH;");
+		m_output.AppendLine("    CAESAR_SHIFT_LOW = ((CAESAR_TYPE_WORD) (&(CAESAR_L->CAESAR_UNION))) % CAESAR_WORD_SIZE;");
+		m_output.AppendLine("    CAESAR_LOW = (CAESAR_TYPE_WORD *) ((unsigned char *) (&(CAESAR_L->CAESAR_UNION)) - CAESAR_SHIFT_LOW);");
+		m_output.AppendLine("    CAESAR_HIGH = (CAESAR_TYPE_WORD *) ((unsigned char *) (&(CAESAR_L->CAESAR_UNION)) + CAESAR_SIZE);");
+		m_output.AppendLine("    CAESAR_SHIFT_HIGH = ((CAESAR_TYPE_WORD) CAESAR_HIGH) % CAESAR_WORD_SIZE;");
+		m_output.AppendLine("    CAESAR_HIGH = (CAESAR_TYPE_WORD *) ((unsigned char *) CAESAR_HIGH - CAESAR_SHIFT_HIGH);");
+		m_output.AppendLine("    if (CAESAR_LOW == CAESAR_HIGH) {");
+		m_output.AppendLine("      CAESAR_RESULT = htonl (*CAESAR_LOW);");
+		m_output.AppendLine("      if (CAESAR_SHIFT_LOW)");
+		m_output.AppendLine("        CAESAR_RESULT &= CAESAR_FULL_MASK >> (8 * CAESAR_SHIFT_LOW);");
+		m_output.AppendLine("        if (CAESAR_SHIFT_HIGH)");
+		m_output.AppendLine("          CAESAR_RESULT &= CAESAR_FULL_MASK << (8 * (CAESAR_WORD_SIZE - CAESAR_SHIFT_HIGH));");
+		m_output.AppendLine("    } else {");
+		m_output.AppendLine("      CAESAR_RESULT = 0;");
+		m_output.AppendLine("      if (CAESAR_SHIFT_LOW) {");
+		m_output.AppendLine("        CAESAR_RESULT ^= htonl (*(CAESAR_LOW++)) & (CAESAR_FULL_MASK >> (8 * CAESAR_SHIFT_LOW));");
+		m_output.AppendLine("      }");
+		m_output.AppendLine("      while (CAESAR_LOW < CAESAR_HIGH) {");
+		m_output.AppendLine("        CAESAR_RESULT ^= htonl (*(CAESAR_LOW++));");
+		m_output.AppendLine("      }");
+		m_output.AppendLine("      if (CAESAR_SHIFT_HIGH) {");
+		m_output.AppendLine("        CAESAR_RESULT ^= htonl (*CAESAR_LOW) & (CAESAR_FULL_MASK << (8 * (CAESAR_WORD_SIZE - CAESAR_SHIFT_HIGH)));");
+		m_output.AppendLine("      }");
+		m_output.AppendLine("    }");
+		m_output.AppendLine("    if (CAESAR_SHIFT_LOW) {");
+		m_output.AppendLine("      CAESAR_RESULT = ((CAESAR_RESULT >> ((CAESAR_WORD_SIZE - CAESAR_SHIFT_LOW) * 8)) | (CAESAR_RESULT << (CAESAR_SHIFT_LOW * 8)));");
+		m_output.AppendLine("    }");
+		m_output.AppendLine("    CAESAR_RESULT = (CAESAR_RESULT ^ CAESAR_L->CAESAR_TRANSITION_NUMBER) % CAESAR_MODULUS;");
+		m_output.AppendLine("  }");
+		m_output.AppendLine("  return (CAESAR_RESULT);");
+		rp();
+	}
+
+	/// <summary>
+	/// Method that exports the CAESAR_PRINT_LABEL function
+	/// </summary>
+	private void DefineCadpPrintLabel()
+	{
+		m_output.AppendLine("void CAESAR_PRINT_LABEL (CAESAR_TYPE_FILE CAESAR_FILE, CAESAR_TYPE_LABEL CAESAR_L)");
+		lp();
+
+		m_output.AppendLine("  char* actionTag = \"\";");
+		m_output.AppendLine("  switch (CAESAR_L->CAESAR_TRANSITION_NUMBER)");
+		m_output.AppendLine("  {");
+		int gatenum = 0;
+		for (final NamedActionIdentifier action: actions)
+		{
+			m_output.AppendLine(String.format("    case %1$s:", gatenum));
+			String controbsmark = "";
+			if (((FunctionType)action.type()).functionType() == FunctionTypeEnum.Controllable)
+				controbsmark = "ctr ";
+			else if (((FunctionType)action.type()).functionType() == FunctionTypeEnum.Observable)
+				controbsmark = "obs ";
+			m_output.AppendLine(String.format("      actionTag = \"%1$s\";", controbsmark));
+			m_output.AppendLine("break;");
+			gatenum++;
+		}
+		m_output.AppendLine("  }");
+
+		m_output.AppendLine("#ifndef ALL_ACTIONS_VISIBLE");
+		m_output.AppendLine("  fprintf(CAESAR_FILE, \"%s%s\", actionTag, CAESAR_GATEKIND[CAESAR_L->CAESAR_TRANSITION_NUMBER] == INTERNAL_ACTION ? CAESAR_GATE[INTERNAL_ACTION_NUMBER] : CAESAR_GATE[CAESAR_L->CAESAR_TRANSITION_NUMBER]);");
+		m_output.AppendLine("#else");
+		m_output.AppendLine("  fprintf(CAESAR_FILE, \"%s%s\", actionTag, CAESAR_GATE[CAESAR_L->CAESAR_TRANSITION_NUMBER]);");
+		m_output.AppendLine("#endif");
+
+		m_output.AppendLine("  switch (CAESAR_L->CAESAR_TRANSITION_NUMBER)");
+		m_output.AppendLine("  {");
+
+		gatenum = 0;
+		for (final NamedActionIdentifier action : actions)
+		{
+			if (((FunctionType)action.type()).parameter().size() > 0)
+			{
+				m_output.AppendLine(String.format("    case %1$s:", gatenum));
+				m_output.AppendLine("#ifndef ALL_ACTIONS_VISIBLE");
+				m_output.AppendLine("if (CAESAR_GATEKIND[CAESAR_L->CAESAR_TRANSITION_NUMBER] != INTERNAL_ACTION)");
+				m_output.AppendLine("#endif");
+				m_output.AppendLine("{");
+				m_output.AppendLine("      fprintf(CAESAR_FILE,\"  (\");");
+				int paramnum = 0;
+				for (final ParameterIdentifier paramname : action.parameter())
+				{
+					final UlyssesType param = paramname.type();
+					CadpType.EmitType(param);
+					m_output.AppendLine(String.format("      fprintf(CAESAR_FILE,\"%1$s: \");", paramname.tokenText()));
+					m_output.AppendLine(String.format("      %1$s%4$s(CAESAR_FILE, CAESAR_L->CAESAR_UNION.CAESAR_PROFILE_%2$s.PARAM_%3$s);",
+							CadpType.printString, gatenum, paramnum, CadpIdentifier.GetIdentifierString(param.identifier())));
+					m_output.AppendLine("      fprintf(CAESAR_FILE,\" \");");
+					paramnum++;
+				}
+				m_output.AppendLine("      fprintf(CAESAR_FILE,\")\");");
+				m_output.AppendLine("}");
+				m_output.AppendLine("      break;");
+			}
+			gatenum++;
+		}
+		m_output.AppendLine("  }");
+		rp();
+	}
+
+	/// <summary>
+	/// Method that exports the CAESAR_START_STATE function
+	/// </summary>
+	private void DefineCadpStartState()
+	{
+		m_output.AppendLine("void CAESAR_START_STATE (CAESAR_TYPE_STATE CAESAR_S)");
+		lp();
+		m_output.AppendLine("  memset ((char *) CAESAR_S, 0, CAESAR_SIZE_STATE());");
+		m_output.AppendLine(" Model_Reset();");
+		for (final AttributeIdentifier x: m_statevector)
+		{
+			m_output.Append("  CAESAR_S->");
+			m_output.Append(x.tokenText());
+			m_output.Append("=");
+			final CadpType targettype = new CadpType();
+			x.type().Accept(targettype);
+			//m_output.Append(String.format("(%1$s) ",targettype.ToString()));
+			final CadpExpression myvis = new CadpExpression(new CadpActionInfo(null, -1, 0, "", "", "CAESAR_S"));
+			x.initializer().Accept(myvis);
+			m_output.Append(myvis.toString());
+			m_output.AppendLine(";");
+		}
+		rp();
+	}
+
+
+	public static String FunctionHeader(FunctionIdentifier fun)
+	{
+		return FunctionHeader(fun, fun.tokenText());
+	}
+
+
+	public static String FunctionHeader(FunctionIdentifier fun, String functionName)
+	{
+		final StringBuilder paramStr = new StringBuilder("CAESAR_TYPE_STATE CAESAR_S1");
+		for (final ParameterIdentifier param : fun.parameter())
+		{
+			//CadpType.EmitType(param.type);
+			paramStr.append(", ");
+			paramStr.append(String.format("%1$s %2$s", DumpType(param.type()), CadpIdentifier.GetIdentifierString(param)));
+		}
+		if (((FunctionType)fun.type()).returnType() != null)
+		{
+			//CadpType.EmitType(((FunctionType)fun.type).returnType);
+			paramStr.append(", ");
+			paramStr.append(String.format("%1$s *param_result", DumpType(((FunctionType)fun.type()).returnType())));
+		}
+		return String.format("struct STATE_LIST* %1$s (%2$s)", functionName, paramStr.toString());
+	}
+
+	public static String FunctionHeader(FunctionType fun, String functionName)
+	{
+		final StringBuilder paramStr = new StringBuilder("CAESAR_TYPE_STATE CAESAR_S1");
+		int i = 0;
+		for (final UlyssesType param : fun.parameter())
+		{
+			//CadpType.EmitType(param);
+			paramStr.append(", ");
+			paramStr.append(String.format("%1$s param_%2$s", DumpType(param), i));
+			i++;
+		}
+		if (fun.returnType() != null)
+		{
+			//CadpType.EmitType(((FunctionType)fun).returnType);
+			paramStr.append(", ");
+			paramStr.append(String.format("%1$s *param_result", DumpType(fun.returnType())));
+		}
+		return String.format("struct STATE_LIST* %1$s (%2$s)", functionName, paramStr.toString());
+	}
+
+	public static final String StateVariablePrefix = "((CAESAR_TYPE_STATE)elem->aState)";
+
+
+	/// <summary>
+	/// Exports a named action.
+	/// </summary>
+	private void DefineCadpAction(FunctionIdentifier action, int actionnumber)
+	{
+		// we only want to have about 100 statements in one function so that we do not overload the
+		// stack frame with local variables. Hence we need to come up with a splitting of the
+		// statement list... We do some easy thing here and only split on the top-level sequential block.
+		final CadpActionInfo info = new CadpActionInfo(action, 10, actionnumber, "worklist", "newstatelist", "((CAESAR_TYPE_STATE)elem->aState)");
+		final CadpStatement visitor = new CadpStatement(info);
+		action.body().Accept(visitor);
+
+		// print out any helper code
+		final String helperMethods = info.m_helperMethods.toString();
+		m_output.AppendLine(helperMethods);
+		m_output.AppendLine();
+
+		// print header of procedure
+		m_output.AppendLine(FunctionHeader(action));
+
+		lp();
+
+		for (final Identifier sym: action.symbolTable().symbolList())
+		{
+			if (sym.kind() == IdentifierKind.LocalVariableIdentifier)
+			{
+				// FIXME: We need another structure for the state vars defined here, analogue to
+				// the main system state thing. Just emitting a local variable here won't cut it.
+				//throw new NotImplementedException("Local variables not supported by the CADP backend.");
+				final CadpIdentifier ident = new CadpIdentifier(OoaCADPVisitor.StateVariablePrefix);
+				sym.Accept(ident);
+				m_output.AppendLine(String.format("  %1$s %2$s; /*local variable*/", DumpType(sym.type()), ident.toString()));
+			}
+		}
+
+		m_output.AppendLine("  struct STATE_LIST *worklist = NULL;");
+		m_output.AppendLine("  struct STATE_LIST *newstatelist = NULL;");
+		m_output.AppendLine("  LIST_INSERT_STATE(worklist,CAESAR_S1);");
+		m_output.AppendLine("  struct STATE_LIST *_initial_worklist = worklist;");
+
+		m_output.AppendLine(visitor.toString());
+
+
+		m_output.AppendLine("  /* delete all intermediate states. */");
+		m_output.AppendLine("  ITERATE_STATES(newstatelist,  ((CAESAR_TYPE_STATE)elem->aState)->_predecessor = CAESAR_S1;);");
+
+		if (actionnumber >= 0)
+		{
+			m_output.AppendLine(String.format("  if ( newstatelist != NULL) {"));
+			m_output.AppendLine("  CAESAR_TYPE_LABEL label;");
+			m_output.AppendLine("  CAESAR_CREATE (label, CAESAR_SIZE_LABEL(), CAESAR_TYPE_LABEL);");
+			m_output.AppendLine(String.format("  label->CAESAR_TRANSITION_NUMBER = %1$s;", actionnumber));
+			int paramnumber = 0;
+			for (final ParameterIdentifier param : action.parameter())
+			{
+				m_output.AppendLine(String.format("label->CAESAR_UNION.CAESAR_PROFILE_%1$s.PARAM_%2$s = %3$s;", actionnumber, paramnumber, CadpIdentifier.GetIdentifierString(param)));
+				paramnumber++;
+			}
+			m_output.AppendLine(" ITERATE_STATES(newstatelist,elem->aLabel = label;);");
+
+			m_output.AppendLine("  } /* newstatelist != NULL */");
+		}
+
+		m_output.AppendLine("  free(_initial_worklist);");
+
+		m_output.AppendLine("  return newstatelist;");
+		rp();
+	}
+
+	/// <summary>
+	/// Exports method that calculates all reachable states from an initial state by
+	/// evaluating the do-od block once.
+	/// </summary>
+	private void DefineCadpCalculateOneIteration(Block doOdBlock)
+	{
+		m_output.AppendLine("void OneIteration(struct STATE_LIST *worklist, struct STATE_LIST *newstatelist)");
+		m_output.AppendLine("{");
+		final CadpStatement visitor = new CadpStatement(new CadpActionInfo(null, -1, 0, "worklist", "newstatelist", "((CAESAR_TYPE_STATE)elem->aState)"), true);
+		doOdBlock.Accept(visitor);
+		m_output.AppendLine(visitor.toString());
+		m_output.AppendLine("");
+		m_output.AppendLine("  worklist = newstatelist;");
+		m_output.AppendLine("  newstatelist = NULL;");
+		m_output.AppendLine("  /* end states are not hidden */ ");
+		m_output.AppendLine("  ITERATE_STATES(worklist,  ((CAESAR_TYPE_STATE)elem->aState)->_hidden = 0;);");
+		m_output.AppendLine("  /* setup tree and remove dead-ends */ ");
+		m_output.AppendLine("  mark_tree(worklist);    /*mark&sweep dead ends*/");
+		m_output.AppendLine("  sweep_states(ARGOS_ALL_STATES);");
+		m_output.AppendLine("  unmark_tree(worklist);");
+		m_output.AppendLine("  connect_tree(ARGOS_ALL_STATES); /*setup successor relation*/");
+		m_output.AppendLine("  free_allStateList(&ARGOS_ALL_STATES); /*free allstatelist and worklist*/");
+		m_output.AppendLine("}");
+	}
+
+	/// <summary>
+	/// Method that exports the CAESAR_ITERATE_STATE function
+	/// </summary>
+	private void DefineCadpIterateState(OoActionSystemType system)
+	{
+		if (system.doOdBlock() != null)
+			DefineCadpCalculateOneIteration(system.doOdBlock());
+
+		line();
+
+		m_output.AppendLine("void CAESAR_ITERATE_STATE (CAESAR_TYPE_STATE CAESAR_S1, CAESAR_TYPE_LABEL CAESAR_L, CAESAR_TYPE_STATE CAESAR_S2, void (*CAESAR_LOOP) (CAESAR_TYPE_STATE, CAESAR_TYPE_LABEL, CAESAR_TYPE_STATE))");
+		lp();
+
+		m_output.AppendLine("#ifndef UNLIMITED_REEVAL");
+		m_output.AppendLine("  if (CAESAR_S1->_successors == NULL && CAESAR_S1->_hidden == 1)");
+		m_output.AppendLine("  {");
+		m_output.AppendLine("      printf(\"Re-evaluation of internal state not possible: Re-compile with UNLIMITED_REEVAL defined.\\n\");");
+		m_output.AppendLine("      /*if you want to have this feature, you must not free the successors below. leak!*/");
+		m_output.AppendLine("      abort();");
+		m_output.AppendLine("  }");
+		m_output.AppendLine("#endif");
+
+		m_output.AppendLine("  if (CAESAR_S1->_successors == NULL && CAESAR_S1->_hidden == 0)");
+		m_output.AppendLine("  {");
+		if (system.doOdBlock() != null)
+		{
+			m_output.AppendLine("  struct STATE_LIST *worklist = NULL;");
+			m_output.AppendLine("  struct STATE_LIST *newstatelist = NULL;");
+			m_output.AppendLine("  LIST_INSERT_STATE(worklist,CAESAR_S1);");
+			m_output.AppendLine("  struct STATE_LIST *initial_worklist = worklist;");
+			m_output.AppendLine("  OneIteration(worklist, newstatelist);");
+			m_output.AppendLine("  free(initial_worklist);");
+		}
+		m_output.AppendLine("  } /* done calculating successors.. */");
+
+		m_output.AppendLine("  if (CAESAR_S1->_successors != NULL)");
+		m_output.AppendLine("  {");
+		m_output.AppendLine("    struct STATE_LIST *elem = CAESAR_S1->_successors;");
+		m_output.AppendLine("    struct STATE_LIST *nelem = NULL;");
+		m_output.AppendLine("#ifndef UNLIMITED_REEVAL");
+		m_output.AppendLine("    CAESAR_S1->_successors = NULL;");
+		m_output.AppendLine("#endif");
+		m_output.AppendLine("    while (elem != NULL)");
+		m_output.AppendLine("    {");
+		m_output.AppendLine("      if (elem->aLabel == NULL) {");
+		//INTERNAL_ACTION_NUMBER
+		m_output.AppendLine("        CAESAR_TYPE_LABEL label;");
+		m_output.AppendLine("        CAESAR_CREATE (label, CAESAR_SIZE_LABEL(), CAESAR_TYPE_LABEL);");
+		m_output.AppendLine("        label->CAESAR_TRANSITION_NUMBER = INTERNAL_ACTION_NUMBER;");
+		m_output.AppendLine("        elem->aLabel = label;");
+		m_output.AppendLine("      }");
+		m_output.AppendLine("      memcpy(CAESAR_S2,elem->aState,CAESAR_SIZE_STATE());");
+		/*
+                        m_output.AppendLine("      if (CAESAR_S2->_hidden == 1 && (int)CAESAR_S2->_statenum < 0)");
+                        m_output.AppendLine("      {");
+                        m_output.AppendLine("          printf(\"statenum not initialized: %d\\n\", (int)CAESAR_S2->_statenum);");
+                        m_output.AppendLine("          abort();");
+                        m_output.AppendLine("      }");
+		 */
+		m_output.AppendLine("      CAESAR_S2->_predecessor = NULL;");
+
+		m_output.AppendLine("      memcpy(CAESAR_L,elem->aLabel,CAESAR_SIZE_LABEL());");
+		m_output.AppendLine("      CAESAR_LOOP(CAESAR_S1, CAESAR_L, CAESAR_S2);");
+		m_output.AppendLine("      nelem = elem->next;");
+		m_output.AppendLine("#ifndef UNLIMITED_REEVAL");
+		m_output.AppendLine("      free(elem->aLabel);");
+		m_output.AppendLine("      free(elem->aState); /*leaky: we must not free the successor list because of hidden states*/");
+		m_output.AppendLine("      free(elem);");
+		m_output.AppendLine("#endif");
+		m_output.AppendLine("      elem = nelem;");
+		m_output.AppendLine("    }");
+		m_output.AppendLine("  }");
+		rp();
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/argos_runtime_helpers.c
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/argos_runtime_helpers.c	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/argos_runtime_helpers.c	(revision 2)
@@ -0,0 +1,197 @@
+
+#include "argos_runtime.h"
+#include "stdio.h"
+#include "string.h"
+
+#define MARK(FIELD)   do { FIELD = (FIELD) | 0x40; } while (0)
+#define UNMARK(FIELD) do { FIELD = (FIELD) & 0xbf; } while (0)
+#define MARKED(FIELD) ((FIELD & 0x40) != 0)
+
+
+struct STATE_LIST_LIST * ARGOS_ALL_STATES = NULL;
+
+
+void
+mark_tree (struct STATE_LIST *reachableStates)
+{
+	struct STATE_LIST *toMark = NULL;
+	while(reachableStates != NULL)
+	{
+		LIST_INSERT_STATE(toMark,reachableStates->aState);
+		reachableStates = reachableStates->next;
+	}
+
+	while (toMark != NULL) {
+		struct CAESAR_STRUCT_STATE *currState = (struct CAESAR_STRUCT_STATE *) toMark->aState;
+		MARK(currState->_hidden);
+		if ((currState->_predecessor != NULL) && !MARKED(currState->_predecessor->_hidden))
+			toMark->aState = currState->_predecessor;
+		else
+		{
+			reachableStates = toMark->next;
+			free(toMark);
+			toMark = reachableStates;
+		}
+	}
+}
+
+
+void list_insert_list(struct STATE_LIST * statelist, struct STATE_LIST * insert)
+{
+	LIST_INSERT_LIST(statelist,insert);
+}
+
+
+void
+unmark_tree (struct STATE_LIST *reachableStates)
+{
+	struct STATE_LIST *toMark = NULL;
+	while(reachableStates != NULL)
+	{
+		LIST_INSERT_STATE(toMark,reachableStates->aState);
+		reachableStates = reachableStates->next;
+	}
+
+	while (toMark != NULL) {
+		struct CAESAR_STRUCT_STATE *currState = (struct CAESAR_STRUCT_STATE *) toMark->aState;
+		UNMARK(currState->_hidden);
+		if ((currState->_predecessor != NULL) && MARKED(currState->_predecessor->_hidden))
+			toMark->aState = currState->_predecessor;
+		else
+		{
+			reachableStates = toMark->next;
+			free(toMark);
+			toMark = reachableStates;
+		}
+	}
+}
+
+
+void
+connect_tree (struct STATE_LIST_LIST *allStateList)
+{
+	while (allStateList != NULL)
+	{
+		if (allStateList->aListElem != NULL)
+		{
+			struct CAESAR_STRUCT_STATE *currState = (struct CAESAR_STRUCT_STATE *) allStateList->aListElem->aState;
+			struct CAESAR_STRUCT_STATE *pred = currState->_predecessor;
+			struct STATE_LIST *newconn;
+			if (pred != NULL)
+			{
+				LIST_CREATE(newconn);
+				newconn->aLabel = allStateList->aListElem->aLabel;
+				newconn->aState = currState;
+				LIST_INSERT_SINGLELIST(pred->_successors, newconn);
+			}
+		}
+		allStateList = allStateList->next;
+	}
+}
+
+
+
+void
+sweep_states (struct STATE_LIST_LIST *allStateList)
+{
+	while (allStateList != NULL)
+	{
+		if (allStateList->aListElem != NULL)
+		{
+			struct CAESAR_STRUCT_STATE *currState = (struct CAESAR_STRUCT_STATE *) allStateList->aListElem->aState;
+			if ( !MARKED(currState->_hidden))
+			{
+				CAESAR_DELETE_STATE (&currState);
+				free(allStateList->aListElem);
+				allStateList->aListElem = NULL;
+			}
+		}
+		allStateList = allStateList->next;
+	}
+}
+
+
+
+
+void
+unmark_states(struct STATE_LIST_LIST *allStateList)
+{
+	while (allStateList != NULL)
+	{
+		if (allStateList->aListElem != NULL)
+		{
+			struct CAESAR_STRUCT_STATE *currState = (struct CAESAR_STRUCT_STATE *) allStateList->aListElem->aState;
+			if ( MARKED(currState->_hidden))
+				UNMARK(currState->_hidden);
+		}
+		allStateList = allStateList->next;
+	}
+}
+
+
+
+
+void
+free_allStateList(struct STATE_LIST_LIST **allStateList)
+{
+	struct STATE_LIST_LIST *list = *allStateList;
+	while (list != NULL)
+	{
+		struct STATE_LIST_LIST * tmp = list->next;
+		if (list->aListElem != NULL)
+			free(list->aListElem); /*do not free the state..*/
+		free(list);
+		list = tmp;
+	}
+	*allStateList = NULL;
+}
+
+
+struct STATE_LIST *
+GetPrioritizedWorkList(struct STATE_LIST * aWorkList, struct STATE_LIST * finalStates)
+{
+	struct STATE_LIST * tmpList = aWorkList;
+	while(tmpList)
+	{
+		if (MARKED(((CAESAR_TYPE_STATE)tmpList->aState)->_hidden))
+			CAESAR_TERMINATE(1);
+		MARK(((CAESAR_TYPE_STATE)tmpList->aState)->_hidden);
+		tmpList = tmpList->next;
+	}
+
+	while (finalStates != NULL)
+	{
+		CAESAR_TYPE_STATE aState = (CAESAR_TYPE_STATE) finalStates->aState;
+		while(aState != NULL)
+		{
+			if (MARKED(aState->_hidden))
+			{
+				// do not include the state in worklist
+				UNMARK(aState->_hidden);
+				goto next;
+			}
+			aState = aState->_predecessor;
+		}
+next:
+		finalStates = finalStates->next;
+	}
+
+	tmpList = aWorkList;
+	struct STATE_LIST * result = NULL;
+	struct STATE_LIST * nextelem = NULL;
+	while(tmpList)
+	{
+		nextelem = tmpList->next;
+		if (MARKED(((CAESAR_TYPE_STATE)tmpList->aState)->_hidden))
+		{
+			// include in new worklist
+			LIST_INSERT_SINGLELIST(result,tmpList);
+		}
+		UNMARK(((CAESAR_TYPE_STATE)tmpList->aState)->_hidden);
+		tmpList = nextelem;
+	}
+
+	return result;
+}
+
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpIdentifier.java	(revision 2)
@@ -0,0 +1,242 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.cadp;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.identifiers.LocalVariableIdentifier;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.Module;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.NondetIdentifierList;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.identifiers.PrioIdentifierList;
+import org.momut.ooas.ast.identifiers.SelfTypeIdentifier;
+import org.momut.ooas.ast.identifiers.SeqIdentifierList;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.identifiers.UnspecIdentifierList;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+/// <summary>
+/// Knows how to construct a C-CADP identifier from an AST-Identifier
+/// (enums, attributes, variables, parameters supported)
+/// </summary>
+public final class CadpIdentifier extends OoaCompleteAstTraversalVisitor
+{
+	private final OoasCodeEmitter m_emitter = new OoasCodeEmitter();
+	private final String m_stateVariablePrefix;
+
+	/// <summary>
+	/// enums are mapped to ints, so an enum identifier simply gets an integer.
+	/// </summary>
+	@Override
+	public  void visit(EnumIdentifier enumIdentifier)
+	{
+		if (enumIdentifier.HaveValue())
+		{
+			m_emitter.Append(enumIdentifier.Value());
+			m_emitter.Append(" /* ");
+			m_emitter.Append(enumIdentifier.tokenText());
+			m_emitter.Append(" */ ");
+		}
+		else
+		{
+			final EnumType anEnum = (EnumType)enumIdentifier.type();
+			m_emitter.Append(anEnum.listOfEnumSymbols().indexOf(enumIdentifier));
+			m_emitter.Append(" /* ");
+			m_emitter.Append(enumIdentifier.tokenText());
+			m_emitter.Append(" */ ");
+		}
+	}
+	@Override
+	public  void visit(LandmarkIdentifier landmarkIdentifier)
+	{
+		throw new UnsupportedOperationException();
+	}
+	@Override
+	public  void visit(AttributeIdentifier attributeIdentifier)
+	{
+		if (m_stateVariablePrefix != null && !m_stateVariablePrefix.equals(""))
+		{
+			m_emitter.Append(m_stateVariablePrefix);
+			m_emitter.Append("->");
+		}
+		m_emitter.Append(attributeIdentifier.tokenText());
+	}
+	@Override
+	public  void visit(ExpressionVariableIdentifier expressionVariableIdentifier)
+	{
+		// expression vars are local..
+		m_emitter.Append(expressionVariableIdentifier.tokenText());
+	}
+	@Override
+	public  void visit(ParameterIdentifier parameterIdentifier)
+	{
+		/* handed in as parameter to named action, hence no state ref. necessary. */
+		if (parameterIdentifier.tokenText().equals("result"))
+			m_emitter.Append(String.format("*param_%1$s", parameterIdentifier.tokenText()));
+		else
+			m_emitter.Append(String.format("param_%1$s", parameterIdentifier.tokenText()));
+	}
+	@Override
+	public  void visit(LocalVariableIdentifier localVariableIdentifier)
+	{
+		m_emitter.Append(localVariableIdentifier.tokenText());
+	}
+	@Override
+	public  void visit(TypeIdentifier typeIdentifier)
+	{
+		m_emitter.Append("aType_");
+		if (typeIdentifier.type().kind() == TypeKind.ListType)
+		{
+			m_emitter.Append("list_");
+			final ListType alist = (ListType)typeIdentifier.type();
+			if (alist.maxNumberOfElements() >= 0)
+				m_emitter.Append(String.format("%1$s_", alist.maxNumberOfElements()));
+			else
+				m_emitter.Append(String.format("dyn_", alist.maxNumberOfElements()));
+
+			visit(alist.innerType().identifier());
+		}
+		else if (typeIdentifier.type().kind() == TypeKind.FunctionType)
+		{
+			final FunctionType funType = (FunctionType) typeIdentifier.type();
+			m_emitter.Append(typeIdentifier.tokenText());
+			for (final UlyssesType x : funType.parameter())
+			{
+				m_emitter.Append("_");
+				m_emitter.Append(x.toString());
+			}
+			if (funType.returnType() != null)
+			{
+				m_emitter.Append("__");
+				m_emitter.Append(funType.returnType().toString());
+			}
+		}
+		else
+			m_emitter.Append(typeIdentifier.tokenText());
+	}
+
+	@Override
+	public  void visit(SelfTypeIdentifier aself)
+	{
+		m_emitter.Append(aself.tokenText());
+	}
+
+	@Override
+	public  void visit(MethodIdentifier methodIdentifier)
+	{
+		m_emitter.Append(methodIdentifier.tokenText());
+	}
+	@Override
+	public  void visit(NamedActionIdentifier namedActionIdentifier)
+	{
+		m_emitter.Append(namedActionIdentifier.tokenText());
+	}
+	@Override
+	public  void visit(MainModule mainModule)
+	{
+		throw new UnsupportedOperationException();
+	}
+	@Override
+	public  void visit(Module module)
+	{
+		throw new UnsupportedOperationException();
+	}
+	@Override
+	public  void visit(NondetIdentifierList nondetIdentifierList)
+	{
+		throw new UnsupportedOperationException();
+	}
+	@Override
+	public  void visit(SeqIdentifierList seqIdentifierList)
+	{
+		throw new UnsupportedOperationException();
+	}
+	@Override
+	public  void visit(PrioIdentifierList prioIdentifierList)
+	{
+		throw new UnsupportedOperationException();
+	}
+	@Override
+	public  void visit(UnspecIdentifierList unspecIdentifierList)
+	{
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	protected  void VisitAstElement(IAst element, IAst parent)
+	{
+		if (element.nodeType() == AstNodeTypeEnum.identifier)
+			super.VisitAstElement(element, parent);
+	}
+
+	@Override
+	public  String toString()
+	{
+		return m_emitter.toString();
+	}
+
+	public CadpIdentifier(String stateVariablePrefix)
+	{
+		super(null);
+		m_stateVariablePrefix = stateVariablePrefix;
+	}
+
+
+	public static String GetIdentifierString(TypeIdentifier typeIdentifier)
+	{
+		final CadpIdentifier ident = new CadpIdentifier("");
+		ident.visit(typeIdentifier);
+		return ident.toString();
+	}
+	public static String GetIdentifierString(ParameterIdentifier aParam)
+	{
+		final CadpIdentifier anid = new CadpIdentifier("");
+		anid.visit(aParam);
+		return anid.toString();
+	}
+	public static Object GetIdentifierString(Identifier x)
+	{
+		final CadpIdentifier anid = new CadpIdentifier(OoaCADPVisitor.StateVariablePrefix);
+		x.Accept(anid);
+		return anid.toString();
+	}
+}
Index: trunk/compiler/ooasCompiler/.classpath
===================================================================
--- trunk/compiler/ooasCompiler/.classpath	(nonexistent)
+++ trunk/compiler/ooasCompiler/.classpath	(revision 2)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="lib" path="libraries/antlr-3.4-complete.jar"/>
+	<classpathentry kind="lib" path="libraries/protobuf.jar"/>
+	<classpathentry kind="lib" path="libraries/jna-4.0.0.jar"/>
+	<classpathentry kind="lib" path="libraries/jna-platform-4.0.0.jar"/>
+	<classpathentry kind="lib" path="libraries/ecj-4.4.2.jar"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaCodeCompiler.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaCodeCompiler.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaCodeCompiler.java	(revision 2)
@@ -0,0 +1,195 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.java;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.tools.FileObject;
+import javax.tools.ForwardingJavaFileManager;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.StandardJavaFileManager;
+
+import org.eclipse.jdt.internal.compiler.tool.EclipseCompiler;
+import org.momut.ooas.parser.ParserError;
+import org.momut.ooas.parser.ParserState;
+
+/**
+ * This code is based on a blog entry of Morten Nobel.
+ *
+ * http://blog.nobel-joergensen.com/2008/07/16/using-eclipse-compiler-to-create-dynamic-java-objects-2/
+ *
+ */
+/// <summary>
+/// This class can be used to execute dynamic uncompiled code at runtime
+/// This class is not exception safe, all function calls should be exception handled.
+/// </summary>
+public class JavaCodeCompiler
+{
+	private static class MemorySource extends SimpleJavaFileObject {
+		private final String src;
+		public MemorySource(String name, String src) {
+			super(URI.create("file:///" + name + ".java"), Kind.SOURCE);
+			this.src = src;
+		}
+		@Override
+		public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+			return src;
+		}
+		@Override
+		public OutputStream openOutputStream() {
+			throw new IllegalStateException();
+		}
+		@Override
+		public InputStream openInputStream() {
+			return new ByteArrayInputStream(src.getBytes());
+		}
+	}
+
+	private static class SpecialJavaFileManager extends ForwardingJavaFileManager<StandardJavaFileManager> {
+		private final SpecialClassLoader xcl;
+		public SpecialJavaFileManager(StandardJavaFileManager sjfm, SpecialClassLoader xcl) {
+			super(sjfm);
+			this.xcl = xcl;
+		}
+		@Override
+		public JavaFileObject getJavaFileForOutput(Location location, String name, JavaFileObject.Kind kind, FileObject sibling) throws IOException {
+			final MemoryByteCode mbc = new MemoryByteCode(name);
+			xcl.addClass(name, mbc);
+			return mbc;
+		}
+		@Override
+		public ClassLoader getClassLoader(Location location) {
+			return xcl;
+		}
+	}
+
+	private static class MemoryByteCode extends SimpleJavaFileObject {
+		private ByteArrayOutputStream baos;
+		public MemoryByteCode(String name) {
+			super(URI.create("byte:///" + name + ".class"), Kind.CLASS);
+		}
+		@Override
+		public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+			throw new IllegalStateException();
+		}
+		@Override
+		public OutputStream openOutputStream() {
+			baos = new ByteArrayOutputStream();
+			return baos;
+		}
+		@Override
+		public InputStream openInputStream() {
+			throw new IllegalStateException();
+		}
+		public byte[] getBytes() {
+			return baos.toByteArray();
+		}
+	}
+
+	private static class SpecialClassLoader extends ClassLoader {
+		private final Map<String,MemoryByteCode> m = new HashMap<String, MemoryByteCode>();
+		@Override
+		protected Class<?> findClass(String name) throws ClassNotFoundException {
+			MemoryByteCode mbc = m.get(name);
+			if (mbc==null){
+				mbc = m.get(name.replace(".","/"));
+				if (mbc==null){
+					return super.findClass(name);
+				}
+			}
+			return defineClass(name, mbc.getBytes(), 0, mbc.getBytes().length);
+		}
+		public void addClass(String name, MemoryByteCode mbc) {
+			m.put(name, mbc);
+		}
+	}
+
+	public static Class<?> compileCode(String code, String className, String packageName, ParserState parserState)
+	{
+		try {
+			final JavaCompiler javac = new EclipseCompiler();
+
+			final StandardJavaFileManager sjfm = javac.getStandardFileManager(null, null, null);
+			final SpecialClassLoader cl = new SpecialClassLoader();
+			final SpecialJavaFileManager fileManager = new SpecialJavaFileManager(sjfm, cl);
+			final List<String> options = Arrays.asList(new String[]{"-1.7"});
+
+			final List<MemorySource> compilationUnits = Arrays.asList(new MemorySource(className, code));
+//			DiagnosticListener<?> dianosticListener = null;
+			final Iterable<String> classes = null;
+			final Writer out = new PrintWriter(System.err);
+			final JavaCompiler.CompilationTask compile = javac.getTask(out, fileManager, null, options, classes, compilationUnits);
+			final boolean res = compile.call();
+			if (res){
+				return cl.findClass(packageName + "." + className);
+			}
+		} catch (final Exception e){
+			parserState.AddErrorMessage(new ParserError("JavaCodeCompiler.java",0,0,e.getMessage()));
+		}
+		return null;
+//		if (results.Errors.HasErrors)
+//		{
+//			StringBuilder errors = new StringBuilder("Compiler Errors :\r\n");
+//			foreach (CompilerError error in results.Errors)
+//			{
+//				errors.AppendFormat("Line %s,%s\t: %s\n", error.Line, error.Column, error.ErrorText);
+//			}
+//			throw new UlyssesCompileException(errors.ToString());
+//		}
+//		else
+//		{
+//			return results.CompiledAssembly;
+//		}
+	}
+
+	public static void ExecuteCode(Class<?> clazz, String methodname, JavaInitVisitor visitor, ParserState parserState)
+	{
+		try{
+			final Object o = clazz.getConstructor().newInstance();
+			final Method m = clazz.getMethod("start", JavaInitVisitor.class);
+			m.invoke(o, visitor);
+		}
+		catch (final Exception e) {
+			parserState.AddErrorMessage(new ParserError("JavaCodeCompiler.java",0,0,e.toString()));
+		}
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/caesar_graph.h
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/caesar_graph.h	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/caesar_graph.h	(revision 2)
@@ -0,0 +1,101 @@
+#ifndef CAESAR_GRAPH_H
+#define CAESAR_GRAPH_H
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <memory.h>
+#include <signal.h>
+#include <string.h>
+
+
+#define CAESAR_CREATE(CAESAR_ADDRESS,CAESAR_SIZE,CAESAR_TYPE) \
+	(CAESAR_ADDRESS) = (CAESAR_TYPE) malloc (CAESAR_SIZE)
+
+
+#define CAESAR_DELETE(CAESAR_ADDRESS) \
+	free ((char *) (CAESAR_ADDRESS))
+
+
+
+typedef double CAESAR_TYPE_VERSION;
+typedef unsigned int CAESAR_TYPE_NATURAL;
+typedef int CAESAR_TYPE_INTEGER;
+typedef char CAESAR_TYPE_BOOLEAN;
+#define CAESAR_FALSE ((CAESAR_TYPE_BOOLEAN) 0)
+#define CAESAR_TRUE ((CAESAR_TYPE_BOOLEAN) 1)
+typedef unsigned char CAESAR_TYPE_BYTE;
+typedef char *CAESAR_TYPE_STRING;
+typedef FILE *CAESAR_TYPE_FILE;
+typedef char *CAESAR_TYPE_POINTER;
+
+#define CAESAR_TYPE_ABSTRACT(CAESAR_NAME) struct CAESAR_NAME *
+typedef CAESAR_TYPE_ABSTRACT (CAESAR_STRUCT_STATE) CAESAR_TYPE_STATE;
+typedef CAESAR_TYPE_ABSTRACT (CAESAR_STRUCT_LABEL) CAESAR_TYPE_LABEL;
+
+#define CAESAR_DELETE_STATE(CAESAR_S) { CAESAR_DELETE (*(CAESAR_S)); *(CAESAR_S) = NULL; }
+
+
+#define CAESAR_CHECK_VERSION(A,B)
+
+#ifdef __cplusplus
+ extern "C" {
+#endif 
+
+#if defined _WIN32 || defined __CYGWIN__
+	 /* ATTENTION: COMPILE IN C++ mode! */
+	#include <Winsock2.h>
+	#include <windows.h>
+	#include <process.h>
+	#define DLL extern "C" __declspec(dllexport)
+	 #pragma comment(lib, "ws2_32.lib")
+#else
+  #if __GNUC__ >= 4
+    	#define DLL __attribute__ ((visibility("default")))
+  #else
+    #define DLL
+  #endif
+#endif
+
+
+DLL CAESAR_TYPE_BOOLEAN CAESAR_COMPARE_LABEL (CAESAR_TYPE_LABEL, CAESAR_TYPE_LABEL);
+DLL void CAESAR_INIT_GRAPH ();
+DLL void CAESAR_ITERATE_STATE (CAESAR_TYPE_STATE CAESAR_S1, CAESAR_TYPE_LABEL CAESAR_L, CAESAR_TYPE_STATE CAESAR_S2, void (*CAESAR_LOOP) (CAESAR_TYPE_STATE, CAESAR_TYPE_LABEL, CAESAR_TYPE_STATE));
+DLL void CAESAR_START_STATE (CAESAR_TYPE_STATE CAESAR_S);
+DLL CAESAR_TYPE_STRING CAESAR_INFORMATION_LABEL (CAESAR_TYPE_LABEL CAESAR_L);
+DLL void CAESAR_FORMAT_LABEL (CAESAR_TYPE_NATURAL CAESAR_FORMAT);
+DLL CAESAR_TYPE_NATURAL CAESAR_MAX_FORMAT_LABEL ();
+DLL void CAESAR_PRINT_LABEL (CAESAR_TYPE_FILE CAESAR_FILE, CAESAR_TYPE_LABEL CAESAR_L);
+DLL CAESAR_TYPE_NATURAL CAESAR_HASH_LABEL (CAESAR_TYPE_LABEL CAESAR_L, CAESAR_TYPE_NATURAL CAESAR_MODULUS);
+DLL CAESAR_TYPE_BOOLEAN CAESAR_COMPARE_LABEL (CAESAR_TYPE_LABEL CAESAR_L1, CAESAR_TYPE_LABEL CAESAR_L2);
+DLL CAESAR_TYPE_STRING CAESAR_STRING_LABEL (CAESAR_TYPE_LABEL CAESAR_L);
+DLL CAESAR_TYPE_NATURAL CAESAR_CARDINAL_LABEL (CAESAR_TYPE_LABEL CAESAR_L);
+DLL CAESAR_TYPE_STRING CAESAR_GATE_LABEL (CAESAR_TYPE_LABEL CAESAR_L);
+DLL CAESAR_TYPE_BOOLEAN CAESAR_VISIBLE_LABEL (CAESAR_TYPE_LABEL CAESAR_L);
+DLL void CAESAR_DELTA_STATE (CAESAR_TYPE_FILE CAESAR_FILE, CAESAR_TYPE_STATE CAESAR_S1, CAESAR_TYPE_STATE CAESAR_S2);
+DLL void CAESAR_PRINT_STATE (CAESAR_TYPE_FILE CAESAR_FILE, CAESAR_TYPE_STATE CAESAR_S);
+DLL void CAESAR_PRINT_STATE_HEADER (CAESAR_TYPE_FILE CAESAR_FILE);
+DLL void CAESAR_FORMAT_STATE (CAESAR_TYPE_NATURAL CAESAR_FORMAT);
+DLL CAESAR_TYPE_NATURAL CAESAR_MAX_FORMAT_STATE ();
+DLL CAESAR_TYPE_NATURAL CAESAR_HASH_STATE (CAESAR_TYPE_STATE CAESAR_ST, CAESAR_TYPE_NATURAL CAESAR_MODULUS);
+DLL CAESAR_TYPE_BOOLEAN CAESAR_COMPARE_STATE (CAESAR_TYPE_STATE CAESAR_S1, CAESAR_TYPE_STATE CAESAR_S2);
+DLL CAESAR_TYPE_VERSION CAESAR_GRAPH_VERSION ();
+DLL CAESAR_TYPE_STRING CAESAR_GRAPH_COMPILER ();
+
+
+DLL CAESAR_TYPE_STATE ALLOCSTATE();
+DLL CAESAR_TYPE_LABEL ALLOCLABEL();
+DLL void FREESTATE(CAESAR_TYPE_STATE aState);
+DLL void FREELABEL(CAESAR_TYPE_LABEL aLabel);
+DLL void FREE(CAESAR_TYPE_LABEL aString);
+DLL void* CAESAR_FILE_OPEN (char* afileName);
+DLL void CAESAR_FILE_CLOSE(CAESAR_TYPE_FILE pFile, char* aFileName);
+DLL int CAESAR_STRING_LEN(CAESAR_TYPE_FILE pFile);
+DLL int CAESAR_STRING_FROM_FILE(CAESAR_TYPE_FILE pFile, char* buffer, int buffer_size); 
+DLL void Set_CAESAR_BUFFER(char* filename);
+DLL void CAESAR_COPY_STATE(CAESAR_TYPE_STATE CAESAR_S1,CAESAR_TYPE_STATE CAESAR_S2); 
+DLL void CAESAR_COPY_LABEL(CAESAR_TYPE_LABEL CAESAR_L1,CAESAR_TYPE_LABEL CAESAR_L2); 
+
+#ifdef __cplusplus
+ }
+#endif 
+#endif
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/argos_runtime.h
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/argos_runtime.h	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/argos_runtime.h	(revision 2)
@@ -0,0 +1,181 @@
+
+/*
+
+	ARGOS RUNTIME for CADP OUTPUT
+
+*/
+
+#ifndef ARGOS_RUNTIME_H
+#define ARGOS_RUNTIME_H
+
+#include "stdlib.h"
+struct STATE_LIST 
+{
+	void *aState; 
+	void *aLabel;
+	struct STATE_LIST *next;
+	char tag;
+};
+
+struct STATE_LIST_LIST
+{
+	struct STATE_LIST *aListElem;
+	struct STATE_LIST_LIST *next;
+};
+
+
+#define LISTLIST_INSERT_LIST(ALST,ELEM)\
+do {\
+	struct STATE_LIST_LIST *listlist_create_newelem = (struct STATE_LIST_LIST *) malloc(sizeof(struct STATE_LIST_LIST));\
+	if (listlist_create_newelem == NULL)\
+	{\
+		fprintf(stderr,"malloc failure");\
+		exit(1);\
+	}\
+	memset ((char *)listlist_create_newelem, 0, sizeof(struct STATE_LIST_LIST));\
+	listlist_create_newelem->aListElem = ELEM;\
+	listlist_create_newelem->next = (ALST);\
+	ALST = listlist_create_newelem;\
+} while(0)
+
+
+
+#define LIST_CREATE(STLST)\
+do {\
+	struct STATE_LIST *list_create_newelem = (struct STATE_LIST *) malloc(sizeof(struct STATE_LIST));\
+	if (list_create_newelem == NULL)\
+	{\
+		fprintf(stderr,"malloc failure");\
+		exit(1);\
+	}\
+	memset ((char *)list_create_newelem, 0, sizeof(struct STATE_LIST));\
+	STLST = list_create_newelem;\
+} while (0)
+
+#define LIST_INSERT_SINGLELIST(STLST,STLSTB)\
+do {\
+	struct STATE_LIST *list_insert_singlelist_otherelem = STLSTB;\
+	if (list_insert_singlelist_otherelem != NULL) {\
+		list_insert_singlelist_otherelem->next=(STLST);\
+		STLST = list_insert_singlelist_otherelem;\
+	}\
+} while (0)
+
+
+#define LIST_INSERT_LIST(STLST,INSERT)\
+do {\
+	struct STATE_LIST *list_insert_list_otherelem = INSERT;\
+	struct STATE_LIST *list_insert_list_next;\
+	while(list_insert_list_otherelem != NULL)\
+	{\
+		list_insert_list_next = list_insert_list_otherelem->next;\
+		LIST_INSERT_SINGLELIST(STLST,list_insert_list_otherelem);\
+		list_insert_list_otherelem = list_insert_list_next;\
+	}\
+} while (0)
+
+#define LIST_INSERT_STATE(STLST,ELEM)\
+do {\
+	struct STATE_LIST *list_insert_state_newelem;\
+	LIST_CREATE(list_insert_state_newelem);\
+	list_insert_state_newelem->aState = (ELEM);\
+	LIST_INSERT_SINGLELIST(STLST,list_insert_state_newelem);\
+} while (0)
+
+// moves first element from b to a
+#define LIST_MOVE_ELEMENT(LISTA,LISTB)\
+do{\
+	struct STATE_LIST *list_move_element_listb = LISTB;\
+	LISTB = list_move_element_listb->next;\
+	list_move_element_listb->next = LISTA;\
+	LISTA = list_move_element_listb;\
+} while(0);\
+
+
+#define LIST_DELETE(STLST)\
+do {\
+	struct STATE_LIST *list_delete_elem = (STLST);\
+	while(list_delete_elem != NULL)\
+	{\
+		struct STATE_LIST *list_delete_next = list_delete_elem->next;\
+		free(list_delete_elem);\
+		list_delete_elem = list_delete_next;\
+	}\
+} while(0)
+
+
+#define DELETE_STATES(STLST)\
+do {\
+	struct STATE_LIST *delete_states_elem = (STLST);\
+	while(delete_states_elem != NULL)\
+	{\
+		struct STATE_LIST *delete_states_next = delete_states_elem->next;\
+		CAESAR_DELETE(delete_states_elem);\
+		delete_states_elem = delete_states_next;\
+	}\
+} while(0)
+
+
+#define ITERATE_STATES(STLST,STMNTS)\
+do {\
+	struct STATE_LIST *elem = (STLST);\
+	while(elem != NULL)\
+	{\
+		struct STATE_LIST *next = elem->next;\
+		{\
+			STMNTS\
+		}\
+		elem = next;\
+	}\
+} while(0)
+
+
+
+
+
+#define COMPARE_STATES(STLSTA,STLSTB,RESULT)\
+do {\
+	struct STATE_LIST *elemA = (STLSTA);\
+	struct STATE_LIST *elemB = (STLSTB);\
+	RESULT = 1;\
+	if (elemA != NULL && elemB != NULL)\
+	{\
+		while(elemA != NULL)\
+		{\
+			char haveOne = 0;\
+			while(elemB != NULL)\
+			{\
+				if ((elemB->tag==0) && CAESAR_COMPARE_STATE(elemA->aState,elemB->aState))\
+				{\
+					elemB->tag = 1;\
+					haveOne = 1;\
+					break;\
+				}\
+				elemB = elemB->next;\
+			}\
+			elemB = (STLSTB);\
+			if (haveOne == 0)\
+			{\
+				RESULT = 0; /*no untagged B equal*/\
+				break;\
+			}\
+			else\
+				elemA = elemA->next;\
+		}\
+		elemB = (STLSTB);\
+		while(elemB != NULL)\
+		{\
+			if (elemB->tag == 0)\
+				RESULT = 0; /*more Bs than As*/\
+			else\
+				elemB->tag = 0;\
+			elemB = elemB->next;\
+		}\
+	}\
+	else if (elemA != NULL || elemB != NULL)\
+		RESULT = 0;\
+} while(0)
+
+
+
+#endif //ARGOS_RUNTIME_H
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaInitVisitorCompileException.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaInitVisitorCompileException.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaInitVisitorCompileException.java	(revision 2)
@@ -0,0 +1,41 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.java;
+
+import org.momut.ooas.utils.exceptions.OoasCompilerRuntimeException;
+
+
+public class JavaInitVisitorCompileException extends OoasCompilerRuntimeException
+{
+	private static final long serialVersionUID = 1L;
+
+	public JavaInitVisitorCompileException(String message)
+	{
+		super(message);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaIdentifier.java	(revision 2)
@@ -0,0 +1,36 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.java;
+
+public final class JavaIdentifier
+{
+	public static String GetIdentifierString(String anIdentifier)
+	{
+		return String.format("_%s", anIdentifier);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/ActionSystemClass.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/ActionSystemClass.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/ActionSystemClass.java	(revision 2)
@@ -0,0 +1,75 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.java;
+
+import org.momut.ooas.ast.types.OoActionSystemInstance;
+
+// class all instances in simulation inherit from
+public class ActionSystemClass
+{
+	public String givenName;
+	public String objectName;
+	public int objectCreationCounter = 0;
+	public int _AstTypeLookupIndex = -1;
+	public ActionSystemClass parent = null;
+	public OoActionSystemInstance objectInstance = null;
+
+	public ActionSystemClass(ActionSystemClass aParent, int constrNum, int LookupIndex, String aGivenName, JavaInitVisitor objectInstantiator)
+	{
+		if (objectInstantiator == null)
+			throw new RuntimeException("Internal error: JavaInitVisitor cannot be null.");
+
+		parent = aParent;
+		_AstTypeLookupIndex = LookupIndex;
+		if (parent == null)
+			objectName = String.format("%s_root", this.getClass().getSimpleName());
+		else
+		{
+			objectName = String.format("%s_%s_%s",
+					this.getClass().getSimpleName(),
+					parent.objectName,
+					parent.objectCreationCounter);
+			parent.objectCreationCounter += 1;
+		}
+
+		if (!aGivenName.equals(""))
+		{
+			if (objectInstantiator.givenObjectNames.contains(aGivenName))
+			{
+				objectInstantiator.Error(0, 0, String.format("Another object with name %s exists.", aGivenName));
+			}
+			else
+			{
+				objectName = aGivenName;
+				objectInstantiator.givenObjectNames.add(aGivenName);
+			}
+		}
+
+		objectInstantiator.visit(this, constrNum);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/runtime/QualitativeValue.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/runtime/QualitativeValue.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/runtime/QualitativeValue.java	(revision 2)
@@ -0,0 +1,42 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.java.runtime;
+
+public class QualitativeValue
+{
+	public Integer intervalLow;
+	public Integer intervalHigh;
+	public Integer derivation;
+
+	public QualitativeValue(Integer lowval, Integer highval, Integer deriv)
+	{
+		intervalLow = lowval;
+		intervalHigh = highval;
+		derivation = deriv;
+	}
+}
Index: trunk/compiler/ooasCompiler/libraries/antlr-3.4-complete.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/compiler/ooasCompiler/libraries/antlr-3.4-complete.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/Scratchbook.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/Scratchbook.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/Scratchbook.java	(revision 2)
@@ -0,0 +1,38 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.java;
+
+import java.util.ArrayList;
+
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+
+final class Scratchbook {
+	final ArrayList<ObjectConstructor> m_constructors = new ArrayList<ObjectConstructor>();
+
+	public ArrayList<ObjectConstructor> constructors() { return m_constructors; }
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologIdentifier.java	(revision 2)
@@ -0,0 +1,186 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.prolog;
+
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.identifiers.LocalVariableIdentifier;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.visitors.OoaIdentifierVisitor;
+
+public final class OoaPrologIdentifier extends OoaIdentifierVisitor
+{
+	public static class Factory
+	{
+		public OoaPrologIdentifier create() { return new OoaPrologIdentifier(); }
+	}
+
+
+	OoasCodeEmitter m_emitter;
+
+	private void AddTokenText(Identifier anId)
+	{
+		m_emitter.Append(anId.tokenText());
+	}
+
+	private String getUniquePostFix(Identifier id) {
+		return (id.line() > 0) && (id.column()>0)
+				? String.format("%s_%s", id.line(), id.column())
+				: Integer.toString(id.hashCode()).replace("-", "m");
+	}
+
+	@Override
+	public /*override*/ void visit(EnumIdentifier enumIdentifier)
+	{
+		assert(false); // handled in visit(IdentifierExpression identifierExpression)
+		//AddTokenText(enumIdentifier);
+	}
+
+	@Override
+	public /*override*/ void visit(LandmarkIdentifier landmarkIdentifier)
+	{
+		AddTokenText(landmarkIdentifier);
+	}
+
+	@Override
+	public /*override*/ void visit(AttributeIdentifier attributeIdentifier)
+	{
+		m_emitter.Append(String.format("attr_%s_%s", attributeIdentifier.tokenText(), getUniquePostFix(attributeIdentifier)));
+	}
+
+	@Override
+	public /*override*/ void visit(ExpressionVariableIdentifier expressionVariableIdentifier)
+	{
+		m_emitter.Append(String.format("ExprVar_%s_%s", expressionVariableIdentifier, getUniquePostFix(expressionVariableIdentifier)));
+	}
+
+	@Override
+	public /*override*/ void visit(ParameterIdentifier parameterIdentifier)
+	{
+		//m_emitter.Append(parameterIdentifier.tokenText().ToUpper());
+		if (parameterIdentifier.tokenText().equals("result"))
+			m_emitter.Append("RESULT"); // methods are transformed into their own predicates, so they have their own scope..
+		else
+			m_emitter.Append(String.format("_%s_%s", parameterIdentifier.tokenText(), getUniquePostFix(parameterIdentifier)));
+	}
+
+	@Override
+	public /*override*/ void visit(LocalVariableIdentifier localVariableIdentifier)
+	{
+		m_emitter.Append(String.format("_%s_%s",
+				localVariableIdentifier.tokenText(), getUniquePostFix(localVariableIdentifier)));
+	}
+
+	@Override
+	public /*override*/ void visit(TypeIdentifier typeIdentifier)
+	{
+		switch (typeIdentifier.type().kind())
+		{
+		case Any:          // not supported
+		case Null:         // must have some type
+			throw new NotImplementedException();
+
+		case OpaqueType:   // must be resolved at this point in time
+		case FunctionType: // we do not support declaration of function types
+			assert(false);
+			throw new NotImplementedException();
+
+		case FloatType:
+			final FloatType afloat = (FloatType)typeIdentifier.type();
+			m_emitter.Append(String.format("float_%s_%s_%s", afloat.low(), afloat.high(), afloat.precision()));
+			break;
+		case IntType:
+			final IntType intType = (IntType)typeIdentifier.type();
+			m_emitter.Append(String.format("%s", intType.identifier().tokenText().toLowerCase().replace("-", "")));
+			break;
+
+		case BoolType:
+			m_emitter.Append("bool");
+			break;
+
+		case EnumeratedType:
+			m_emitter.Append(String.format("enum_%s%s", typeIdentifier.prefix, typeIdentifier.tokenText()));
+			break;
+
+		case TupleType:
+			m_emitter.Append(String.format("tuple_%s%s", typeIdentifier.prefix, typeIdentifier.tokenText()));
+			break;
+
+		case ListType:
+			m_emitter.Append(String.format("list_%s%s", typeIdentifier.prefix, typeIdentifier.tokenText()));
+			break;
+
+		case QrType:
+		case MapType:
+			throw new NotImplementedException();
+
+		case OoActionSystemType:
+			m_emitter.Append(String.format("'%s'", typeIdentifier.tokenText()));
+			//AddTokenText(typeIdentifier);
+			break;
+
+		default:
+			throw new NotImplementedException();
+		}
+
+	}
+
+	@Override
+	public /*override*/ void visit(MethodIdentifier methodIdentifier)
+	{
+		m_emitter.Append(String.format("'%s'", methodIdentifier.tokenText()));
+	}
+
+	@Override
+	public /*override*/ void visit(NamedActionIdentifier namedActionIdentifier)
+	{
+		m_emitter.Append(String.format("'%s'", namedActionIdentifier.tokenText()));
+	}
+
+
+	@Override
+	public /*override*/ String toString()
+	{
+		return m_emitter.toString();
+	}
+
+	private OoaPrologIdentifier()
+	{
+		m_emitter = new OoasCodeEmitter();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/Scratchbook.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/Scratchbook.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/Scratchbook.java	(revision 2)
@@ -0,0 +1,45 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.prolog;
+
+import java.util.HashSet;
+
+import org.momut.ooas.ast.types.UlyssesType;
+
+public final class Scratchbook {
+	private int tmpVarCntr = 0;
+	final HashSet<UlyssesType> m_definedTypes = new HashSet<UlyssesType>();
+	final StringBuilder m_typeDefinitions = new StringBuilder();
+
+	public synchronized int getNewTmpVarCntrValue() {
+		tmpVarCntr++;
+		return tmpVarCntr;
+	}
+	public HashSet<UlyssesType> definedTypes() {return m_definedTypes;}
+	public StringBuilder typeDefinitions() {return m_typeDefinitions;}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaInitVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaInitVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaInitVisitor.java	(revision 2)
@@ -0,0 +1,392 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.java;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.OoActionSystemInstance;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.parser.ParserError;
+import org.momut.ooas.parser.ParserMessage;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+public final class JavaInitVisitor extends OoaCompleteAstTraversalVisitor
+{
+	private final String SimulationNameSpace = "org.momut.ooas.codegen.java.simulation";
+	private final OoasCodeEmitter emitter;
+	private final ArrayList<UlyssesType> hiddenTypesStillToEmit = new ArrayList<UlyssesType>();
+	private final Scratchbook scratchbook = new Scratchbook();
+	private StringBuilder helpers = new StringBuilder();
+
+
+
+	private final ArrayList<OoActionSystemType> autoConsList = new ArrayList<OoActionSystemType>();
+
+	private int m_maxObjectNameLength = 0;
+	private final ArrayList<String> m_objectNames = new ArrayList<String>();
+	private final ArrayList<OoActionSystemInstance> m_initialObjectWorkingSet = new ArrayList<OoActionSystemInstance>();
+
+
+
+	public int maxObjectNameLength() { return m_maxObjectNameLength; }
+	public ArrayList<String> objectNames() { return m_objectNames; }
+	public ArrayList<OoActionSystemInstance> initialObjectWorkingSet() { return m_initialObjectWorkingSet; }
+	public HashSet<String> givenObjectNames = new HashSet<String>();
+
+
+	public void Error(int line, int pos, String p)
+	{
+		final ParserError error = new ParserError(m_ParserState.filename, line, pos, p);
+		m_ParserState.AddErrorMessage(error);
+	}
+
+
+//	private void Error(OoActionSystemInstance id, String p)
+//	{
+//		int line = id.Type.identifier().line();
+//		int pos = id.Type.identifier().column();
+//
+//		ParserError error = new ParserError(m_ParserState.filename, line, pos, p);
+//		m_ParserState.AddErrorMessage(error);
+//	}
+//	private void Warning(OoActionSystemType atype, String p)
+//	{
+//		ParserWarning warn = new ParserWarning(m_ParserState.filename, atype.identifier().line(),
+//				atype.identifier().column(), p);
+//		m_ParserState.AddWarningMessage(warn);
+//	}
+
+	private String GetIdentifierString(String anIdentifier)
+	{
+		return JavaIdentifier.GetIdentifierString(anIdentifier);
+	}
+	private final ArrayList<OoActionSystemType> AstTypeLookup = new ArrayList<OoActionSystemType>();
+
+	/// <summary>
+	/// here we are called when a new object has been created
+	/// </summary>
+	void visit(ActionSystemClass actionSystemClass, int ConstrNum)
+	{
+//		OoActionSystemType aParentType = actionSystemClass.parent != null
+//			? AstTypeLookup.get(actionSystemClass.parent._AstTypeLookupIndex)
+//			: null;
+		OoActionSystemType atype = AstTypeLookup.get(actionSystemClass._AstTypeLookupIndex);
+		final OoActionSystemInstance aParentInstance = actionSystemClass.parent != null
+			? actionSystemClass.parent.objectInstance
+			: null;
+
+		final HashSet<UlyssesType> seenTypes = new HashSet<UlyssesType>();
+		final StringBuilder instantiationPath = new StringBuilder();
+		if (aParentInstance != null)
+		{
+			OoActionSystemInstance tmp = aParentInstance;
+			while (tmp != null)
+			{
+				instantiationPath.append(String.format("<-%s", tmp.Name));
+				seenTypes.add(tmp.Type);
+				tmp = tmp.ParentObject;
+			}
+		}
+
+		UlyssesType tmpType = atype;
+		while (tmpType != null)
+		{
+			if (seenTypes.contains(tmpType))
+			{
+				throw new JavaInitVisitorCompileException(String.format("Cycle in object creation. %s", instantiationPath.toString()));
+			}
+			else
+				tmpType = ((OoActionSystemType)tmpType).baseType();
+		}
+
+		actionSystemClass.objectInstance =
+				new OoActionSystemInstance(actionSystemClass.objectName, atype, actionSystemClass, aParentInstance);
+
+		// update max length of object name
+		m_maxObjectNameLength = actionSystemClass.objectName.length() > m_maxObjectNameLength
+			? actionSystemClass.objectName.length()
+			: m_maxObjectNameLength;
+
+		// add to list of object names
+		m_objectNames.add(actionSystemClass.objectName);
+
+		// add to global list of initial objects
+		m_initialObjectWorkingSet.add(actionSystemClass.objectInstance);
+
+		m_ParserState.AddMessage(new ParserMessage(m_ParserState.filename,
+			atype.identifier().line(), atype.identifier().column(), String.format("Creating object: %s", actionSystemClass.objectName)));
+
+		atype.objects().add(actionSystemClass.objectInstance);
+		// also add the object to the base types
+		atype = atype.baseType();
+		while (atype != null)
+		{
+			atype.derivedObjects().add(actionSystemClass.objectInstance);
+			atype = atype.baseType();
+		}
+		atype = null;
+
+		if (ConstrNum >= 0)
+			scratchbook.constructors().get(ConstrNum).AddInstance(actionSystemClass.objectInstance);
+	}
+	private String GetCSharpType(UlyssesType aType)
+	{
+		if (aType.isAnonymousType())
+			hiddenTypesStillToEmit.add(aType);
+
+		final JavaType sharptype = new JavaType();
+		aType.Accept(sharptype);
+		return sharptype.toString();
+	}
+	private String GetCSharpExpression(Expression anExpression)
+	{
+		final JavaExpression sharpexpression = new JavaExpression(helpers, scratchbook);
+		anExpression.Accept(sharpexpression);
+		return sharpexpression.toString();
+	}
+
+	private void StartSimulation(String p)
+	{
+		try
+		{
+			// set reference
+			//ActionSystemClass.objectInstantiator = this;
+			// compile
+			final Class<?> simulationCode = JavaCodeCompiler.compileCode(p, "Wrapper", SimulationNameSpace, m_ParserState);
+			// execute system initialization
+			JavaCodeCompiler.ExecuteCode(simulationCode, "Start", this, m_ParserState);
+		}
+		catch (final JavaInitVisitorCompileException e)
+		{
+			final ParserError error = new ParserError("ObjectInstantiationVisitor.cs", 0, 0, e.getMessage());
+			m_ParserState.AddErrorMessage(error);
+		}
+	}
+
+	/// <summary>
+	/// generates C# code that describes initialization of the action systems
+	/// this is used to determine the initial working set of classes.
+	/// </summary>
+	private void Emit(OoActionSystemType ooActionSystemType)
+	{
+		final ArrayList<AttributeIdentifier> initializers = new ArrayList<AttributeIdentifier>();
+		helpers = new StringBuilder();
+		if (ooActionSystemType.baseType() == null)
+			emitter.AppendLineIncIndent(String.format("public class %s extends org.momut.ooas.codegen.java.ActionSystemClass {", GetIdentifierString(ooActionSystemType.identifier().tokenText())));
+		else
+			emitter.AppendLineIncIndent(String.format("public class %s extends %s {", GetIdentifierString(ooActionSystemType.identifier().tokenText()), GetIdentifierString(ooActionSystemType.baseType().identifier().tokenText())));
+
+		for (final Identifier attr: ooActionSystemType.symbols().symbolList())
+		{
+			if (attr.kind() == IdentifierKind.AttributeIdentifier)
+			{
+				final String staticdecl = ((AttributeIdentifier)attr).isStatic() ? "static" : "";
+				emitter.AppendLine(String.format("public %s %s %s;",
+						staticdecl,
+						GetCSharpType(attr.type()),
+						GetIdentifierString(attr.tokenText())));
+				initializers.add(((AttributeIdentifier)attr));
+			}
+		}
+
+		// emit internal constructor that initializes object
+		emitter.AppendLineIncIndent(String.format("protected %s (org.momut.ooas.codegen.java.ActionSystemClass parent, int constrNum, int LookupIndex, String aGivenName) {", GetIdentifierString(ooActionSystemType.identifier().tokenText())));
+		emitter.AppendLine("this(parent, constrNum, LookupIndex, aGivenName, m_visitor);");
+		emitter.AppendLineDecIndent("}");
+
+		emitter.AppendLineIncIndent(String.format("protected %s (org.momut.ooas.codegen.java.ActionSystemClass parent, int constrNum, int LookupIndex, String aGivenName, org.momut.ooas.codegen.java.JavaInitVisitor visitor) {", GetIdentifierString(ooActionSystemType.identifier().tokenText())));
+		emitter.AppendLine("super(parent, constrNum, LookupIndex, aGivenName, visitor);");
+		for (final AttributeIdentifier attr: initializers)
+			emitter.AppendLine(String.format("%s = %s;", GetIdentifierString(attr.tokenText()), GetCSharpExpression(attr.initializer())));
+		emitter.AppendLineDecIndent("}");
+
+
+		// emit public constructor
+		emitter.AppendLine(String.format("public %s (org.momut.ooas.codegen.java.ActionSystemClass parent, int constrNum) {this(parent, constrNum, %s, \"\");}", GetIdentifierString(ooActionSystemType.identifier().tokenText()), AstTypeLookup.size()));
+
+		// emit public constructor with fixed name
+		emitter.AppendLine(String.format("public %s (org.momut.ooas.codegen.java.ActionSystemClass parent, int constrNum, String aName) {this(parent, constrNum, %s, aName);}", GetIdentifierString(ooActionSystemType.identifier().tokenText()), AstTypeLookup.size()));
+
+
+		AstTypeLookup.add(ooActionSystemType);
+
+		// emit helpers
+		emitter.Append(helpers.toString());
+
+		emitter.AppendLineDecIndent("}");
+
+		if (ooActionSystemType.autoConstruction())
+			autoConsList.add(ooActionSystemType);
+	}
+
+	/// <summary>
+	/// Emits type definition for tuple
+	/// </summary>
+	private void Emit(TupleType atupleType)
+	{
+		emitter.AppendLineIncIndent(String.format("public static class %s {", GetIdentifierString(atupleType.identifier().tokenText())));
+		int i = 0;
+		for (final UlyssesType it: atupleType.innerTypes())
+		{
+			emitter.AppendLine(String.format("public %s elem_%s;", GetCSharpType(it), Integer.toString(i)));
+			i++;
+		}
+
+		emitter.AppendLine(" /*constr*/ ");
+		emitter.Append(String.format("public %s (", GetIdentifierString(atupleType.identifier().tokenText())));
+		i = 0;
+		for (final UlyssesType it: atupleType.innerTypes())
+		{
+			if (i != 0)
+				emitter.Append(",");
+			emitter.Append(String.format("%s arg_%s", GetCSharpType(it), Integer.toString(i)));
+			i++;
+		}
+		emitter.AppendLineIncIndent(") {");
+		for (i = 0; i < atupleType.innerTypes().size(); i++)
+			emitter.AppendLine(String.format("elem_%s = arg_%s;", i,i));
+
+		emitter.AppendLineDecIndent("}");
+
+		emitter.AppendLineDecIndent("}");
+	}
+
+	/// <summary>
+	/// Emits type definition for enum
+	/// </summary>
+	private void Emit(EnumType anEnum)
+	{
+		emitter.Append(String.format("public enum %s {", GetIdentifierString(anEnum.identifier().tokenText())));
+		int i = 0;
+		for (final EnumIdentifier it: anEnum.listOfEnumSymbols())
+		{
+			if (i != 0)
+				emitter.Append(", ");
+			else
+				i++;
+			emitter.Append(GetIdentifierString(it.tokenText()));
+		}
+		emitter.AppendLine("}");
+	}
+
+	@Override
+	protected void VisitAstElement(IAst element, IAst parent)
+	{
+		if (element.nodeType() == AstNodeTypeEnum.type &&
+				((UlyssesType)element).kind() == TypeKind.OoActionSystemType)
+		{
+			/*OoActionSystemType asystem = (OoActionSystemType)element;
+			if (asystem.autoConstruction)
+                CheckForRecursiveNew(asystem);*/
+			Emit((OoActionSystemType)element);
+		}
+		else if (element.nodeType() == AstNodeTypeEnum.type &&
+				((UlyssesType)element).kind() == TypeKind.TupleType)
+		{
+			Emit((TupleType)element);
+		}
+		else if (element.nodeType() == AstNodeTypeEnum.type &&
+				((UlyssesType)element).kind() == TypeKind.EnumeratedType)
+		{
+			Emit((EnumType)element);
+		}
+		else
+			super.VisitAstElement(element, parent);
+	}
+
+	@Override
+	public void visit(MainModule mainModule)
+	{
+		scratchbook.constructors().clear();
+		emitter.AppendLine(String.format("package %s;",SimulationNameSpace));
+//		emitter.AppendLine("import org.momut.ooas.codegen.java.*;");
+		emitter.AppendLine("");
+
+		emitter.AppendLineIncIndent("public final class Wrapper {");
+		emitter.AppendLine("private org.momut.ooas.codegen.java.JavaInitVisitor m_visitor;");
+
+		super.visit(mainModule);
+
+		emitter.AppendLine(" /* == anonymous types == */ ");
+		for (final UlyssesType x: hiddenTypesStillToEmit)
+		{
+			// we only need to define tuples and enums..
+			if (x.kind() == TypeKind.TupleType)
+				Emit((TupleType)x);
+			else if (x.kind() == TypeKind.EnumeratedType)
+				Emit((EnumType)x);
+		}
+
+		emitter.AppendLine(" /* == create autocons objects == */ ");
+		emitter.AppendLineIncIndent("public void start(org.momut.ooas.codegen.java.JavaInitVisitor visitor){");
+		emitter.AppendLine("m_visitor = visitor;");
+		for (final OoActionSystemType x: autoConsList)
+			emitter.AppendLine(String.format("new %s(null,-1 /*autocons*/);", GetIdentifierString(x.identifier().tokenText())));
+		emitter.AppendLine("m_visitor = null;");
+		emitter.AppendLineDecIndent("}");
+
+		emitter.AppendLine(" /* == setup wrapper class, init object and run the code == */ ");
+		emitter.AppendLineIncIndent("public static void Start(org.momut.ooas.codegen.java.JavaInitVisitor visitor){");
+		emitter.AppendLine("final Wrapper wrapper = new Wrapper();");
+		emitter.AppendLine("wrapper.start(visitor);");
+		emitter.AppendLineDecIndent("}");
+
+		emitter.AppendLineDecIndent("}"); // wrapper
+
+		StartSimulation(emitter.toString());
+	}
+
+
+	@Override
+	public String toString()
+	{
+		return emitter.toString();
+	}
+
+	public JavaInitVisitor(ParserState state)
+	{
+		super (state);
+		emitter = new OoasCodeEmitter();
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/runtime/CustomList.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/runtime/CustomList.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/runtime/CustomList.java	(revision 2)
@@ -0,0 +1,57 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.java.runtime;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+public class CustomList<T> extends ArrayList<T>
+{
+	private static final long serialVersionUID = 1L;
+
+	public CustomList()
+	{
+		super ();
+	}
+
+	public CustomList(T element)
+	{
+		super ();
+		if (element != null)
+			super.add(element);
+	}
+
+	public CustomList(T[] elements)
+	{
+		super ();
+		if (elements != null)
+		{
+			super.addAll(Arrays.asList(elements));
+		}
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologStatement.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologStatement.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologStatement.java	(revision 2)
@@ -0,0 +1,376 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.prolog;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.statements.AbortStatement;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.KillStatement;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.QualitativeConstraintStatement;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.SkipStatement;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.FunctionType.FunctionTypeEnum;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.visitors.OoaStatementVisitor;
+
+public class OoaPrologStatement extends OoaStatementVisitor
+{
+	public static class Factory
+	{
+		public OoaPrologStatement create(
+				OoaPrologExpression.Factory exprFactory,
+				OoaPrologIdentifier.Factory idFactory,
+				OoaPrologType.Factory typeFactory,
+				Scratchbook scratchbook)
+		{
+			return new OoaPrologStatement(exprFactory, idFactory, typeFactory, scratchbook);
+		}
+	}
+
+	protected final Scratchbook m_scratchbook;
+	protected OoasCodeEmitter m_emitter = new OoasCodeEmitter();
+
+	@Override
+	public /*override*/ void visit(NondetBlock nondetBlock)
+	{
+		int y = 0;
+		for (Statement x: nondetBlock.statements())
+		{
+			if (y != 0)
+				m_emitter.Append("; ");
+			else
+				y++;
+			m_emitter.Append("(");
+			VisitSub(x, nondetBlock);
+			m_emitter.Append(")");
+		}
+	}
+
+	@Override
+	public /*override*/ void visit(SeqBlock seqBlock)
+	{
+		int y = 0;
+		if (seqBlock.symbols().symbolList().size() > 0)
+		{
+			m_emitter.Append("([");
+			for (Identifier sym: seqBlock.symbols().symbolList())
+			{
+				if (y != 0)
+					m_emitter.AppendLine(", ");
+				else
+					y++;
+
+				OoaPrologType atype = createTypeVisitor();
+				sym.type().Accept(atype);
+				OoaPrologIdentifier anIdent = createIdentifierVisitor();
+				sym.Accept(anIdent);
+				m_emitter.Append(String.format("%s:%s", anIdent.toString(), atype.toString()));
+			}
+			m_emitter.Append("]: ");
+		}
+
+		y = 0;
+		for (Statement x: seqBlock.statements())
+		{
+			if (y != 0)
+				m_emitter.AppendLine(", ");
+			else
+				y++;
+			m_emitter.Append("(");
+			VisitSub(x, seqBlock);
+			m_emitter.Append(")");
+		}
+
+		if (seqBlock.symbols().symbolList().size() > 0)
+			m_emitter.Append(")");
+	}
+
+	@Override
+	public /*override*/ void visit(PrioBlock prioBlock)
+	{
+		int y = 0;
+		for (Statement x: prioBlock.statements())
+		{
+			if (y != 0)
+				m_emitter.Append("// ");
+			else
+				y++;
+			m_emitter.Append("(");
+			VisitSub(x, prioBlock);
+			m_emitter.Append(")");
+		}
+	}
+
+	@Override
+	public /*override*/ void visit(GuardedCommand guardedCommand)
+	{
+		OoaPrologExpression expr = createExpressionVisitor();
+		guardedCommand.guard().Accept(expr);
+
+		m_emitter.AppendLineIncIndent(String.format("(%s%s) %s ",
+				expr.toString(),
+				expr.tmpVariables().get(0),
+				guardedCommand.isQualitative() ? "~>" : "=>"));
+		m_emitter.AppendLineIncIndent("(");
+		VisitSub(guardedCommand.body(), guardedCommand);
+		m_emitter.DecIndent();
+		m_emitter.AppendLine("");
+		m_emitter.Append(")");
+	}
+
+	@Override
+	public /*override*/ void visit(Assignment assignment)
+	{
+		if (assignment.nondetExpression() != null)
+			throw new NotImplementedException();
+
+		Iterator<Expression> aPlaceIt = assignment.places().iterator();
+		Iterator<Expression> aValueIt = assignment.values().iterator();
+		ArrayList<String> assignments = new ArrayList<String>();
+
+		while (aPlaceIt.hasNext())
+		{
+			final Expression aPlace = aPlaceIt.next();
+			final Expression aValue = aValueIt.next();
+
+			OoaPrologExpression prologPlace = createExpressionVisitor(true);
+			aPlace.Accept(prologPlace);
+			assert(prologPlace.tmpVariables().size() == 1);
+
+			OoaPrologExpression prologValue = createExpressionVisitor();
+			aValue.Accept(prologValue);
+			assert(prologValue.tmpVariables().size() == 1);
+
+			m_emitter.Append(prologValue.toString());
+
+			if (aPlace.kind() == ExpressionKind.Access &&
+					((AccessExpression)aPlace).right().kind() == ExpressionKind.Identifier &&
+					((IdentifierExpression)((AccessExpression)aPlace).right()).identifier().kind() == IdentifierKind.AttributeIdentifier)
+			{
+				//access to attribute is always 'self.XY'...
+				assignments.add(String.format("%s := %s", prologPlace.tmpVariables().get(0), prologValue.tmpVariables().get(0)));
+			}
+			else
+				if (prologPlace.tmpVariables().get(0).equals("RESULT"))
+					assignments.add(String.format("unify( RESULT = %s)", prologValue.tmpVariables().get(0)));
+				else if (aPlace.type().kind() == TypeKind.IntType)
+					assignments.add(String.format("%s #= %s", prologPlace.tmpVariables().get(0), prologValue.tmpVariables().get(0)));
+				else
+					assignments.add(String.format("%s = %s", prologPlace.tmpVariables().get(0), prologValue.tmpVariables().get(0)));
+
+			if (prologPlace.toString().length() > 0)
+			{
+				String place = prologPlace.toString();
+				place = place.trim();
+				if (place.endsWith(","))
+					place = place.substring(0, place.length() - 1);
+
+				assignments.add(place);
+			}
+		}
+
+		int pos = 0;
+		for (String s: assignments)
+		{
+			if (pos != 0)
+				m_emitter.Append(",");
+			pos++;
+			m_emitter.Append(s);
+		}
+	}
+
+	@Override
+	public /*override*/ void visit(Call call)
+	{
+		Expression ce = call.callExpression();
+		String callstatement = "";
+		StringBuilder parameter = new StringBuilder();
+		boolean hideCall = false;
+
+		if (ce.kind() == ExpressionKind.Identifier)
+			callstatement = ((IdentifierExpression)ce).identifier().tokenText();
+		else if (ce.kind() == ExpressionKind.Call)
+		{
+			CallExpression parens = (CallExpression)ce;
+
+			OoaPrologExpression prologexpr = createExpressionVisitor();
+			parens.child().Accept(prologexpr);
+
+			if (parens.child().kind() == ExpressionKind.Identifier &&
+					((IdentifierExpression)parens.child()).identifier().kind() == IdentifierKind.NamedActionIdentifier)
+			{
+				// we need to hide internal actions
+				NamedActionIdentifier namedactionid = (NamedActionIdentifier)((IdentifierExpression)parens.child()).identifier();
+				hideCall = ((FunctionType)namedactionid.type()).functionType() == FunctionTypeEnum.Internal;
+			}
+
+			m_emitter.Append(prologexpr.toString());
+			callstatement = prologexpr.tmpVariables().get(0);
+			int i = 0;
+			for (Expression arg: parens.arguments())
+			{
+				if (i != 0)
+					parameter.append(", ");
+				else
+					i++;
+				OoaPrologExpression paramexpr = createExpressionVisitor();
+				arg.Accept(paramexpr);
+				m_emitter.Append(paramexpr.toString());
+				parameter.append(paramexpr.tmpVariables().get(0));
+			}
+		}
+		else
+			throw new NotImplementedException();
+		if (hideCall)
+			m_emitter.Append("i(");
+		if (parameter.length() > 0)
+			m_emitter.AppendLine(String.format("%s(%s)", callstatement, parameter));
+		else
+			m_emitter.AppendLine(String.format("%s", callstatement, parameter));
+		if (hideCall)
+			m_emitter.Append(")");
+	}
+
+	@Override
+	public /*override*/ void visit(SkipStatement skipStatement)
+	{
+		m_emitter.Append("skip");
+	}
+
+	@Override
+	public /*override*/ void visit(AbortStatement abortStatement)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public /*override*/ void visit(KillStatement killStatement)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public /*override*/ void visit(QualitativeConstraintStatement qalitativeConstraintStatement)
+	{
+		if (qalitativeConstraintStatement.tag)
+		{
+			m_emitter.Append("% observable assignment in actionhead");
+			return;
+		}
+
+		OoaPrologIdentifier id1 = createIdentifierVisitor();
+		OoaPrologIdentifier id2 = createIdentifierVisitor();
+		OoaPrologIdentifier id3 = createIdentifierVisitor();
+
+
+		switch (qalitativeConstraintStatement.operation())
+		{
+		case Deriv:
+			qalitativeConstraintStatement.variable0().Accept(id1);
+			qalitativeConstraintStatement.variable1().Accept(id2);
+			m_emitter.Append(String.format("%s := dt %s", id1.toString(), id2.toString()));
+			break;
+		case Diff:
+			qalitativeConstraintStatement.variable0().Accept(id1);
+			qalitativeConstraintStatement.variable1().Accept(id2);
+			qalitativeConstraintStatement.variable2().Accept(id3);
+			m_emitter.Append(String.format("%s := %s - %s", id1.toString(), id2.toString(), id3.toString()));
+			break;
+		case Equal:
+			qalitativeConstraintStatement.variable0().Accept(id1);
+			qalitativeConstraintStatement.variable1().Accept(id2);
+			m_emitter.Append(String.format("%s := %s", id1.toString(), id2.toString()));
+			break;
+
+		case Prod:
+			qalitativeConstraintStatement.variable0().Accept(id1);
+			qalitativeConstraintStatement.variable1().Accept(id2);
+			qalitativeConstraintStatement.variable2().Accept(id3);
+			m_emitter.Append(String.format("%s := %s * %s", id1.toString(), id2.toString(), id3.toString()));
+			break;
+
+		case Sum:
+			qalitativeConstraintStatement.variable0().Accept(id1);
+			qalitativeConstraintStatement.variable1().Accept(id2);
+			qalitativeConstraintStatement.variable2().Accept(id3);
+			m_emitter.Append(String.format("%s := %s + %s", id1.toString(), id2.toString(), id3.toString()));
+			break;
+
+		default:
+			throw new NotImplementedException();
+		}
+	}
+
+
+	@Override
+	public /*override*/ String toString()
+	{
+		return m_emitter.toString();
+	}
+
+	protected OoaPrologExpression createExpressionVisitor() { return m_exprFactory.create(m_idFactory, m_typeFactory, m_scratchbook); }
+	protected OoaPrologExpression createExpressionVisitor(boolean lhs) { return m_exprFactory.create(m_idFactory, m_typeFactory, m_scratchbook, lhs); }
+	protected OoaPrologIdentifier createIdentifierVisitor() { return m_idFactory.create(); }
+	protected OoaPrologType createTypeVisitor() { return m_typeFactory.create(m_idFactory, m_scratchbook); }
+
+	private final OoaPrologExpression.Factory m_exprFactory;
+	private final OoaPrologIdentifier.Factory m_idFactory;
+	private final OoaPrologType.Factory m_typeFactory;
+
+	protected OoaPrologStatement(
+			OoaPrologExpression.Factory exprFactory,
+			OoaPrologIdentifier.Factory idFactory,
+			OoaPrologType.Factory typeFactory,
+			Scratchbook scratchbook)
+	{
+		super();
+		m_exprFactory = exprFactory;
+		m_idFactory = idFactory;
+		m_typeFactory = typeFactory;
+		m_scratchbook = scratchbook;
+	}
+}
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologType.java	(revision 2)
@@ -0,0 +1,335 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.prolog;
+
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.types.BoolType;
+import org.momut.ooas.ast.types.CharType;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.OoActionSystemInstance;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.ast.types.ValuedEnumType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.visitors.OoaTypeVisitor;
+
+public class OoaPrologType extends OoaTypeVisitor
+{
+	public static class Factory
+	{
+		public OoaPrologType create(OoaPrologIdentifier.Factory idFactory, Scratchbook scratchbook) { return new OoaPrologType(idFactory, scratchbook); }
+	}
+
+	protected final Scratchbook m_scratchbook;
+
+	public static void EmitType(UlyssesType aType, OoaPrologIdentifier.Factory idFactory, Scratchbook scratchbook)
+	{
+		final OoaPrologType ptype = new OoaPrologType(idFactory, scratchbook);
+		final OoasCodeEmitter m_emitter = new OoasCodeEmitter();
+
+		if (scratchbook.definedTypes().contains(aType))
+			return;
+
+		scratchbook.definedTypes().add(aType);
+
+		switch (aType.kind())
+		{
+		case OoActionSystemType:
+			aType.Accept(ptype);
+			final OoActionSystemType classtype = (OoActionSystemType)aType;
+			// m_emitter.Append(String.format("type( %s, X) :- member(X,[ 'null'", ptype.ToString()));
+			if (classtype.objects().size() == 0 && classtype.derivedObjects().size() == 0)
+			{
+				m_emitter.AppendLine(String.format("type( %s, nil).", ptype.toString()));
+			}
+			else
+			{
+				m_emitter.Append(String.format("type( %s, X) :- member(X,[null,", ptype.toString()));
+				boolean firste = true;
+				for (final OoActionSystemInstance inst: classtype.objects())
+				{
+					if (firste)
+						firste = false;
+					else
+						m_emitter.Append(", ");
+					m_emitter.Append(String.format("'%s'", inst.Name));
+				}
+				firste = true;
+				if (classtype.objects().size() > 0 && classtype.derivedObjects().size() > 0)
+					m_emitter.Append(", ");
+				for (final OoActionSystemInstance inst: classtype.derivedObjects())
+				{
+					if (firste)
+						firste = false;
+					else
+						m_emitter.Append(", ");
+					m_emitter.Append(String.format("'%s'", inst.Name));
+				}
+				m_emitter.AppendLine("]).");
+			}
+			break;
+		case EnumeratedType:
+			aType.Accept(ptype);
+			if (aType instanceof ValuedEnumType)
+			{
+				final ValuedEnumType venum = (ValuedEnumType)aType;
+				m_emitter.Append(String.format("type(%s, X) :- member(X,[", ptype.toString()));
+				boolean nocomma = true;
+				for (final Identifier val: venum.symbolTable().symbolList())
+				{
+					final EnumIdentifier id = (EnumIdentifier)val;
+					assert(id.HaveValue());
+					if (nocomma)
+						nocomma = false;
+					else
+						m_emitter.Append(", ");
+					m_emitter.Append(id.Value());
+				}
+				m_emitter.AppendLine("]).");
+			}
+			else
+			{
+				final EnumType enumtype = (EnumType)aType;
+				m_emitter.AppendLine(String.format("type( %s, X) :- X in 0..%s, labeling([],[X]).", ptype.toString(), enumtype.listOfEnumSymbols().size() - 1));
+			}
+			break;
+		case IntType:
+			aType.Accept(ptype);
+			final IntType inttype = (IntType)aType;
+			m_emitter.AppendLine(String.format("type( %s, X) :- X in %s..%s, labeling([],[X]).", ptype.toString().replace("-", ""), inttype.rangeLow(), inttype.rangeHigh()));
+			break;
+		case FloatType:
+			throw new NotImplementedException();
+
+		case Any:
+			break;
+
+		case ListType:
+			final ListType listType = (ListType)aType;
+			aType.Accept(ptype);
+			m_emitter.Append(String.format("type( %s, ", ptype.toString()));
+			m_emitter.Append("[");
+			Boolean first = true;
+			final OoaPrologType pType = new OoaPrologType(idFactory, scratchbook);
+			listType.innerType().Accept(pType);
+
+			for (int i = 0; i < listType.maxNumberOfElements(); i++)
+			{
+				if (!first)
+				{
+					m_emitter.Append(", ");
+				}
+				first = false;
+				m_emitter.Append(pType.toString());
+			}
+			m_emitter.AppendLine("]).");
+			break;
+
+		case MapType:
+			throw new NotImplementedException();
+
+		case FunctionType:
+		case OpaqueType:
+		case Null:
+			throw new NotImplementedException(); // must not hit this
+
+		case TupleType:
+			final TupleType tupleType = (TupleType)aType;
+			aType.Accept(ptype);
+			m_emitter.Append(String.format("type( %s, ", ptype.toString()));
+			m_emitter.Append("[");
+			first = true;
+
+			for (final UlyssesType type: tupleType.innerTypes())
+			{
+				final OoaPrologType iType = new OoaPrologType(idFactory, scratchbook);
+				type.Accept(iType);
+
+				if (!first)
+				{
+					m_emitter.Append(", ");
+				}
+				first = false;
+				m_emitter.Append(iType.toString());
+			}
+			m_emitter.AppendLine("]).");
+			break;
+
+		case QrType:
+			aType.Accept(ptype);
+			final QrType qrtype = (QrType)aType;
+
+			final StringBuilder landmarks = new StringBuilder();
+			int cntr = 0;
+			for (final LandmarkIdentifier s: qrtype.landmarks())
+			{
+				if (cntr != 0)
+					landmarks.append(", ");
+				else
+					cntr++;
+
+				final OoaPrologIdentifier identifierVisitor = idFactory.create();
+				s.Accept(identifierVisitor);
+				landmarks.append(identifierVisitor.toString());
+			}
+			m_emitter.AppendLine(String.format("qspace( %s, [%s] ).", ptype.toString(), landmarks.toString()));
+			break;
+		default:
+			throw new NotImplementedException();
+		}
+		scratchbook.typeDefinitions().append(m_emitter.toString());
+	}
+
+
+	private final OoasCodeEmitter m_emitter = new OoasCodeEmitter();
+	private final OoaPrologIdentifier.Factory m_idFactory;
+
+	public /*override*/ @Override
+	void visit(CharType charType)
+	{
+		m_emitter.Append("char");
+	}
+
+	public /*override*/ @Override
+	void visit(IntType intType)
+	{
+		final OoaPrologIdentifier id = m_idFactory.create();
+		intType.identifier().Accept(id);
+		EmitType(intType, m_idFactory, m_scratchbook);
+		m_emitter.Append(id.toString());
+	}
+
+	public /*override*/ @Override
+	void visit(BoolType boolType)
+	{
+		m_emitter.Append("bool");
+	}
+
+	public /*override*/ @Override
+	void visit(FloatType floatType)
+	{
+		throw new NotImplementedException();
+	}
+
+	public /*override*/ @Override
+	void visit(EnumType enumType)
+	{
+		final OoaPrologIdentifier id = m_idFactory.create();
+		enumType.identifier().Accept(id);
+		EmitType(enumType, m_idFactory, m_scratchbook);
+		m_emitter.Append(id.toString());
+	}
+
+	public /*override*/ @Override
+	void visit(ListType listType)
+	{
+		final OoaPrologIdentifier id = m_idFactory.create();
+		listType.identifier().Accept(id);
+		EmitType(listType, m_idFactory, m_scratchbook);
+		m_emitter.Append(id.toString());
+
+	}
+
+	public /*override*/ @Override
+	void visit(MapType mapType)
+	{
+		throw new NotImplementedException();
+	}
+
+	public /*override*/ @Override
+	void visit(QrType qrType)
+	{
+		final OoaPrologIdentifier id = m_idFactory.create();
+		qrType.identifier().Accept(id);
+		m_emitter.Append(id.toString());
+		// m_emitter.Append(qrType.identifier.tokenText.ToLower());
+	}
+
+	public /*override*/ @Override
+	void visit(TupleType tupleType)
+	{
+		final OoaPrologIdentifier id = m_idFactory.create();
+		tupleType.identifier().Accept(id);
+		EmitType(tupleType, m_idFactory, m_scratchbook);
+		m_emitter.Append(id.toString());
+	}
+
+	public /*override*/ @Override
+	void visit(FunctionType functionType)
+	{
+		throw new NotImplementedException();
+	}
+
+	public /*override*/ @Override
+	void visit(OoActionSystemType ooActionSystemType)
+	{
+		final OoaPrologIdentifier id = m_idFactory.create();
+		ooActionSystemType.identifier().Accept(id);
+		m_emitter.Append(id.toString());
+	}
+
+	public /*override*/ @Override
+	void visit(OpaqueType opaqueType)
+	{
+		throw new NotImplementedException();
+	}
+
+
+	@Override
+	public /*override*/ String toString()
+	{
+		return m_emitter.toString();
+	}
+
+	public String GetInternalTypeDefinitions()
+	{
+		final OoasCodeEmitter result = new OoasCodeEmitter();
+
+		result.AppendLine("type(bool, X) :- member(X,[fail,true]).");
+		result.AppendLine("type(char, X) :- X in 0..255, labeling([],[X]).");
+
+		return result.toString();
+	}
+
+	protected OoaPrologType(OoaPrologIdentifier.Factory idFactory, Scratchbook scratchbook)
+	{
+		m_idFactory = idFactory;
+		m_scratchbook = scratchbook;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicStatement.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicStatement.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicStatement.java	(revision 2)
@@ -0,0 +1,171 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.prologsymbolic;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.codegen.prolog.OoaPrologExpression;
+import org.momut.ooas.codegen.prolog.OoaPrologIdentifier;
+import org.momut.ooas.codegen.prolog.OoaPrologStatement;
+import org.momut.ooas.codegen.prolog.OoaPrologType;
+import org.momut.ooas.codegen.prolog.Scratchbook;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+
+public class OoaPrologSymbolicStatement extends OoaPrologStatement
+{
+	public static class Factory extends OoaPrologStatement.Factory
+	{
+		@Override
+		public /*override*/ OoaPrologStatement create(
+				OoaPrologExpression.Factory exprFactory,
+				OoaPrologIdentifier.Factory idFactory,
+				OoaPrologType.Factory typeFactory,
+				Scratchbook scratchbook)
+		{
+			return new OoaPrologSymbolicStatement(exprFactory, idFactory, typeFactory, scratchbook);
+		}
+	}
+
+	@Override
+	public /*override*/ void visit(Assignment assignment)
+	{
+		if (assignment.nondetExpression() != null)
+			throw new NotImplementedException();
+
+		final Iterator<Expression> aPlaceIt = assignment.places().iterator();
+		final Iterator<Expression> aValueIt = assignment.values().iterator();
+		final ArrayList<String> assignments = new ArrayList<String>();
+
+		while (aPlaceIt.hasNext())
+		{
+			final Expression aPlace = aPlaceIt.next();
+			final Expression aValue = aValueIt.next();
+
+			final OoaPrologExpression prologPlace = createExpressionVisitor(true);
+			aPlace.Accept(prologPlace);
+			assert(prologPlace.tmpVariables().size() == 1);
+
+			final OoaPrologExpression prologValue = createExpressionVisitor();
+			aValue.Accept(prologValue);
+			assert(prologValue.tmpVariables().size() == 1);
+
+			m_emitter.Append(prologValue.toString());
+
+			if (aPlace.kind() == ExpressionKind.Access &&
+					((AccessExpression)aPlace).right().kind() == ExpressionKind.Identifier &&
+					((IdentifierExpression)((AccessExpression)aPlace).right()).identifier().kind() == IdentifierKind.AttributeIdentifier)
+			{
+				//access to attribute is always 'self.XY'...
+				assignments.add(String.format("%s := %s", prologPlace.tmpVariables().get(0), prologValue.tmpVariables().get(0)));
+			}
+			else
+				if (prologPlace.tmpVariables().get(0).equals("RESULT"))
+					assignments.add(String.format("unify( RESULT = %s)", prologValue.tmpVariables().get(0)));
+				else
+					assignments.add(String.format("%s = %s", prologPlace.tmpVariables().get(0), prologValue.tmpVariables().get(0)));
+
+			if (prologPlace.toString().length() > 0)
+			{
+				String place = prologPlace.toString();
+				place = place.trim();
+				if (place.endsWith(","))
+					place = place.substring(0, place.length() - 1);
+
+				assignments.add(place);
+			}
+		}
+
+		int pos = 0;
+		for (final String s: assignments)
+		{
+			if (pos != 0)
+				m_emitter.Append(",");
+			pos++;
+			m_emitter.Append(s);
+		}
+	}
+
+	@Override
+	public /*override*/ void visit(SeqBlock seqBlock)
+	{
+		int y = 0;
+		if (seqBlock.symbols().symbolList().size() > 0)
+		{
+			m_emitter.Append(" [");
+			for (final Identifier sym: seqBlock.symbols().symbolList())
+			{
+				if (y != 0)
+					m_emitter.AppendLine(", ");
+				else
+					y++;
+
+				final OoaPrologType atype = createTypeVisitor();
+				sym.type().Accept(atype);
+				final OoaPrologIdentifier anIdent = createIdentifierVisitor();
+				sym.Accept(anIdent);
+				m_emitter.Append(String.format("%s:%s", anIdent.toString(), atype.toString()));
+			}
+			m_emitter.Append("]: ( ");
+		}
+
+		y = 0;
+		for (final Statement x: seqBlock.statements())
+		{
+			if (y != 0)
+				m_emitter.AppendLine(", ");
+			else
+				y++;
+			m_emitter.Append("(");
+			VisitSub(x, seqBlock);
+			m_emitter.Append(")");
+		}
+
+		if (seqBlock.symbols().symbolList().size() > 0)
+			m_emitter.Append(")");
+	}
+
+
+	protected OoaPrologSymbolicStatement(
+			OoaPrologExpression.Factory exprFactory,
+			OoaPrologIdentifier.Factory idFactory,
+			OoaPrologType.Factory typeFactory,
+			Scratchbook scratchbook)
+	{
+		super (exprFactory, idFactory, typeFactory, scratchbook);
+	}
+}
Index: trunk/compiler/ooasCompiler/libraries/protobuf.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/compiler/ooasCompiler/libraries/protobuf.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/math/AbstractRange.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/math/AbstractRange.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/math/AbstractRange.java	(revision 2)
@@ -0,0 +1,32 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.math;
+
+public abstract class AbstractRange
+{
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicExpression.java	(revision 2)
@@ -0,0 +1,396 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.prologsymbolic;
+
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.ast.types.ValuedEnumType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.codegen.prolog.OoaPrologExpression;
+import org.momut.ooas.codegen.prolog.OoaPrologIdentifier;
+import org.momut.ooas.codegen.prolog.OoaPrologType;
+import org.momut.ooas.codegen.prolog.Scratchbook;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+
+public class OoaPrologSymbolicExpression extends OoaPrologExpression
+{
+	public static class Factory extends OoaPrologExpression.Factory
+	{
+		@Override
+		public /*override*/ OoaPrologExpression create(OoaPrologIdentifier.Factory idFactory, OoaPrologType.Factory typeFactory, Scratchbook scratchbook, boolean lhs)
+		{ return new OoaPrologSymbolicExpression(idFactory, typeFactory, scratchbook, this, lhs); }
+	}
+
+	/*Also treats bools and enums as ints..*/
+	@Override
+	protected boolean isNumericBinary(Expression expression)
+	{
+		boolean result = false;
+		if (expression instanceof BinaryOperator)
+		{
+			final TypeKind leftKind = ((BinaryOperator)expression).left().type().kind();
+			final TypeKind rightKind = ((BinaryOperator)expression).right().type().kind();
+			result = (leftKind == TypeKind.IntType || leftKind == TypeKind.BoolType || leftKind == TypeKind.EnumeratedType) &&
+					(rightKind == TypeKind.IntType || rightKind == TypeKind.BoolType || rightKind == TypeKind.EnumeratedType);
+		}
+		else if (expression instanceof UnaryOperator)
+		{
+			final TypeKind childKind = ((UnaryOperator)expression).child().type().kind();
+			result = childKind == TypeKind.IntType || childKind == TypeKind.BoolType || childKind == TypeKind.EnumeratedType;
+		}
+		else throw new NotImplementedException();
+		return result;
+	}
+
+	// we need to map all other things to Prolog constructs
+	private String operatorString(Expression expression, UlyssesType resultingType)
+	{
+		switch (expression.kind())
+		{
+		case abs:    // T_ABS:
+		case card:   // T_CARD:
+		case dom:    // T_DOM:
+		case range:  // T_RNG:
+		case merge:  // T_MERGE:
+		case elems:  // T_ELEMS:
+		case head:   // T_HEAD:
+		case tail:   // T_TAIL:
+		case conc:   // T_CONC:
+		case inds:   // T_INDS:
+		case dinter: // T_DINTER:
+		case dunion: // T_DUNION:
+		case domresby:   // T_DOMRESBY:
+		case domresto:   // T_DOMRESTO:
+		case rngresby:   // T_RNGRESBY:
+		case rngresto:   // T_RNGRESTO:
+		case inter:  // T_INTER:
+		case union:  // T_UNION:
+		case diff:   // T_DIFF:
+		case munion: // T_MUNION:
+		case seqmod_mapoverride: // T_SEQMOD_MAPOVERRIDE:
+		case subset:
+		case elemin:
+		case notelemin:
+		case implies:    // T_IMPLIES:
+		case biimplies:  // T_BIIMPLIES:
+		case Primed:
+		case len:    // T_LEN:
+			throw new NotImplementedException();
+
+		case div:    // T_DIV:
+			return "/";
+		case idiv:   // T_IDIV:
+			return "/";
+		case mod:    // T_MOD:
+			return "mod";
+		case prod:   // T_PROD:
+			return "*";
+		case sum:    // T_SUM:
+			return "+";
+		case minus:  // T_MINUS:
+			return "-";
+		case less:
+			return resultingType.kind() == TypeKind.QrType || !isNumericBinary(expression) ? "<" : "#<";
+		case lessequal:
+			return resultingType.kind() == TypeKind.QrType || !isNumericBinary(expression) ? "=<" : "#=<";
+		case greater:
+			return resultingType.kind() == TypeKind.QrType || !isNumericBinary(expression) ? ">" : "#>";
+		case greaterequal:
+			return resultingType.kind() == TypeKind.QrType || !isNumericBinary(expression) ? ">=" : "#>=";
+		case equal:
+			return resultingType.kind() == TypeKind.QrType ? "==" : "#=";
+		case notequal:
+			return resultingType.kind() == TypeKind.QrType || !isNumericBinary(expression) ? "\\=" : "#\\=";
+		case and:    // T_AND:
+			throw new NotImplementedException(); // implemented in binaryoperator
+		case or:     // T_OR:
+			throw new NotImplementedException(); // implemented in binaryoperator
+		case not:
+			throw new NotImplementedException(); // implemented in binaryoperator
+
+		case Cast:
+			return "";
+
+		default:
+			return expression.kind().name(); //Enum.GetName(typeof(ExpressionKind), expression.kind);
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public /*override*/ <T> void visit(ValueExpression<T> valueExpression)
+	{
+		assert(m_tmpVars.size() == 0);
+		final String tmpVar = NewTempVariable();
+		m_emitter.Append(String.format("%s ", tmpVar));
+
+
+		if (valueExpression.value() == null)
+			m_emitter.Append("= 'null'");
+		else if (Boolean.class.isAssignableFrom(valueExpression.m_clazz))
+			m_emitter.Append(((ValueExpression<Boolean>)valueExpression).value() ? " = true" : " = false");
+		else if (Character.class.isAssignableFrom(valueExpression.m_clazz))
+			m_emitter.Append(String.format("= '%s'", valueExpression.toString()));
+		else if (Integer.class.isAssignableFrom(valueExpression.m_clazz))
+			m_emitter.Append(String.format("= %s", valueExpression.toString()));
+		else
+			m_emitter.Append(String.format("= %s", valueExpression.value().toString()));
+
+		m_emitter.AppendLine(",");
+		assert(m_tmpVars.size() == 1);
+	}
+
+	@Override
+	public /*override*/ void visit(IdentifierExpression identifierExpression)
+	{
+		if (identifierExpression.identifier().kind() == IdentifierKind.LandmarkIdentifier)
+		{
+			final LandmarkIdentifier lmid = (LandmarkIdentifier)identifierExpression.identifier();
+			final OoaPrologIdentifier pid = createIdentifierVisitor();
+			lmid.Accept(pid);
+			//m_emitter.Append(pid.ToString());
+			m_tmpVars.add(pid.toString());
+			return;
+		}
+		else if (identifierExpression.identifier().kind() == IdentifierKind.EnumIdentifier)
+		{
+			final EnumIdentifier enumid = (EnumIdentifier)identifierExpression.identifier();
+			final EnumType enumType = (EnumType)enumid.type();
+			//m_emitter.Append(enumType.listOfEnumSymbols.IndexOf(enumid));
+			if (enumType instanceof ValuedEnumType)
+				m_emitter.AppendLine(String.format("%s = %s,", NewTempVariable(), enumid.Value()));
+			else
+				m_emitter.AppendLine(String.format("%s = %s,", NewTempVariable(), enumType.listOfEnumSymbols().indexOf(enumid)));
+		}
+		else if (identifierExpression.isSelf())
+		{
+			m_emitter.AppendLine(String.format("%s = %s,", NewTempVariable(), GetIdentifierString(identifierExpression.identifier())));
+		}
+		else
+		{
+			m_tmpVars.add(GetIdentifierString(identifierExpression.identifier()));
+		}
+	}
+
+	@Override
+	public /*override*/ void visit(UnaryOperator unaryOperator)
+	{
+		assert(m_tmpVars.size() == 0);
+		VisitSub(unaryOperator.child(), unaryOperator);
+
+		if (unaryOperator.kind() == ExpressionKind.Cast)
+			return;
+
+		final String childresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+		assert(m_tmpVars.size() == 0);
+
+		final String tmpresult = NewTempVariable();
+
+		switch (unaryOperator.kind())
+		{
+		case head:
+			m_emitter.AppendLine(String.format("ulyssesListHead(%s,%s),", childresult, tmpresult));
+			break;
+
+		case tail:
+			m_emitter.AppendLine(String.format("ulyssesListTail(%s,%s),", childresult, tmpresult));
+			break;
+
+		case len:    // T_LEN:
+			m_emitter.AppendLine(String.format("ulyssesListLength(%s,%s),", childresult, tmpresult));
+			break;
+
+		case not:
+			m_emitter.Append(String.format(" %s = ( #\\", tmpresult));
+			m_emitter.Append("(");
+			m_emitter.Append(childresult);
+			m_emitter.AppendLine(")),");
+			break;
+
+		case Cast:
+			// todo
+			break;
+
+		default:
+			//do not use #= for assignments in the symbolic backend
+			m_emitter.Append(String.format(" %s = (%s", tmpresult, operatorString(unaryOperator, unaryOperator.child().type())));
+			m_emitter.Append("(");
+			m_emitter.Append(childresult);
+			m_emitter.AppendLine(")),");
+			break;
+		}
+		assert(m_tmpVars.size() == 1);
+	}
+
+	@Override
+	public /*override*/ void visit(BinaryOperator binaryOperator)
+	{
+		// eval stack must be empty
+		assert(m_tmpVars.size() == 0);
+
+		final OoasCodeEmitter origEmitter = m_emitter;
+		final OoasCodeEmitter leftcode = new OoasCodeEmitter();
+		final OoasCodeEmitter rightcode = new OoasCodeEmitter();
+
+
+		// traverse left
+		m_emitter = leftcode;
+		VisitSub(binaryOperator.left(), binaryOperator);
+		final String leftresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+		assert(m_tmpVars.size() == 0);
+
+		// traverse right
+		m_emitter = rightcode;
+		VisitSub(binaryOperator.right(), binaryOperator);
+		final String rightresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+		// eval stack must be empty
+		assert(m_tmpVars.size() == 0);
+
+		// restore original emitter and get tmp.var
+		m_emitter = origEmitter;
+		final String tmpVar = NewTempVariable();
+
+		switch (binaryOperator.kind())
+		{
+		case elemin:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			m_emitter.AppendLine(String.format(" %s = member(%s,%s),",
+					tmpVar, leftresult, rightresult));
+			break;
+		case and:    // T_AND:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			m_emitter.AppendLine(String.format(" %s = (%s %s %s), ",
+					tmpVar, leftresult, "#/\\", rightresult));
+			break;
+		case or:     // T_OR:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			m_emitter.AppendLine(String.format(" %s = (%s %s %s), ",
+					tmpVar, leftresult, "#\\/", rightresult));
+			break;
+
+		case implies:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.AppendLine(String.format(" %s = (%s -> (%s%s); true), ", // {0} = (({1} -> ({2}{3}); true))
+					tmpVar, leftresult, rightcode.toString(), rightresult));
+			break;
+
+		case equal:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			/*check if we have tupleconstructors as matchers*/
+			TupleConstructor matcher = null;
+			String aTuple = null;
+			if (binaryOperator.left().kind() == ExpressionKind.TupleConstr &&
+					((TupleConstructor)binaryOperator.left()).isMatcher())
+			{
+				matcher = (TupleConstructor)binaryOperator.left();
+				aTuple = rightresult;
+			}
+			else if (binaryOperator.right().kind() == ExpressionKind.TupleConstr &&
+					((TupleConstructor)binaryOperator.right()).isMatcher())
+			{
+				matcher = (TupleConstructor)binaryOperator.right();
+				aTuple = leftresult;
+			}
+
+			if (matcher == null)
+				m_emitter.AppendLine(String.format(" %s = (%s %s %s), ",
+				tmpVar, leftresult, operatorString(binaryOperator, binaryOperator.left().type()), rightresult));
+			else
+			{
+				m_emitter.Append(String.format("%s = unify(%s = [", tmpVar, aTuple));
+				int cntr = 0;
+				for (final Expression x: matcher.values())
+				{
+					if (cntr != 0)
+						m_emitter.Append(", ");
+					else
+						cntr++;
+
+					if (x.kind() != ExpressionKind.Identifier)
+						throw new ArgumentException();
+
+					final IdentifierExpression ident = (IdentifierExpression)x;
+					final OoaPrologIdentifier avisitor = createIdentifierVisitor();
+					ident.Accept(avisitor);
+					m_emitter.Append(avisitor.toString());
+				}
+				m_emitter.AppendLine("]),");
+			}
+			break;
+
+
+
+		case conc:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			m_emitter.AppendLine(String.format("ulyssesListConc(%s,%s,%s),", leftresult, rightresult, tmpVar));
+			break;
+
+		default:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			if (binaryOperator.left().type().kind() == TypeKind.QrType)
+				m_emitter.Append("qEval");
+
+			//do not use #= for assignments in the symbolic backend
+			m_emitter.AppendLine(String.format(" %s = (%s %s %s), ",
+					tmpVar, leftresult, operatorString(binaryOperator, binaryOperator.left().type()), rightresult));
+			break;
+		}
+		assert(m_tmpVars.size() == 1);
+	}
+
+
+
+	protected OoaPrologSymbolicExpression(
+			OoaPrologIdentifier.Factory idFactory,
+			OoaPrologType.Factory typeFactory,
+			Scratchbook scratchbook,
+			OoaPrologExpression.Factory expressionFactory,
+			boolean lhs)
+	{
+		super (idFactory, typeFactory, scratchbook, expressionFactory,  lhs);
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicVisitor.java	(revision 2)
@@ -0,0 +1,109 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.prologsymbolic;
+
+import java.util.Date;
+
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.codegen.prolog.OoaPrologIdentifier;
+import org.momut.ooas.codegen.prolog.OoaPrologVisitor;
+import org.momut.ooas.parser.ParserState;
+
+public final class OoaPrologSymbolicVisitor extends OoaPrologVisitor
+{
+	@Override
+	public  void visit(MainModule mainModule)
+	{
+		m_emitter.AppendLine("% OOAS Compiler Generated");
+//		m_emitter.AppendLine("%" + Mogentes.Program.GetProgramVersion().ToString().Replace(Environment.NewLine, Environment.NewLine + "%")));
+		m_emitter.AppendLine("% Code-Gen Version: 0.3 symbolic");
+		m_emitter.Append("%        Generated: "); m_emitter.AppendLine(new Date().toString());
+		m_emitter.AppendLine("%------------------------------------------------------------------------");
+		m_emitter.AppendLine("");
+		m_emitter.AppendLine(String.format(":- module(%s, [var/2, input/1, searchDepth/1, qspace/2]).", m_nameSpace));
+		m_emitter.AppendLine(":- use_module(library(file_systems)).");
+		m_emitter.AppendLine(":- use_module(library(process)).");
+		m_emitter.AppendLine(":- use_module(library(clpfd)).");
+		m_emitter.AppendLine(":- use_module(library(clpb)).");
+		m_emitter.AppendLine(":- use_module(library(lists)).");
+		m_emitter.AppendLine(":- use_module(library(avl)).");
+		m_emitter.AppendLine(":- use_module(library(ordsets)).");
+		m_emitter.AppendLine(":- use_module(library(system)).");
+//		m_emitter.AppendLine(":- use_module(library(gauge)).");
+		m_emitter.AppendLine(":- use_module(library(terms)).");
+		m_emitter.AppendLine(":- use_module(library(sets)).");
+		m_emitter.AppendLine(":- use_module(library(random)).");
+
+		m_emitter.AppendLine(":- public(as/0).");
+		m_emitter.AppendLine(":- dynamic(as/0).");
+		m_emitter.AppendLine(":- dynamic(qstate_init/1).");
+		m_emitter.AppendLine(":- dynamic(qstate_constraints/1).");
+		m_emitter.AppendLine(":- public(qstate_init/1).");
+		m_emitter.AppendLine(":- public(qstate_constraints/1).");
+		m_emitter.AppendLine(":- dynamic(type/2).");
+
+		/*definition of search depth*/
+		m_emitter.AppendLine("");
+		m_emitter.AppendLine("% maximal search depth (change at will)");
+		m_emitter.AppendLine(String.format("searchDepth(%s).", m_maxSearchDepth));
+		m_emitter.AppendLine("");
+
+		/*definition of types*/
+		ExportTypes(mainModule);
+		/* variable definition */
+		ExportVariables(mainModule);
+
+		/* state definition */
+		ExportState(mainModule);
+		/* initial state */
+		ExportInitialState(mainModule);
+		/* input actions (controllables) */
+		ExportControllableActions(mainModule);
+		/* output actions (observables) */
+		ExportObservableActions(mainModule);
+		/* named actions */
+		ExportMethodsAndActions(mainModule);
+
+		/* all types */
+		m_emitter.AppendLine("%definition of types");
+		m_emitter.AppendLine(m_scratchbook.typeDefinitions().toString());
+		m_emitter.AppendLine(createTypeVisitor().GetInternalTypeDefinitions());
+	}
+
+
+	public OoaPrologSymbolicVisitor(ParserState aState, int maxSearchDepth, String nameSpace )
+	{
+		super(aState,
+			maxSearchDepth,
+			nameSpace,
+			new OoaPrologSymbolicExpression.Factory(),
+			new OoaPrologIdentifier.Factory(),
+			new OoaPrologSymbolicStatement.Factory(),
+			new OoaPrologSymbolicType.Factory());
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/Version.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/Version.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/Version.java	(revision 2)
@@ -0,0 +1,38 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+package org.momut.ooas;
+
+public class Version {
+
+	public static final String s_releaseMajor = "3";
+	public static final String s_releaseMinor = "0";
+
+	public static String asString() {
+		return s_releaseMajor + "." + s_releaseMinor;
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/math/Operations.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/math/Operations.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/math/Operations.java	(revision 2)
@@ -0,0 +1,166 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.math;
+
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+
+public class Operations<T> extends AbstractOperations
+{
+	public static class BasicOps<T> {
+		public T unMinus(T input) {throw new NotImplementedException();}
+
+		public T minus(T inputA, T inputB) {throw new NotImplementedException();}
+		public T plus(T inputA, T inputB) {throw new NotImplementedException();}
+		public T div(T inputA, T inputB) {throw new NotImplementedException();}
+		public T pow(T inputA, T inputB) {throw new NotImplementedException();}
+		public T prod(T inputA, T inputB) {throw new NotImplementedException();}
+		public T mod(T inputA, T inputB) {throw new NotImplementedException();}
+
+		public boolean equal(T inputA, T intputB) {throw new NotImplementedException();}
+		public boolean smaller(T inputA, T intputB) {throw new NotImplementedException();}
+		public boolean greater(T inputA, T intputB){throw new NotImplementedException();}
+
+		public T getDefaultValue() {throw new NotImplementedException();}
+	}
+
+	protected final BasicOps<T> m_basicOperations;
+
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public AbstractRange GenericArithmeticCover(AbstractRange type1, AbstractRange type2, ExpressionKind op)
+	{
+		Range<T> a = (Range<T>) type1;
+		Range<T> b = (Range<T>) type2;
+
+//		Range<T> a = type1 as Range<T>;
+//		Range<T> b = type2 as Range<T>;
+
+		if (a == null || b == null)
+			throw new ArgumentException();
+
+		return GenericArithmeticCover(a, b, op);
+	}
+
+	public Range<T> GenericArithmeticCover(Range<T> type1, Range<T> type2, ExpressionKind op)
+	{
+		T defaultValue = m_basicOperations.getDefaultValue();
+		Range<T> result = type1.Create(defaultValue, defaultValue);
+
+		switch (op)
+		{
+			case unminus:
+				result.min = m_basicOperations.unMinus(type1.max);
+				result.max = m_basicOperations.unMinus(type1.min);
+				break;
+			case unplus:
+				break;
+
+			case minus:
+				assert(type2 != null);
+				// we do some sort of resulttype = type1 - type2
+				// hence, do the unminus stuff with type 2
+				T spare = type2.max;
+				type2.max = m_basicOperations.unMinus(type2.min);
+				type2.min = m_basicOperations.unMinus(spare);
+				// now it's the same as with sum.. but c# does not let us fall through..
+				result.min = m_basicOperations.plus(type1.min, type2.min);
+				result.max = m_basicOperations.plus(type1.max, type2.max);
+				break;
+			case sum:
+				assert(type2 != null);
+				result.min = m_basicOperations.plus(type1.min, type2.min);
+				result.max = m_basicOperations.plus(type1.max, type2.max);
+				break;
+			case idiv:
+			case div:
+				assert(type2 != null);
+				type2.min = m_basicOperations.equal(type2.min, defaultValue) ?
+						m_basicOperations.unMinus(type2.precision) : type2.min;
+				type2.max = m_basicOperations.equal(type2.max, defaultValue) ?
+						type2.precision : type2.max;
+				// hmm, brute force.. is there some formula?
+				result.max = m_basicOperations.div(type1.min, type2.min);
+				result.min = result.max;
+
+				T tmp = m_basicOperations.div(type1.max, type2.min);
+				result.max = m_basicOperations.smaller(result.max, tmp) ? tmp : result.max;
+				result.min = m_basicOperations.greater(result.min, tmp) ? tmp : result.min;
+
+				tmp = m_basicOperations.div(type1.min, type2.max);
+				result.max = m_basicOperations.smaller(result.max, tmp) ? tmp : result.max;
+				result.min = m_basicOperations.greater(result.min, tmp) ? tmp : result.min;
+
+				tmp = m_basicOperations.div(type1.max, type2.max);
+				result.max = m_basicOperations.smaller(result.max, tmp) ? tmp : result.max;
+				result.min = m_basicOperations.greater(result.min, tmp) ? tmp : result.min;
+				break;
+			case mod:
+				throw new ArgumentException(); // do this one level up
+			case pow:
+				// ok, this is bad. - just give up here
+				result.max = result.typemax;
+				result.min = result.typemin;
+				break;
+			case prod:
+				// hmm, brute force.. is there some formula?
+				result.max = m_basicOperations.prod(type1.min, type2.min);
+				result.min = result.max;
+
+				tmp = m_basicOperations.prod(type1.max, type2.min);
+				result.max = m_basicOperations.smaller(result.max, tmp) ? tmp : result.max;
+				result.min = m_basicOperations.greater(result.min, tmp) ? tmp : result.min;
+
+				tmp = m_basicOperations.prod(type1.min, type2.max);
+				result.max = m_basicOperations.smaller(result.max, tmp) ? tmp : result.max;
+				result.min = m_basicOperations.greater(result.min, tmp) ? tmp : result.min;
+
+				tmp = m_basicOperations.prod(type1.max, type2.max);
+				result.max = m_basicOperations.smaller(result.max, tmp) ? tmp : result.max;
+				result.min = m_basicOperations.greater(result.min, tmp) ? tmp : result.min;
+				break;
+
+			default:
+				throw new NotImplementedException();
+		}
+		return result;
+	}
+
+
+	public Operations()
+	{
+		m_basicOperations = new BasicOps<T>();
+	}
+
+	public Operations(BasicOps<T> basicOperations)
+	{
+		m_basicOperations = basicOperations;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/math/AbstractOperations.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/math/AbstractOperations.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/math/AbstractOperations.java	(revision 2)
@@ -0,0 +1,36 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.math;
+
+import org.momut.ooas.ast.expressions.ExpressionKind;
+
+public abstract class AbstractOperations
+{
+	public abstract AbstractRange GenericArithmeticCover(
+			AbstractRange type1, AbstractRange type2, ExpressionKind op);
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/math/IntegerOperations.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/math/IntegerOperations.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/math/IntegerOperations.java	(revision 2)
@@ -0,0 +1,60 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.math;
+
+
+public class IntegerOperations extends Operations<Integer>{
+	public static final class IntegerBasicOps extends BasicOps<Integer> {
+		@Override
+		public Integer unMinus(Integer input) { return  -input;}
+		@Override
+		public Integer minus(Integer inputA, Integer inputB) {return inputA - inputB;}
+		@Override
+		public Integer plus(Integer inputA, Integer inputB) {return inputA + inputB;}
+		@Override
+		public Integer div(Integer inputA, Integer inputB) {return inputA / inputB;}
+		@Override
+		public Integer pow(Integer inputA, Integer inputB) { return (int) (Math.floor(Math.pow(inputA, inputB)));}
+		@Override
+		public Integer prod(Integer inputA, Integer inputB) {return inputA * inputB;}
+		@Override
+		public Integer mod(Integer inputA, Integer inputB) {return inputA % inputB;}
+		@Override
+		public boolean equal(Integer inputA, Integer inputB) {return inputA.equals(inputB);}
+		@Override
+		public boolean smaller(Integer inputA, Integer inputB) {return inputA < inputB;}
+		@Override
+		public boolean greater(Integer inputA, Integer inputB){return inputA > inputB;}
+		@Override
+		public Integer getDefaultValue() {return 0;}
+	}
+
+	public IntegerOperations() {
+		super(new IntegerBasicOps());
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/IAstVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/IAstVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/IAstVisitor.java	(revision 2)
@@ -0,0 +1,167 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast;
+
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.ExistsQuantifier;
+import org.momut.ooas.ast.expressions.ForallQuantifier;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.ListConstructor;
+import org.momut.ooas.ast.expressions.MapConstructor;
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+import org.momut.ooas.ast.expressions.QValConstructor;
+import org.momut.ooas.ast.expressions.SetConstructor;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.TypeExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.UnresolvedIdentifierExpression;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.ConstantIdentifier;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.identifiers.LocalVariableIdentifier;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.Module;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.NondetIdentifierList;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.identifiers.PrioIdentifierList;
+import org.momut.ooas.ast.identifiers.SelfTypeIdentifier;
+import org.momut.ooas.ast.identifiers.SeqIdentifierList;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.identifiers.UnspecIdentifierList;
+import org.momut.ooas.ast.statements.AbortStatement;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.BreakStatement;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.KillStatement;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.QualitativeConstraintStatement;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.SkipStatement;
+import org.momut.ooas.ast.types.AnyType;
+import org.momut.ooas.ast.types.BoolType;
+import org.momut.ooas.ast.types.CharType;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.NullType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+
+/*Notice: The visitor must implement the traversal!*/
+public interface IAstVisitor
+{
+	String returnVisitorName();
+	void done();
+
+	/*Identifiers*/
+	void visit(EnumIdentifier enumIdentifier);
+	void visit(LandmarkIdentifier landmarkIdentifier);
+	void visit(AttributeIdentifier attributeIdentifier);
+	void visit(ExpressionVariableIdentifier expressionVariableIdentifier);
+	void visit(ParameterIdentifier parameterIdentifier);
+	void visit(LocalVariableIdentifier localVariableIdentifier);
+	void visit(TypeIdentifier typeIdentifier);
+	void visit(SelfTypeIdentifier typeIdentifier);
+	void visit(MethodIdentifier methodIdentifier);
+	void visit(NamedActionIdentifier namedActionIdentifier);
+	void visit(MainModule mainModule);
+	void visit(Module module);
+	void visit(NondetIdentifierList nondetIdentifierList);
+	void visit(SeqIdentifierList seqIdentifierList);
+	void visit(PrioIdentifierList prioIdentifierList);
+	void visit(UnspecIdentifierList unspecIdentifierList);
+	void visit(ConstantIdentifier constantIdentifier);
+
+
+	/*Statements*/
+	void visit(NondetBlock nondetBlock);
+	void visit(SeqBlock seqBlock);
+	void visit(PrioBlock prioBlock);
+	void visit(GuardedCommand guardedCommand);
+	void visit(Assignment assignment);
+	void visit(Call call);
+	void visit(SkipStatement skipStatement);
+	void visit(AbortStatement abortStatement);
+	void visit(KillStatement killStatement);
+	void visit(QualitativeConstraintStatement qalitativeConstraintStatement);
+
+
+	/*Expressions*/
+	<T> void visit(ValueExpression<T> valueExpression);
+	void visit(UnresolvedIdentifierExpression unresolvedIdentifierExpression);
+	void visit(IdentifierExpression identifierExpression);
+	void visit(ListConstructor listConstructor);
+	void visit(SetConstructor setConstructor);
+	void visit(MapConstructor mapConstructor);
+	void visit(TupleConstructor tupleConstructor);
+	void visit(ObjectConstructor objectConstructor);
+	void visit(QValConstructor qValConstructor);
+	void visit(AccessExpression accessExpression);
+	void visit(BinaryOperator binaryOperator);
+	void visit(TernaryOperator ternaryOperator);
+	void visit(TupleMapAccessExpression tupleMapAccessExpression);
+	void visit(CallExpression callExpression);
+	void visit(ForallQuantifier quantifier);
+	void visit(ExistsQuantifier quantifier);
+	void visit(UnaryOperator unaryOperator);
+	void visit(TypeExpression typeExpression);
+
+	/*Types*/
+	void visit(CharType charType);
+	void visit(IntType intType);
+	void visit(BoolType boolType);
+	void visit(FloatType floatType);
+	void visit(EnumType enumType);
+	void visit(ListType listType);
+	void visit(MapType mapType);
+	void visit(QrType qrType);
+	void visit(TupleType tupleType);
+	void visit(FunctionType functionType);
+	void visit(OoActionSystemType ooActionSystemType);
+	void visit(OpaqueType opaqueType);
+	void visit(AnyType anyType);
+	void visit(NullType nullType);
+
+	void visit(BreakStatement breakStatement);
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/math/SaturatedIntegerOperations.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/math/SaturatedIntegerOperations.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/math/SaturatedIntegerOperations.java	(revision 2)
@@ -0,0 +1,85 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.math;
+
+
+public final class SaturatedIntegerOperations extends Operations<Integer>{
+	public static final class SatIntegerBasicOps extends BasicOps<Integer> {
+		@Override
+		public Integer unMinus(Integer input) {
+			return input == Integer.MIN_VALUE ? Integer.MAX_VALUE : -input;
+		}
+		@Override
+		public Integer minus(Integer inputA, Integer inputB) {
+			if (inputB < 0)
+				return (inputA > Integer.MAX_VALUE + inputB) ? Integer.MAX_VALUE : inputA - inputB;
+			else
+				return (inputA < Integer.MIN_VALUE + inputB) ? Integer.MIN_VALUE : inputA - inputB;
+		}
+		@Override
+		public Integer plus(Integer inputA, Integer inputB) {
+			if (inputB < 0)
+				return (inputA < Integer.MIN_VALUE - inputB) ? Integer.MIN_VALUE : inputA + inputB;
+			else
+				return (inputA > Integer.MAX_VALUE - inputB) ? Integer.MAX_VALUE : inputA + inputB;
+		}
+		@Override
+		public Integer div(Integer inputA, Integer inputB) {
+			//FIXME: checked { return a / b; };
+			return inputA / inputB;
+		}
+		@Override
+		public Integer pow(Integer inputA, Integer inputB) {
+			long tmp = (long) Math.pow(inputA, inputB);
+			if (tmp < Integer.MIN_VALUE) return Integer.MIN_VALUE;
+			else if (tmp > Integer.MAX_VALUE) return Integer.MAX_VALUE;
+			else return (int)tmp;
+		}
+		@Override
+		public Integer prod(Integer inputA, Integer inputB) {
+			long tmp = (long)inputA * (long)inputB;
+			if (tmp < Integer.MIN_VALUE) return Integer.MIN_VALUE;
+			else if (tmp > Integer.MAX_VALUE) return Integer.MAX_VALUE;
+			else return (int)tmp;
+		}
+		@Override
+		public Integer mod(Integer inputA, Integer inputB) {return inputA % inputB;}
+		@Override
+		public boolean equal(Integer inputA, Integer inputB) {return inputA.equals(inputB);}
+		@Override
+		public boolean smaller(Integer inputA, Integer inputB) {return inputA < inputB;}
+		@Override
+		public boolean greater(Integer inputA, Integer inputB){return inputA > inputB;}
+		@Override
+		public Integer getDefaultValue() {return 0;}
+	}
+
+	public SaturatedIntegerOperations() {
+		super(new SatIntegerBasicOps());
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/math/IntegerRange.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/math/IntegerRange.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/math/IntegerRange.java	(revision 2)
@@ -0,0 +1,42 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.math;
+
+public class IntegerRange extends Range<Integer> {
+	private final static class IntegerRangeFactory implements RangeConstructor<Integer> {
+		@Override
+		public Range<Integer> create(Integer max, Integer min) {
+			return new IntegerRange(max,min);
+		}
+	}
+
+	public IntegerRange(int max, int min)
+	{
+		super(max, min, 1, Integer.MAX_VALUE, Integer.MIN_VALUE, new IntegerRangeFactory());
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/math/RangeConstructor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/math/RangeConstructor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/math/RangeConstructor.java	(revision 2)
@@ -0,0 +1,32 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.math;
+
+public interface RangeConstructor<T> {
+	public Range<T> create(T max, T min);
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserState.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserState.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserState.java	(revision 2)
@@ -0,0 +1,142 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.parser;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.antlr.runtime.ANTLRInputStream;
+import org.antlr.runtime.ANTLRStringStream;
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+
+public class ParserState
+{
+	public ooaParser parser;
+	public ooaLexer lexer;
+	public String filename;
+	public String namesTypePrefix = "";
+	public boolean parsingAttributes;
+	public List<String> mappingInformation = new ArrayList<>();
+
+
+	public MainModule ooaSystem;
+
+	public IScope currentScope;
+	public ArrayList<ParserError> listOfParserErrors;
+	public ArrayList<ParserWarning> listOfParserWarnings;
+	public ArrayList<ParserMessage> listOfParserMessages;
+	public ArrayList<OpaqueType> typesToFixUp;
+
+	public ParserState(String unitName, InputStream toParse, String namedTypePrefix) throws IOException{
+		try {
+			listOfParserErrors = new ArrayList<ParserError>();
+			listOfParserWarnings = new ArrayList<ParserWarning>();
+			listOfParserMessages = new ArrayList<ParserMessage>();
+			typesToFixUp = new ArrayList<OpaqueType>();
+			this.filename = unitName;
+			this.namesTypePrefix = namedTypePrefix;
+
+			final ANTLRStringStream input = new ANTLRInputStream(toParse); //, Encoding.ASCII); FIXME: Encoding.ASCII
+			lexer = new ooaLexer(input);
+			final CommonTokenStream tokens = new CommonTokenStream(lexer);
+			parser = new ooaParser(tokens);
+			parser.pState = this;
+		} finally {
+			toParse.close();
+		}
+	}
+
+	public ParserState(String fileToParse, String namedTypePrefix) throws IOException
+	{
+		this(fileToParse, new FileInputStream(fileToParse), namedTypePrefix);
+	}
+
+
+	public void AddErrorMessage(ParserError parserError)
+	{
+		listOfParserErrors.add(parserError);
+	}
+	public void AddWarningMessage(ParserWarning parserWarning)
+	{
+		listOfParserWarnings.add(parserWarning);
+	}
+	public void AddMessage(ParserMessage aMessage)
+	{
+		listOfParserMessages.add(aMessage);
+	}
+
+	public Identifier Lookup(String symbolName, IScope resolveStack)
+	{
+		final String lkupname = symbolName;
+		do
+		{
+			final Identifier result = resolveStack.ResolveIdentifier(lkupname);
+			if (result != null)
+				return result;
+			resolveStack = resolveStack.GetParentScope();
+		} while (resolveStack != null);
+
+		return null;
+	}
+	public Identifier Lookup(String symbolName)
+	{
+		return Lookup(symbolName, currentScope);
+	}
+	public Identifier Lookup(Token symbolName)
+	{
+		if (symbolName != null)
+			return Lookup(symbolName.getText());
+		else
+			return null;
+	}
+
+	public void PushResolveStack(IScope newScope)
+	{
+		// some sanity check.
+		if (newScope instanceof MethodIdentifier && !(currentScope instanceof OoActionSystemType))
+			throw new InternalCompilerException("Assertion violated: current scope no action system.");
+
+		newScope.SetParentScope(currentScope);
+		currentScope = newScope;
+	}
+	public void PopResolveStack()
+	{
+		currentScope = currentScope.GetParentScope();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/CallExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/CallExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/CallExpression.java	(revision 2)
@@ -0,0 +1,80 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+
+///////////////////////////////////////////////
+///  Method call  "(....)"
+///
+public final class CallExpression extends UnaryOperator
+{
+	private ArrayList<Expression> m_arguments;
+	private final IScope m_CallScope;
+
+	public ArrayList<Expression> arguments() { return m_arguments; }
+	public IScope scope(){ return m_CallScope; }
+
+	public CallExpression(Expression child, List<Expression> arguments, int line, int pos, IScope aScope)
+	{
+		super (ExpressionKind.Call, child, line, pos);
+		if (arguments != null)
+			m_arguments = new ArrayList<Expression>(arguments);
+		else
+			m_arguments = new ArrayList<Expression>();
+		m_CallScope = aScope;
+	}
+
+	public CallExpression(CallExpression toCopy)
+	{
+		super (toCopy);
+		m_arguments = new ArrayList<Expression>(toCopy.m_arguments);
+		m_CallScope = toCopy.m_CallScope;
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new CallExpression(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetArguments(ArrayList<Expression> newArgs)
+	{
+		m_arguments = newArgs;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/math/SaturatedDoubleOperations.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/math/SaturatedDoubleOperations.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/math/SaturatedDoubleOperations.java	(revision 2)
@@ -0,0 +1,84 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.math;
+
+
+public final class SaturatedDoubleOperations extends Operations<Double>{
+	public static final class SatDoubleBasicOps extends BasicOps<Double> {
+		private static double checkRange(double aValue)
+		{
+			if (aValue == Double.POSITIVE_INFINITY)
+				return Double.MAX_VALUE;
+			else if (aValue == Double.NEGATIVE_INFINITY)
+				return Double.MIN_VALUE;
+			else
+				return aValue;
+		}
+
+		@Override
+		public Double unMinus(Double input) {
+			return checkRange(-input);
+		}
+		@Override
+		public Double minus(Double inputA, Double inputB) {
+			return checkRange(inputA - inputB);
+		}
+		@Override
+		public Double plus(Double inputA, Double inputB) {
+			return checkRange(inputA + inputB);
+		}
+		@Override
+		public Double div(Double inputA, Double inputB) {
+			return checkRange(inputA / inputB);
+		}
+		@Override
+		public Double pow(Double inputA, Double inputB) {
+			return checkRange(Math.pow(inputA, inputB));
+		}
+		@Override
+		public Double prod(Double inputA, Double inputB) {
+			return checkRange(inputA * inputB);
+		}
+		@Override
+		public Double mod(Double inputA, Double inputB) {
+			return checkRange(inputA % inputB);
+		}
+		@Override
+		public boolean equal(Double inputA, Double inputB) {return inputA.equals(inputB);}
+		@Override
+		public boolean smaller(Double inputA, Double inputB) {return inputA < inputB;}
+		@Override
+		public boolean greater(Double inputA, Double inputB){return inputA > inputB;}
+		@Override
+		public Double getDefaultValue() {return 0.0;}
+	}
+
+	public SaturatedDoubleOperations() {
+		super(new SatDoubleBasicOps());
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserError.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserError.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserError.java	(revision 2)
@@ -0,0 +1,43 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.parser;
+
+import org.antlr.runtime.Token;
+
+public class ParserError extends CompilerMessage
+{
+	public ParserError(String aFile, int aLine, int aColumn, String aMessage)
+	{
+		super (aFile, aLine, aColumn, aMessage);
+	}
+
+	public ParserError(String aFile, Token aSymbol, String aMessage)
+	{
+		super (aFile, aSymbol, aMessage);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooa.tokens
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooa.tokens	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooa.tokens	(revision 2)
@@ -0,0 +1,137 @@
+T__118=118
+T__119=119
+T__120=120
+T__121=121
+T__122=122
+T__123=123
+T__124=124
+T__125=125
+T__126=126
+T__127=127
+FLOAT_OR_INT_OR_RANGE=4
+LINE_COMMENT=5
+T_ABORT=6
+T_ABS=7
+T_ACTIONS=8
+T_AND=9
+T_ASSIGNMENT=10
+T_AUTOCONS=11
+T_BAR=12
+T_BIIMPLIES=13
+T_BOOL=14
+T_BREAK=15
+T_CARD=16
+T_CBRL=17
+T_CBRR=18
+T_CHAR=19
+T_COLON=20
+T_COMMA=21
+T_COMMENT=22
+T_CONC=23
+T_CONSTS=24
+T_CONT=25
+T_CTRL=26
+T_DCONC=27
+T_DERIV=28
+T_DIFF=29
+T_DIGIT=30
+T_DINTER=31
+T_DIV=32
+T_DO=33
+T_DOM=34
+T_DOMRESBY=35
+T_DOMRESTO=36
+T_DUNION=37
+T_ELEMS=38
+T_ELSE=39
+T_END=40
+T_EQUAL=41
+T_EXISTS=42
+T_FALSE=43
+T_FLOAT=44
+T_FLOATNUMBER=45
+T_FOLDLR=46
+T_FOLDRL=47
+T_FORALL=48
+T_GREATER=49
+T_GREATEREQUAL=50
+T_HEAD=51
+T_IDENTIFIER=52
+T_IDIV=53
+T_IF=54
+T_IMPLIES=55
+T_IN=56
+T_INDS=57
+T_INFTY=58
+T_INT=59
+T_INTER=60
+T_INTNUMBER=61
+T_KILL=62
+T_LEN=63
+T_LESS=64
+T_LESSEQUAL=65
+T_LETTER=66
+T_LIST=67
+T_LPAREN=68
+T_LSQPAREN=69
+T_MAP=70
+T_MAPS=71
+T_MERGE=72
+T_METHODS=73
+T_MINUS=74
+T_MOD=75
+T_MUNION=76
+T_NEW=77
+T_NIL=78
+T_NONDET=79
+T_NOT=80
+T_NOTEQUAL=81
+T_OBS=82
+T_OD=83
+T_OF=84
+T_OR=85
+T_POINT=86
+T_POW=87
+T_PRIMED=88
+T_PRIO=89
+T_PROD=90
+T_QUANTITY=91
+T_RANGETO=92
+T_REQUIRES=93
+T_RNG=94
+T_RNGRESBY=95
+T_RNGRESTO=96
+T_RPAREN=97
+T_RSQPAREN=98
+T_SELF=99
+T_SEMICOLON=100
+T_SEQMOD_MAPOVERRIDE=101
+T_SET=102
+T_SKIP=103
+T_STATIC=104
+T_STRINGLITERAL=105
+T_SUBSET=106
+T_SUM=107
+T_SYSTEM=108
+T_TAIL=109
+T_THEN=110
+T_TO=111
+T_TRUE=112
+T_TYPES=113
+T_UNION=114
+T_VAR=115
+T_WITH=116
+T_WS=117
+'&'=118
+'('=68
+')'=97
+'-'=74
+'::'=119
+']|'=120
+'as'=121
+'begin'=122
+'dec'=123
+'inc'=124
+'qval'=125
+'steady'=126
+'|['=127
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ForallQuantifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ForallQuantifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ForallQuantifier.java	(revision 2)
@@ -0,0 +1,55 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+public final class ForallQuantifier extends Quantifier
+{
+	public ForallQuantifier(Expression child, int line, int pos)
+	{
+		super (ExpressionKind.forall, child, line, pos);
+	}
+
+	public ForallQuantifier(ForallQuantifier toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new ForallQuantifier(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserMessage.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserMessage.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserMessage.java	(revision 2)
@@ -0,0 +1,43 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.parser;
+
+import org.antlr.runtime.Token;
+
+public class ParserMessage extends CompilerMessage
+{
+	public ParserMessage(String aFile, int aLine, int aColumn, String aMessage)
+	{
+		super (aFile, aLine, aColumn, aMessage);
+	}
+
+	public ParserMessage(String aFile, Token aSymbol, String aMessage)
+	{
+		super (aFile, aSymbol, aMessage);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/OoasCompilerHashMap.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/OoasCompilerHashMap.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/OoasCompilerHashMap.java	(revision 2)
@@ -0,0 +1,54 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.utils;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.momut.ooas.utils.exceptions.OoasCompilerRuntimeException;
+
+public class OoasCompilerHashMap<K, V> extends LinkedHashMap<K, V> {
+	private static final long serialVersionUID = 1L;
+
+	public OoasCompilerHashMap() {super ();}
+	public OoasCompilerHashMap(int initialCapacity) {super(initialCapacity);}
+	public OoasCompilerHashMap(int initialCapacity, float loadFactor) {super(initialCapacity, loadFactor);}
+	public OoasCompilerHashMap(int initialCapacity, float loadFactor, boolean accessOrder) {super(initialCapacity, loadFactor, accessOrder);}
+	public OoasCompilerHashMap(Map<K, V> m) {super(m);}
+
+	public void putSafe(K key, V value) {
+		if (value == null)
+			throw new IllegalArgumentException(); // value cannot be null..
+
+		V tmp = super.put(key, value);
+
+		if (tmp != null)
+			throw new OoasCompilerRuntimeException("Dupes in hashmap!");
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/SymbolTable.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/SymbolTable.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/SymbolTable.java	(revision 2)
@@ -0,0 +1,122 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.parser;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map.Entry;
+
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.utils.OoasCompilerHashMap;
+
+public class SymbolTable
+{
+	private OoasCompilerHashMap<String, Identifier> m_symbols;
+
+	public List<Identifier> symbolList() { return new ArrayList<Identifier>(m_symbols.values());}
+
+	public SymbolTable()
+	{
+		m_symbols = new OoasCompilerHashMap<String, Identifier>();
+	}
+
+	public SymbolTable(SymbolTable toCopy)
+	{
+		if (toCopy != null)
+			m_symbols = new OoasCompilerHashMap<String, Identifier>(toCopy.m_symbols);
+		else
+			m_symbols = new OoasCompilerHashMap<String, Identifier>();
+	}
+
+	public boolean Defined(Identifier aValue)
+	{
+		return aValue == m_symbols.get(aValue.tokenText()); // ref comp!
+	}
+
+	public boolean Defined(String aKey)
+	{
+		return m_symbols.containsKey(aKey);
+	}
+
+	public Identifier Get(String aKey)
+	{
+		return m_symbols.get(aKey);
+	}
+
+	public void AddIdentifier(Identifier anIdent)
+	{
+		if (anIdent != null) {
+			final Identifier oldValue = m_symbols.put(anIdent.tokenText(), anIdent);
+			if (oldValue != null)
+				throw new UnsupportedOperationException(
+					String.format("Identifier '%s' already exists", anIdent.tokenText()));
+		}
+	}
+
+	public void AddSymbolTable(SymbolTable otherTable)
+	{
+		for (final Entry<String,Identifier> x: otherTable.m_symbols.entrySet())
+			if ( ! x.getKey().equals("self")) {
+				final Identifier oldValue = m_symbols.put(x.getKey(), x.getValue());
+				if (oldValue != null)
+					throw new UnsupportedOperationException(
+						String.format("Identifier '%s' already exists", x.getKey()));
+			}
+	}
+
+	public void Replace(String aKey, Identifier anIdent)
+	{
+		if (anIdent != null)
+		{
+			m_symbols.remove(aKey);
+			m_symbols.put(anIdent.tokenText(), anIdent);
+		}
+	}
+
+	public void SetSymbolList(List<Identifier> newList)
+	{
+		Collections.sort(newList);
+		m_symbols = new OoasCompilerHashMap<String, Identifier>();
+		for (final Identifier x : newList)
+			AddIdentifier(x);
+	}
+
+	public void Sort()
+	{
+		final List<Identifier> newList = new ArrayList<Identifier>(m_symbols.values());
+		Collections.sort(newList);
+		m_symbols = new OoasCompilerHashMap<String, Identifier>();
+		for (final Identifier x : newList)
+			AddIdentifier(x);
+	}
+
+	public int size() {
+		return m_symbols.size();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/MapConstructor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/MapConstructor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/MapConstructor.java	(revision 2)
@@ -0,0 +1,93 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import java.util.ArrayList;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+///////////////////////////////////////////////
+///  Constructor: Map
+///
+public final class MapConstructor extends TypeConstructionExpression
+{
+	public static final class MapItem
+	{
+		public Expression key;
+		public Expression value;
+		public MapItem(Expression aKey, Expression aValue)
+		{
+			key = aKey;
+			value = aValue;
+		}
+		public MapItem(MapItem toCopy)
+		{
+			key = toCopy.key;
+			value = toCopy.value;
+		}
+	}
+
+	private ArrayList<MapItem> m_items;
+
+	public ArrayList<MapItem> items() { return m_items; }
+
+	public MapConstructor(int line, int pos)
+	{
+		super (ExpressionKind.MapConstr, line, pos);
+		m_items = new ArrayList<MapItem>();
+	}
+
+	public MapConstructor(MapConstructor toCopy)
+	{
+		super (toCopy);
+		m_items = new ArrayList<MapItem>(toCopy.m_items);
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new MapConstructor(this);
+	}
+
+	public void AddItem(Expression mapFrom, Expression mapTo)
+	{
+		MapItem newitem = new MapItem(mapFrom, mapTo);
+		m_items.add(newitem);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetItems(ArrayList<MapItem> newItems)
+	{
+		m_items = newItems;
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooa.g
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooa.g	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooa.g	(revision 2)
@@ -0,0 +1,1242 @@
+/*  
+			ANTLR Grammar for OO-Action Systems
+			 (C) Willibald Krenn, 2009 - 2015
+
+
+  Notes
+  ~~~~~
+  	(*) No recursion
+  	(*) float acutally is fixed-point!
+	(*) Named actions can only be "called" within the do-od block 
+	(*) Methods can be called from within an action and a method.
+	    Attention: Mutual Recursion not supported!
+
+  FixMe
+  ~~~~~
+  	(*) List-Enum: Length Restriction! (Defaults to 500 for now)
+	(*) subseteq missing
+	
+
+			 
+  History
+  ~~~~~~~
+  
+  Changes 1.06 to 1.07
+    ~ move to org.momut naming
+  
+  Changes 1.05 to 1.06
+  	~ make action blocks more capable, add the projection feature already available in the do-od block.
+	- disable support for continuous actions
+  
+  Changes 1.04 to 1.05
+  	~ Fix bug with set constuctor: set with only one element produced wrong AST (inner element wasn't added correctly).
+  
+  Changes 1.03 to 1.04
+        ~ Move to JAVA
+  
+  Changes 1.02 to 1.03
+  	+ option to name objects when they are constructed: new (<class>,"<name>")
+  
+  Changes 1.00 to 1.02
+  	+ cast operator for objects ( ... as <typename> )
+
+  Changes 1.00 to 1.01
+  	+ enum-type with fixed integer values
+  
+  Changes 0.99b to 1.00
+  	+ constant section added (consts a=4; b=4)
+  	+ limits of simple types and lists can be const
+  	+ local vars allowed in methods (... = var... begin...end)
+  	+ prioritized composition on statement level
+  	+ skip in do-od block
+  	+ filter expression in do-od block sequential var statement
+  	+ fold operator
+  	
+  Changes 0.99 to 0.99b
+        - disabled sequential composition of action systems (remains in grammar, though out-commented)
+        
+  Changes 0.98 to 0.99
+        ~ changed QR syntax.
+  
+  Changes 0.97 to 0.98
+  	~ changed syntax for list and set comprehension
+  	  list comprehension:
+  	  '[' expression '|' 'var' id ':' type (';' id ':' type)* ('&' expression)? ']'
+  	  set comprehension
+  	  '{' expression '|' 'var' id ':' type (';' id ':' type)* ('&' expression)? '}'
+  	  
+  	  Usage: defined variables will sweep over value-range. If the latter expression
+  	  (after '&') evaluates to true (hence this expression must return a bool) with
+  	  the current valuation of the defined vars, the values are used to evaluate the
+  	  first expression, which has to return a value of the correct type.
+  	  
+  	  Example:
+  	  type
+  	    myint = int [0..300000];
+  	    mytuple = (myint, myint)
+  	  var
+  	     l_tuple : list of mytuple = [nil];
+  	     l_int : list of myint = [nil];
+  	    ...
+  	      l_int := [l_tuple[x][0] | var x: myint & x < len l_tuple ]
+  	  
+  	  
+  	+ list element access by '[int]' allowed!
+
+
+  Changes 0.96 to 0.97
+  	+ tuple-type initialization now properly supported
+  	+ binary operator precedence handling
+  	+ local variables in named actions
+  	+ support for (<expression>).<reference> and
+  	              (<expression>).<accessExpression>
+  	~ conditional expression: End required.
+  	- remove support for power-operator 
+  	  (may be we need to do calculation backwards)
+
+  Changes 0.95 to 0.96
+  	~ string literals now ".."
+  	~ priming of identifier access only supported at the end of the
+  	  expression
+
+  Changes 0.9 to 0.95
+  	+ composition of action systems in 'system' block
+  	~ Produce C# code
+  	~ Operator Precedence
+  	~ vars in action composition
+  	~ forall/extists now with colon instead of in
+
+
+  Earlier changes  removed.
+			 
+*/
+
+
+grammar ooa;
+
+options {	
+  k = 2;
+  superClass = ooaCustomParser;
+}
+
+
+@lexer::header
+{
+/*
+    Ulysses OO-Action System Parser
+    
+    Copyright Graz University of Technology 2009
+    Copyright AIT Austrian Institute of Technology 2013
+ */
+ package org.momut.ooas.parser;
+}
+
+
+@parser::header
+{
+ /*
+    Ulysses OO-Action System Parser
+
+    Copyright Graz University of Technology 2009
+    Copyright AIT Austrian Institute of Technology 2013
+ */
+ package org.momut.ooas.parser;
+
+ import org.momut.ooas.ast.expressions.*;
+ import org.momut.ooas.ast.statements.*;
+ import org.momut.ooas.ast.identifiers.*;
+ import org.momut.ooas.ast.types.*;
+ import org.momut.ooas.ast.types.FunctionType.FunctionTypeEnum;
+}
+
+ooActionSystems 
+	:	{initializeTopLevelParserState();}
+
+	         (T_CONSTS namedConstList)?
+		
+		 T_TYPES 
+		  	namedTypeList
+		 T_SYSTEM
+			comp=asTypeComposition[null]
+			{fixUpRun(comp);}
+	;
+
+
+
+//
+//  ------------   named consts  ------------ 
+//
+
+namedConstList
+	:	namedConst (T_SEMICOLON namedConst)*
+	;
+	
+namedConst
+	:	aName=T_IDENTIFIER
+		T_EQUAL
+		anExpr=expression
+		{addNamedConst(aName,anExpr);}
+	;
+
+
+//
+//  ------------   named types  ------------ 
+//
+namedTypeList 
+	:	namedType (T_SEMICOLON namedType)*
+	;
+
+namedType 
+	:	aName=T_IDENTIFIER 
+		T_EQUAL 
+		(
+			aType=complexType 	 {createNamedType(aName,aType);}
+		|	anOoaType=ooActionSystem {createNamedType(aName,anOoaType);}
+		)		
+		
+	;
+
+
+asTypeComposition [IdentifierList top]
+	returns [IdentifierList prioList]
+	:  	{prioList = new PrioIdentifierList(top);}
+		asTypeCompositionParallel[prioList]  (T_PRIO asTypeCompositionParallel[prioList] )*
+	;
+
+asTypeCompositionParallel [IdentifierList top]
+	:  	{IdentifierList parList = new NondetIdentifierList(top);}
+		asTypeCompositionSequential[parList] (T_NONDET asTypeCompositionSequential[parList])*
+	;
+
+asTypeCompositionSequential [IdentifierList top]
+	:  	{IdentifierList seqList = new SeqIdentifierList(top);}
+		asTypeCompositionBlockParen[seqList] //(T_SEMICOLON asTypeCompositionBlockParen[seqList])*
+	;
+
+asTypeCompositionBlockParen [IdentifierList top]
+	: T_LPAREN asTypeComposition[top] T_RPAREN
+	| aName=T_IDENTIFIER {addToIdentifierList(top,aName);}
+	;
+	
+
+//
+//  ------------   basic types    ------------ 
+//
+
+complexType 
+	returns [UlyssesType aTypeSymbol]
+	@init{ 
+		aTypeSymbol = null;
+		alandmark = null;
+	}	
+	:	T_LIST  T_LSQPAREN numOfElements=(T_INTNUMBER|T_IDENTIFIER) T_RSQPAREN T_OF  innertype=complexType 
+			{aTypeSymbol = createListType(numOfElements,innertype);}
+
+		// list type with predefined elements (dupes of each element as many as needed) FIXME: Length Restriction!
+	|	T_LSQPAREN alistelem=T_IDENTIFIER {aTypeSymbol = createListEnumType(alistelem);} 
+			(T_COMMA otherlistelem=T_IDENTIFIER {addToListEnumType(aTypeSymbol,otherlistelem);})* T_RSQPAREN // set of identifiers..
+
+		// maps do not really need a length restriction, as simpleType already is restricted..
+	|	T_MAP   (T_LSQPAREN numOfElements=(T_INTNUMBER|T_IDENTIFIER) T_RSQPAREN)? mapfromtype=simpleType T_TO maptotype=complexType 
+			{aTypeSymbol = createMapType(numOfElements,mapfromtype,maptotype);}
+		// quantity space
+	|	T_QUANTITY T_OF	T_LSQPAREN (alandmark=T_IDENTIFIER| alandmark=T_MINUS T_INFTY) {aTypeSymbol = createQrType(alandmark);} 
+			(T_COMMA (otherlandmark=T_IDENTIFIER|otherlandmark=T_INFTY) {addToQrType(aTypeSymbol,otherlandmark);})* T_RSQPAREN 
+		// tuple
+	|	 T_LPAREN aType=complexType {aTypeSymbol = createTupleType(aType);} 
+			(T_COMMA anotherType=complexType {addToTupleType(aTypeSymbol,anotherType);})*  T_RPAREN
+		
+		// some simple type (note that this includes identifiers, which may be complex object types..)	
+	|	r=simpleType {aTypeSymbol = r;}
+	;
+	finally
+		{fixupComplexType(aTypeSymbol);}
+
+	
+simpleType 
+	returns [UlyssesType aTypeSymbol]
+	@init{ 
+		aTypeSymbol = null;
+	}
+	:	T_BOOL  {aTypeSymbol = createBoolType();}
+	
+		// ints plus subtypes
+	|	T_INT T_LSQPAREN rangeLow=(T_INTNUMBER|T_INFTY|T_IDENTIFIER) T_RANGETO rangeHigh=(T_INTNUMBER|T_INFTY|T_IDENTIFIER) T_RSQPAREN  
+			{aTypeSymbol = createIntType(rangeLow,rangeHigh);}
+			
+		// floats plus subtypes
+	|	T_FLOAT  T_LSQPAREN rangeLow=(T_FLOATNUMBER|T_INFTY|T_IDENTIFIER) T_RANGETO rangeHigh=(T_FLOATNUMBER|T_INFTY|T_IDENTIFIER) T_RSQPAREN 
+			{aTypeSymbol = createFloatType(rangeLow,rangeHigh);}
+			
+		// char
+	|	T_CHAR {aTypeSymbol = createCharType();}
+		
+		// simple type, domain restricted to the values within the given set. (operators supported: equal, not equal) - may be casted to integer if
+		// explicit int values are given
+	|	T_CBRL aRangeValue=T_IDENTIFIER (T_EQUAL optVal=T_INTNUMBER)? {aTypeSymbol = createEnumType(aRangeValue, optVal);} 
+			(T_COMMA otherRangeValue=T_IDENTIFIER (T_EQUAL otherOptVal=T_INTNUMBER)? {addToEnumType(aTypeSymbol,otherRangeValue,otherOptVal); otherOptVal=null;})* T_CBRR
+			
+	|	aType=T_IDENTIFIER {aTypeSymbol = getNamedType(aType);} // alias could be simple type - otherwise, it's a complex type!!
+	;
+	finally
+		{fixupSimpleType(aTypeSymbol);}
+
+
+
+
+
+
+ooActionSystem 
+	returns [OoActionSystemType aTypeSymbol]
+	@init{ 
+		boolean autoCons = false; 
+		aTypeSymbol = null;
+		refinesSystemName = null;
+	}
+	:      (T_AUTOCONS {autoCons = true;})? 
+		T_SYSTEM (T_LPAREN refinesSystemName=T_IDENTIFIER T_RPAREN)?		 
+		{aTypeSymbol = createOoaType(refinesSystemName,autoCons);}
+		'|['
+			(T_VAR attrList)?
+			(T_METHODS methodList)?
+			(T_ACTIONS namedActionList)?
+			(T_DO (bl=actionBlock[null] {addActionBlock(aTypeSymbol,bl);})? T_OD)?
+		']|'
+	;
+	finally
+		{fixupOoaType(aTypeSymbol);}
+	
+
+
+	
+//
+//  ------------   variables (objects and simple types)    ------------ 
+//
+attrList
+	:	{BeginParsingAttributes();}
+	 	attr (T_SEMICOLON attr)*
+	;
+	finally {
+		EndParsingAttributes();
+	}
+
+attr
+	@init{ 
+		boolean isStatic = false; 
+		boolean isCtr = false;
+		boolean isObs = false;				
+		
+	}
+	: 	(T_STATIC {isStatic = true;})? (T_OBS {isObs = true;} | T_CTRL {isCtr = true;})? 
+		varname=T_IDENTIFIER  T_COLON aType=complexType (T_EQUAL anExpr=expression)?
+		{createAttribute(varname, isStatic, isObs, isCtr, aType, anExpr);}
+	;
+
+//
+//  ------------   methods    ------------ 
+//	
+methodList 
+	: 	method (T_SEMICOLON method)*
+	;
+
+method	
+	@init {	
+		FunctionIdentifier newMethod = null;
+	}
+	:	mname=T_IDENTIFIER  {newMethod = createMethodSymbol(mname);}
+		(T_LPAREN methodParameterList[newMethod]  T_RPAREN)? 
+		(T_COLON rt=complexType {setMethodReturnType(newMethod,rt);})?	// actions can not have a return type!!					
+		 T_EQUAL 
+		 ( T_VAR localActionVars[newMethod] 'begin')?                                   // var here always means vars of the method. This disables the var of the actionBody!
+		                                                                                                                 // If that is wanted, the user needs to use parens... Alternatively we could force the "begin" which feels cumbersome.
+		                                                                                                                 // Using a semantic predicate here triggers a bug in the codegen it seems..
+		statements=actionBody[null] {addMethodBody(newMethod,statements);} 
+		T_END		
+	;
+	finally
+		{popResolveStack(newMethod);}
+
+methodParameterList[FunctionIdentifier newMethod]
+	:	 paramName=T_IDENTIFIER T_COLON atype=complexType {addMethodParameter(newMethod,paramName,atype);}
+			(T_COMMA otherparam=T_IDENTIFIER T_COLON othertype=complexType
+			{addMethodParameter(newMethod,otherparam,othertype);} )*		
+	;
+
+
+//
+//  ------------   named, anonymous actions    ------------ 
+//	
+
+namedActionList 
+	:	namedAction (T_SEMICOLON namedAction)*
+	;
+
+namedAction 
+	@init {
+		FunctionTypeEnum actionType;
+		FunctionIdentifier newAction = null;
+	}
+	:	//_CONT cactionname=T_IDENTIFIER  {newAction = createNamedContinuousAction(cactionname, FunctionTypeEnum.Continuous);}
+		//T_LPAREN methodParameterList[newAction]  T_RPAREN)? 
+		//_EQUAL	constraints=continuousActionBody {addContinuousActionBody(newAction,constraints);}
+		
+//	|	
+		{actionType = FunctionTypeEnum.Internal;}
+		(T_CTRL {actionType = FunctionTypeEnum.Controllable;}| T_OBS {actionType = FunctionTypeEnum.Observable;}| )
+		 actionname=T_IDENTIFIER  {newAction = createNamedAction(actionname,actionType);}
+		(T_LPAREN methodParameterList[newAction]  T_RPAREN)? 
+		T_EQUAL	
+		(T_VAR localActionVars[newAction] )? 
+		body=discreteActionBody  
+		{addActionBody(newAction,body);}
+	;	
+	finally
+		{popResolveStack(newAction);}
+
+
+localActionVars[FunctionIdentifier newMethod]
+	:	// a named, discrete action may have local variables.
+		id1=T_IDENTIFIER T_COLON t1=complexType  {addLocalVariableToNamedAction(newMethod,id1,t1);}
+		 (T_SEMICOLON id2=T_IDENTIFIER T_COLON t2=complexType
+		 {addLocalVariableToNamedAction(newMethod,id2,t2);} )*
+	;	
+
+
+
+anonymousAction 
+	returns [GuardedCommand result]
+	:	//a=continuousActionBody {result = a;}
+	//|	
+		b=discreteActionBody {result = b;}
+	;
+
+continuousActionBody 
+	returns [GuardedCommand result]
+	@init {
+		result = null;
+	}
+	:	T_CONT T_REQUIRES expr=expression T_COLON
+			bdy=qualConstraintList	
+		T_END
+		{result = createGuardedCommandStatement(expr,bdy,true);}
+	;
+	
+qualConstraintList
+	returns [Block result]
+	@init{
+		result = createSeqBlock(null);
+		pushBlockToResolveStack(result);
+	}
+	:	stmt=qualConstraint {addToBlockList(result,stmt);}
+		(T_COMMA ostmt=qualConstraint {addToBlockList(result,ostmt);})*
+	;
+	finally
+		{popBlockFromResolveStack(result);}
+
+
+
+qualConstraint
+	returns [QualitativeConstraintStatement result]
+	:	id1=T_IDENTIFIER T_EQUAL 
+		(	T_DERIV derivid=T_IDENTIFIER 
+			{result = createQualDerivConstraintStatement(id1,derivid);}
+		
+	        |	
+	        	id2=T_IDENTIFIER 
+	        	( 
+	        		(	op=T_SUM
+	        		|	op=T_DIFF
+	        		|	op=T_PROD
+	        		) 
+	        		id3=T_IDENTIFIER
+	        		{result = createQualArithConstraintStatement(id1,id2,id3,op);}
+	        	|
+	        		{result = createQualEqualConstraintStatement(id1,id2);}
+	        	)
+	        )
+	;
+
+
+	
+
+discreteActionBody 
+	returns [GuardedCommand result]
+	@init{
+		result = null;
+	}
+	:
+		{result = createGuardedCommandStatement(); pushBlockToResolveStack(result);}	
+		T_REQUIRES expr=expression T_COLON
+			bdy=actionBody[null]
+		T_END
+		{addExprAndBlockToGuardedCommand(result,expr,bdy);}
+	;
+	finally
+		{popBlockFromResolveStack(result);}
+	
+	
+//
+//  ------------   do-od block    ------------ 
+//	
+
+actionBlock [Block top]
+	returns [Block prioList]
+	:  	{prioList = createPrioBlock(top);  pushBlockToResolveStack(prioList);}
+		 actionBlockParallel[prioList] (T_PRIO actionBlockParallel[prioList])* 
+	;	
+	finally
+		{popBlockFromResolveStack(prioList);}
+	
+actionBlockParallel [Block top]
+	@init 	{	Block parList = createNondetBlock(top); 
+		 	pushBlockToResolveStack(parList);
+		}
+	:	actionBlockSequential[parList] (T_NONDET actionBlockSequential[parList])*
+	;	
+	finally
+		{popBlockFromResolveStack(parList);}
+// atomic sequential composition of actions	
+actionBlockSequential [Block top]
+	@init  	{
+			Block seqList = createSeqBlock(top);
+			pushBlockToResolveStack(seqList);
+		}
+	:	 (T_VAR syms=blockvarlist[seqList] ('&' sexpr=expression {addSeqBlockExpression(seqList,sexpr);} )? T_COLON )? 
+		 actionBlockParen[seqList] (T_SEMICOLON actionBlockParen[seqList])*
+	;	
+	finally
+		{popBlockFromResolveStack(seqList);}
+
+actionBlockParen [Block top]
+	:	T_LPAREN actionBlock[top] T_RPAREN
+	|	anonymousOrNamedAction[top]
+	;	
+
+anonymousOrNamedAction [Block top]
+	:	gcmd=anonymousAction {addToBlockList(top,gcmd);}
+	|	aname=T_IDENTIFIER 
+	         (T_LPAREN  m_params=methodCallParams T_RPAREN)? 
+	         (amap=(T_FOLDLR|T_FOLDRL) '(' amapexpr=expression ')')?
+		{addNamedActionCallToBlockList(top,aname,m_params,amap,amapexpr);}
+	|	T_SKIP	{addSkipStatementToBlockList(top);}
+	;
+
+
+blockvarlist [Block seqList]
+	:	blockvar[seqList]  (T_SEMICOLON blockvar[seqList] )*
+	;
+
+blockvar [Block seqList]
+	: 	varname=T_IDENTIFIER  T_COLON aType=complexType 
+		{addBlockVariable(seqList,varname,aType);}
+	;
+
+		
+
+//
+//  ------------  action body  of non-continuous actions ------------ 
+//
+	
+actionBody[Block top]
+	returns [Block result]
+	:	{result = createPrioBlock(top); pushBlockToResolveStack(result);}
+		actionBodyParallel[result] (T_PRIO actionBodyParallel[result])? 
+	;  
+	finally
+		{popBlockFromResolveStack(result);}
+	
+actionBodyParallel[Block top]
+	returns [Block result]
+	:	{result = createNondetBlock(top); pushBlockToResolveStack(result);}
+		actionBodySequential[result]
+		(T_NONDET olst=actionBodySequential[result])*
+	;	
+	finally
+		{popBlockFromResolveStack(result);}
+
+	
+// seq binds stronger than nondet, i.e. a;b;cd;e is read as (a;b;c)[](d;e)	
+actionBodySequential[Block top]
+	returns [SeqBlock result]
+	:	{result = createSeqBlock(top); pushBlockToResolveStack(result);}
+		(T_VAR syms=blockvarlist[result] ('&' sexpr=expression {addSeqBlockExpression(result,sexpr);} )? T_COLON )?
+		 actionBodyParen[result] (T_SEMICOLON actionBodyParen[result])*
+	;	
+	finally
+		{popBlockFromResolveStack(result);}
+	
+	
+actionBodyParen [SeqBlock top]
+	:	 T_LPAREN actionBody[top]  T_RPAREN
+	|	stmt=statement
+		{addToStatementList(top,stmt);}
+	;	
+
+
+statement
+	returns [Statement result]
+	@init {
+		boolean popFromResolveStack = false;
+		result = null;
+	}
+	:	T_ABORT {result = createAbortStatement();}
+	|	T_SKIP	{result = createSkipStatement();}
+	|	T_BREAK {result = createBreakStatement();}
+	|	T_KILL T_LPAREN aname=(T_IDENTIFIER | T_SELF) T_RPAREN	{result = createKillStatement(aname);}
+	| 	gc=discreteActionBody {result = gc;}
+	|	aqname=reference 
+			   ( 	    // single assignment			   	    
+			   	    T_ASSIGNMENT  aexp=expression  {result = createSingleAssignmentStatement(aqname,aexp);}
+			           (T_WITH ndexp=expression {addConstraintToAssignment(result,ndexp);})? // nondet assignment
+			           
+			           // multi assignment
+				|  {result = createMultipleAssignmentStatementLHS(aqname);}
+				  (T_COMMA malhs=reference  {addMultipleAssignmentStatementLHS(result,malhs);})+ 
+				   T_ASSIGNMENT 
+				   {pushAssignmentOnResolveStack(result); popFromResolveStack = true;} 
+				   mexp=expression
+				   {addMutlipleAssignmentStatementRHS(result,mexp);}
+				   (T_COMMA mexp2=expression {addMutlipleAssignmentStatementRHS(result,mexp2);})+
+				   (T_WITH ndex2=expression {addConstraintToAssignment(result,ndex2);})? // nondet assignment
+				   
+				   // just a call of a method.
+				| {result = createCallStatement(aqname);}
+		     	    )
+	;	
+	finally {
+	       if (popFromResolveStack == true)
+	            popAssignmentOffResolveStack(result);
+	}
+
+//
+//  ------------   expression    ------------ 
+//
+expression
+	returns [Expression expr]
+	@init{
+		ArrayList<BinaryOperator> operators = new ArrayList<BinaryOperator>();
+		ArrayList<Expression> expressions = new ArrayList<Expression>();		
+	}
+	:	left=atomExpression	
+		{expressions.add(left);}
+		( op=binoperator
+		  right=atomExpression
+		  {
+		  	if (op != null) {
+		  		operators.add(op);
+		  		expressions.add(right);
+		  	}
+		  }
+		)*
+		{expr = createPrecedenceTree(expressions,operators);}
+	;
+
+
+binoperator	
+	returns [BinaryOperator binop]
+	:	T_BIIMPLIES
+		{binop = createBinaryOperator(ExpressionKind.biimplies);}
+	|	T_GREATER	
+		{binop = createBinaryOperator(ExpressionKind.greater);}
+	|	T_GREATEREQUAL
+		{binop = createBinaryOperator(ExpressionKind.greaterequal);}
+	|	T_LESS	
+		{binop = createBinaryOperator(ExpressionKind.less);}
+	|	T_LESSEQUAL
+		{binop = createBinaryOperator(ExpressionKind.lessequal);}
+	|	T_EQUAL			// bool, numeric, char, lists, maps
+		{binop = createBinaryOperator(ExpressionKind.equal);}
+	|	T_NOTEQUAL		// bool, numeric, char, lists, maps
+		{binop = createBinaryOperator(ExpressionKind.notequal);}
+	|	T_IMPLIES
+		{binop = createBinaryOperator(ExpressionKind.implies);}
+	|	T_MINUS	
+		{binop = createBinaryOperator(ExpressionKind.minus);}
+	|	T_SUM	
+		{binop = createBinaryOperator(ExpressionKind.sum);}
+	|	T_IN T_SET?	// A * list of A -> bool
+		{binop = createBinaryOperator(ExpressionKind.elemin);}
+	|	T_NOT T_IN T_SET?	// A * list of A -> bool
+		{binop = createBinaryOperator(ExpressionKind.notelemin);}
+	|	T_SUBSET	// list of A * list of A -> bool (does not respect dupes)
+		{binop = createBinaryOperator(ExpressionKind.subset);}
+	|	T_OR
+		{binop = createBinaryOperator(ExpressionKind.or);}
+	|	T_DIV
+		{binop = createBinaryOperator(ExpressionKind.div);}
+	|	T_PROD	
+		{binop = createBinaryOperator(ExpressionKind.prod);}
+	|	T_IDIV	
+		{binop = createBinaryOperator(ExpressionKind.idiv);}
+	|	T_MOD	
+		{binop = createBinaryOperator(ExpressionKind.mod);}
+	|	T_UNION		// list of A * list of A -> list of A (does not respect dupes)
+		{binop = createBinaryOperator(ExpressionKind.union);}
+	|	T_DIFF		// list of A * list of A -> list of A (does not respect dupes)
+		{binop = createBinaryOperator(ExpressionKind.diff);}
+	|	T_INTER		// list of A * list of A -> list of A (does not respect dupes)
+		{binop = createBinaryOperator(ExpressionKind.inter);}
+	|	T_AND  
+		{binop = createBinaryOperator(ExpressionKind.and);}				
+	|	T_POW  
+		{binop = createBinaryOperator(ExpressionKind.pow);}				
+	|	T_CONC	// list of A * list of A -> list of A
+		{binop = createBinaryOperator(ExpressionKind.conc);}			
+	|	T_DOMRESBY	// list of A * map A to B -> map A to B
+		{binop = createBinaryOperator(ExpressionKind.domresby);}
+	|	T_DOMRESTO	// list of A * map A to B -> map A to B
+		{binop = createBinaryOperator(ExpressionKind.domresto);}
+	|	T_RNGRESBY	// map A to B * list of B -> map A to B
+		{binop = createBinaryOperator(ExpressionKind.rngresby);}
+	|	T_RNGRESTO	// map A to B * list of B -> map A to B
+		{binop = createBinaryOperator(ExpressionKind.rngresto);}
+	|	T_MUNION	// map A to B * map A to B -> map A to B
+		{binop = createBinaryOperator(ExpressionKind.munion);}
+	|	T_SEQMOD_MAPOVERRIDE	// list of A * map int to A -> list of A or
+					// map A to B * map A to B -> map A to B
+		{binop = createBinaryOperator(ExpressionKind.seqmod_mapoverride);}
+	;
+
+	
+atomExpression
+	returns [Expression expr]
+	@init {
+		expr = null;
+	}
+	:	(unexpr=op_un? (   
+		     e=identifierExpression
+		  |  e=qvalExpression
+		  |  e=constant
+		  |  e=initializedComplexType 
+		  |  e=quantifierExpression
+		  |  T_LPAREN e=expression T_RPAREN		   
+		     ( 
+			  (T_POINT 
+			    idn=T_IDENTIFIER 
+			    {e = addIdentifierAccessExpression(e,idn);})+
+			    (res=accessExpression[e] {e=res;})?
+			| 
+			  e=accessExpression[e]
+		      )?
+		) ('as' cid=T_IDENTIFIER {e=addCastExpression(e,cid);})?
+		{expr = addUnaryExpression(unexpr,e);}
+		)
+		|  ie=T_IF ce=expression T_THEN te=expression T_ELSE ee=expression T_END
+		{expr = createConditionalExpression(ce,te,ee,ie);}
+	;	
+	
+
+quantifierExpression
+	returns [Quantifier result]
+	@init {
+		result = null;
+	}
+	: 	t=(T_FORALL | T_EXISTS)
+		{result = createQuantifierExpression(t);}
+		(id=T_IDENTIFIER (T_COLON id_type=simpleType {addBoundVarToQuantifierExpression(result,id,id_type);}) 
+		  (T_COMMA id2=T_IDENTIFIER (T_COLON id_type2=simpleType){addBoundVarToQuantifierExpression(result,id2,id_type2);})*) 
+		T_COLON T_LPAREN e=expression T_RPAREN
+		{addExpressionToQuantifier(result,e);}
+	;
+	finally
+		{removeBoundVarsFromResolveStack(result);}
+
+constant
+	returns [LeafExpression result]
+	@init {
+		result = null;
+	}
+	: 	T_TRUE  {result = createBoolConstant(true);}
+	|	T_FALSE {result = createBoolConstant(false);}
+	|	T_NIL 	{result = createNullPointerConstant();}
+	|	T_SELF  {result = createSelfPointer();}
+	| 	t_fl=T_FLOATNUMBER {result = createFloatConstant(t_fl);}
+	|	t_in=T_INTNUMBER {result = createIntConstant(t_in);}
+	|	t_l=T_STRINGLITERAL {result = createStringConstant(t_l);}
+	;
+	
+initializedComplexType
+	returns [Expression result]
+	@init {
+		result = null;
+	}
+	:	res=initializedListType {result = res;}
+	|	res=initializedSetType {result = res;}
+	| 	T_NEW T_LPAREN anid=T_IDENTIFIER 
+			(
+				T_COMMA  aname=T_STRINGLITERAL T_RPAREN {result = createNamedObject(anid, aname);}
+			|	T_RPAREN {result = createObject(anid);}	// constructor call..
+			)
+	;
+	
+initializedListType
+	returns [ListConstructor result]
+	@init {
+		result = createInitializedList();
+		pushListVarsOnResolveStack(result); // need this here for list comprehension
+	}
+	:	T_LSQPAREN e=expression {addListElement(result,e);} ( 
+			(T_COMMA e2=expression {addListElement(result,e2);})+ 
+		| 	listComprehension[result]
+		)? T_RSQPAREN  
+	;		
+	finally
+		{popListVarsFromResolveStack(result);}
+
+listComprehension [ListConstructor result]
+	@init{	
+		result.SetHasComprehension(true);
+	}
+	:
+		T_BAR T_VAR
+		id=T_IDENTIFIER  T_COLON t1=complexType {addListComprVar(result,id,t1);} 
+			(T_SEMICOLON id2=T_IDENTIFIER  t2=complexType {addListComprVar(result,id2,t2);})* 
+		('&'
+		e=expression {addListComprExpr(result,e);})?
+	;
+	
+initializedSetType
+	returns[Expression result]
+	@init {
+		result = null;
+	}
+	:	T_CBRL T_MAPS T_CBRR {result = createEmptyMap();}  // empty map
+	|	res=initializedSet {result = res;}
+	;	
+	
+initializedSet
+	returns [Expression result]
+	@init {
+		SetConstructor theset = createSet(); 
+		pushSetVarsOnResolveStack(theset); // need this here for set comprehension
+		result = theset;
+	}
+	:	T_CBRL e1=expression 
+	        (    			// set constructor; empty set: {nil}
+			{addToSet(result,e1);}
+			(T_COMMA e2=expression {addToSet(result,e2);})*			  // set constructor for sets > 1 elem
+		| 	m=map[result, e1] {result = m;}  // we have a set in the resolution stack, but this should be fine (no syms)
+		|	{addToSet(result,e1);} setComprehension[(SetConstructor)result]   // set comprehension
+		) T_CBRR 
+	;	
+	finally
+		{popSetVarsFromResolveStack(theset);}
+	
+map[Expression _map, Expression e1]	
+	returns [Expression result]
+	@init {
+		result = null;
+	}
+	:	am=T_MAPS e2=expression  {result = createMap(e1,e2,am);}   (T_COMMA e3=expression T_MAPS e4=expression {addToMap(result,e3,e4);})*
+	;
+
+setComprehension[SetConstructor _set]
+	@init {
+		_set.SetHasComprehension(true);
+	}
+	:	T_BAR T_VAR id1=T_IDENTIFIER  T_COLON t1=complexType 
+		{ addSetComprVar(_set, id1, t1); }
+		(T_SEMICOLON id2=T_IDENTIFIER T_COLON t2=complexType
+		 { addSetComprVar(_set, id2, t2); })*  
+		('&'
+		epx=expression
+		{ addSetComprExpr(_set,epx); })?
+	;
+
+
+qvalExpression 
+	returns [QValConstructor result]
+	@init {
+		boolean minus = false;
+		result = null;		
+	}
+	:	// constructor for qualitative values
+		aval='qval' T_LPAREN 
+		{result = createQualitativeValue(aval);}
+		(
+			T_NIL
+			{setQualitativeValueDontCare(result);}
+		| 		
+			(	expr=qualifiedIdentifier
+			 	{setQualitativeValueLandmark(result,expr);}
+			|
+				('-' {minus = true;})? T_INFTY
+				{setQualitativeValueInfinity(result,minus);}
+			) 
+			(T_RANGETO 
+			(	expr2=qualifiedIdentifier
+				{setQualitativeValueRange(result,expr2);}
+			| 
+				T_INFTY
+				{setQualitativeValueRangeInfinity(result,false);}
+			) )?  
+		)
+		T_COMMA 
+		(
+			T_NIL
+			{setQualitativeDerivDontCare(result);}
+		|
+			(	'steady'
+				{setQualitativeDerivSteady(result);}
+			|	'inc'
+				{setQualitativeDerivInc(result);}
+			|	'dec'
+				{setQualitativeDerivDec(result);}
+			) 		
+		)
+		T_RPAREN  
+	;
+
+
+identifierExpression
+	returns [Expression result]
+	:  	// if next token is a tuple-type then create an initialized tuple!
+		{isTuple(input.LT(1).getText())}? 		
+		aName=T_IDENTIFIER T_LPAREN m_params=methodCallParams T_RPAREN
+		{result = createInitializedTuple(aName,m_params);}
+	| 	// is some sort of reference
+		res=reference
+	  	{result = res;}	
+	;
+
+
+reference 
+	returns [Expression  result]
+	@init {
+		result = null;
+		init = null;
+	}
+	:	{!isTuple(input.LT(1).getText())}? // check that the next token is not a reference to a tuple-type
+		aName=qualifiedIdentifier {result = aName;}		
+		(	output=accessExpression[result] {result = output;}
+			// call expression
+		|	// variable access or method call that takes no params? (do we allow for that? - answer: no!)
+		)
+		( 	pr=T_PRIMED {result = setIdentifierExpressionPrimed(result,pr);} 
+		 |	
+		 	('::' T_LPAREN init=expression T_RPAREN)? afold=(T_FOLDLR|T_FOLDRL) T_LPAREN anexpr=expression T_RPAREN 
+		 	{result = createFoldExpression(result,afold,init,anexpr);}
+		)?
+	;
+
+accessExpression[Expression subexpr]
+	returns [Expression result]
+	@init{
+		UnaryOperator newExpr = null;
+		result = subexpr;
+	}
+	:	
+    		(	tcall=T_LSQPAREN ac=expression T_RSQPAREN 			// access tuples, maps 
+    			{ result = createTupleMapAccessExpression(result,ac,tcall); } 
+		|     	bcall=T_LPAREN m_params=methodCallParams T_RPAREN // access method
+			{ result = createMethodAccessExpression(result,m_params,bcall); }
+		)+
+		(	// a[1].c.e()...
+			(T_POINT 
+			idn=T_IDENTIFIER 
+			{result = addIdentifierAccessExpression(result,idn);})+
+			(res=accessExpression[result] {result=res;})?
+		)?	
+	;
+	
+qualifiedIdentifier
+	returns [Expression top]
+	@init {
+		IdentifierExpression selfexpr = null;
+		top = null;
+	}
+	:
+		(self=T_SELF T_POINT		{selfexpr = createSelfIdentifierExpression(self);})? 
+		idb=T_IDENTIFIER 		{top = createIdentifierAccessExpression(selfexpr,idb);}
+		(T_POINT idd=T_IDENTIFIER 	{top = addIdentifierAccessExpression(top,idd);})* 
+	;
+	
+
+methodCallParams
+	returns [ArrayList<Expression> result]
+	@init {
+		result = new ArrayList<Expression>();
+	}
+	:	(expa=expression {result.add(expa);} (T_COMMA expb=expression {result.add(expb);})*)?
+	;
+
+
+
+//
+//  ------------  unary  Operators    ------------ 
+//
+	
+	
+op_un
+	returns [UnaryOperator expr]
+	@init {
+		expr = null;
+	}
+	:	r=op_un_set_list {expr = r;}
+	|	r2=op_un_map 	{expr = r2;}
+	|	T_MINUS 	{expr = createUnaryOperator(ExpressionKind.unminus);}
+	|	T_NOT		{expr = createUnaryOperator(ExpressionKind.not);}
+	|	T_ABS		{expr = createUnaryOperator(ExpressionKind.abs);}
+	;	
+
+
+op_un_set_list
+	returns [UnaryOperator expr]
+	@init {
+		expr = null;
+	}
+	:	T_CARD		// list of A -> int (does not respect dupes, i.e. dupes do not count)
+		{expr = createUnaryOperator(ExpressionKind.card);}
+	|	T_DCONC		// list of list of A -> list of A
+		{expr = createUnaryOperator(ExpressionKind.dconc);}
+	|	T_DINTER	// list of list of A -> list of A (intersection, does not respect dupes)
+		{expr = createUnaryOperator(ExpressionKind.dinter);}
+	|	T_DUNION	// list of list of A -> list of A (union, does not respect dupes)
+		{expr = createUnaryOperator(ExpressionKind.dunion);}
+	|	T_ELEMS		// list of A -> list of A (does not respect dupes)
+		{expr = createUnaryOperator(ExpressionKind.elems);}
+	|	T_HEAD		// list of A -> A
+		{expr = createUnaryOperator(ExpressionKind.head);}
+	|	T_INDS		// list of A -> list of int
+		{expr = createUnaryOperator(ExpressionKind.inds);}
+	|	T_LEN		// list of A -> int (dupes count)
+		{expr = createUnaryOperator(ExpressionKind.len);}
+	|	T_TAIL		// list of A -> list of A	
+		{expr = createUnaryOperator(ExpressionKind.tail);}
+	;
+
+
+op_un_map
+	returns [UnaryOperator expr]
+	@init {
+		expr = null;
+	}
+	:	T_DOM		// map A to B -> list of A
+		{expr = createUnaryOperator(ExpressionKind.dom);}
+	|	T_RNG		// map A to B -> list of B
+		{expr = createUnaryOperator(ExpressionKind.range);}
+	|	T_MERGE		// list of map A to B -> map A to B
+		{expr = createUnaryOperator(ExpressionKind.merge);}
+	;
+
+
+
+
+
+
+//
+//  ==============   LEXER   =================
+//
+T_WS  	: (' '|'\r'|'\t'|'\u000C'|'\n') {$channel=HIDDEN;}
+    	;
+    	
+T_COMMENT
+    	: '/*' .* '*/' {$channel=HIDDEN;}
+    	;
+    	
+LINE_COMMENT
+    	: '#' ~('\n'|'\r')* '\r'? '\n' {$channel=HIDDEN;}
+    	;
+
+T_PRIMED
+	:	'\'';
+
+T_STRINGLITERAL
+	:	'"' 
+		(
+     			( '"' '"' )=>  '"' 
+      		|  	~'"'
+  		)*
+ 		'"'
+	;
+
+
+T_ABORT	:	'abort';
+T_ACTIONS
+	:	'actions';
+T_ASSIGNMENT
+	:	':=';
+T_AUTOCONS:	'autocons';
+T_BAR	:	'|';
+T_BOOL	:	'bool';
+T_CBRL	:	'{';
+T_CBRR	:	'}';
+T_COLON	:	':';
+T_COMMA	:	',';
+T_CONT	:	'qual';
+T_CHAR	:	'char';
+T_CTRL 	:	'ctr';
+T_SYSTEM
+	:	'system';
+T_DO	:	'do';
+T_ELSE	:	'else';
+T_END	:	'end';
+T_EQUAL	:	'=';
+T_EXISTS:	'exists';
+T_FLOAT	:	'float';
+T_FORALL:	'forall';
+T_FALSE :	'false';	
+T_IF	:	'if';
+T_IN	:	'in';
+T_INT	:	'int';
+T_KILL	:	'kill';
+T_LIST	:	'list';
+T_LPAREN:	'(';
+T_LSQPAREN:	'[';
+T_MAP	:	'map';
+T_MAPS	:	'->';
+T_METHODS
+	:	'methods';
+T_NEW	:	'new';
+T_NIL	:	'nil';
+T_NONDET:	'[]';
+T_OBS	:	'obs';
+T_OD	:	'od';
+T_OF	:	'of';
+T_PRIO	:	'//';
+T_REQUIRES
+	:	'requires';
+T_RPAREN:	')';
+T_RSQPAREN:	']';
+T_QUANTITY
+	:	'qspace';
+T_SELF	:	'self';
+T_SET 	:	'set';
+T_SEMICOLON
+	:	';';
+T_STATIC:	'static';	
+T_SKIP	:	'skip';
+T_BREAK	:	'break';
+T_THEN	:	'then';
+T_TRUE  :	'true';
+T_TO	:	'to';
+T_TYPES	:	'types';
+T_VAR	:	'var';
+T_WITH	:	'with';     // for nondet assignment
+
+
+//T_ACTION:	'action';
+
+//BOOL
+T_AND	:	'and';
+T_BIIMPLIES
+	:	'<=>';
+T_IMPLIES
+	:	'=>';  //VDM-Style
+T_NOT	:	'not'; //VDM-Style
+T_NOTEQUAL:	'<>';  //VDM-Style
+T_OR	:	'or';
+
+//Numeric (equal, not equal same as in BOOL)
+T_ABS	:	'abs';
+T_DIV	:	'/';
+T_GREATER
+	:	'>';
+T_GREATEREQUAL
+	:	'>=';
+T_IDIV	:	'div';
+T_LESS	:	'<';
+T_LESSEQUAL
+	:	'<='; //VDM-Style
+T_MOD	:	'mod'; //VDM-Style
+T_POW	:	'**';
+T_PROD	:	'*';
+T_DERIV	:	'dt';
+
+// set/list
+T_CARD	:	'card';
+T_CONC	:	'^'; 
+T_DCONC	:	'conc';
+T_DIFF	:	'\\';
+T_DINTER:	'dinter';
+T_DUNION:	'dunion';
+T_ELEMS	:	'elems';
+T_HEAD	:	'hd';
+T_INDS	:	'inds';
+T_INTER	:	'inter';
+T_LEN	:	'len'; // differs from T_CARD, as card does not count dupes..
+T_SEQMOD_MAPOVERRIDE
+	:	'++';
+T_SUBSET:	'subset';
+T_TAIL	:	'tl';
+T_UNION	:	'union';
+T_FOLDLR	
+	:	':>:';
+T_FOLDRL
+	:	':<:';
+
+
+// maps
+T_DOM	:	'dom';
+T_DOMRESBY
+	:	'<-:';
+T_DOMRESTO
+	:	'<:';		
+T_RNG	:	'rng';
+T_RNGRESBY
+	:	':->';
+T_RNGRESTO
+	:	':>';
+T_MERGE	:	'merge';
+T_MUNION:	'munion';
+
+T_CONSTS:	'consts';
+
+// numbers
+
+T_INFTY	:	(T_MINUS|T_SUM)? 'inf'
+	;	
+
+
+// INTNUMBER, FLOATNUMBER, RANGETO, T_MINUS, T_PLUS are set within
+// FLOAT_OR_INT_OR_RANGE
+fragment T_INTNUMBER
+	:	;
+fragment T_FLOATNUMBER
+	:	;
+fragment T_RANGETO	
+	:	;
+
+FLOAT_OR_INT_OR_RANGE
+	: 	(T_MINUS|T_SUM)? T_DIGIT+
+		( // at this stage, we could face an int, int..int (=range), int.exp (=float), int.exp..int.exp (=float range) etc..
+				(T_POINT T_POINT) => {$type=T_INTNUMBER;}
+			|	(T_POINT T_DIGIT) => T_POINT T_DIGIT+ (('e'|'E') (T_MINUS|T_SUM)? T_DIGIT+)? {$type=T_FLOATNUMBER;}				
+			|	{$type=T_INTNUMBER;}
+		)
+	|	T_POINT
+		( // could be point or range..
+				T_POINT {$type=T_RANGETO;}
+			| 	      {$type=T_POINT;}
+		)
+	|	T_MINUS	{$type=T_MINUS;}
+	|	T_SUM	{$type=T_SUM;}
+	;	
+
+
+
+fragment T_MINUS:	'-';
+fragment T_SUM	:	'+';
+fragment T_POINT:	'.';
+
+
+
+// identifiers
+T_IDENTIFIER
+	:	T_LETTER (T_LETTER|T_DIGIT)* 
+	;
+	
+//T_PRIMEDIDENTIFIER
+//	:	T_IDENTIFIER '\'';
+	
+fragment
+T_LETTER
+	:	'$'
+	|	'A'..'Z'
+	|	'a'..'z'
+	|	'_'
+	;
+
+fragment 
+T_DIGIT:	'0'..'9';
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/SetConstructor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/SetConstructor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/SetConstructor.java	(revision 2)
@@ -0,0 +1,128 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import java.util.ArrayList;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.parser.SymbolTable;
+
+///////////////////////////////////////////////
+///  Constructor: Set
+///
+public final class SetConstructor extends TypeConstructionExpression implements IScope
+{
+	private ArrayList<Expression> m_items;
+	private final SymbolTable m_comprehensionVars;
+	private IScope m_parentScope;
+	private Expression m_comprehension;
+	private boolean m_hasComprehension = false;
+
+	public ArrayList<Expression> items() { return m_items; }
+	public Expression comprehension() { return m_comprehension; }
+	public boolean hasComprehension() { return m_hasComprehension; }
+	public SymbolTable comprehensionVariables() { return m_comprehensionVars; }
+
+	public SetConstructor(int line, int pos)
+	{
+		super (ExpressionKind.SetConstr, line, pos);
+		m_items = new ArrayList<Expression>();
+		m_comprehensionVars = new SymbolTable();
+	}
+
+	public SetConstructor(SetConstructor toCopy)
+	{
+		super (toCopy);
+		m_items = new ArrayList<Expression>(toCopy.m_items);
+		m_comprehensionVars = new SymbolTable(toCopy.m_comprehensionVars);
+		m_parentScope = toCopy.m_parentScope;
+		m_comprehension = toCopy.m_comprehension;
+		m_hasComprehension = toCopy.m_hasComprehension;
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new SetConstructor(this);
+	}
+
+	public void AddItem(Expression anItem)
+	{
+		m_items.add(anItem);
+	}
+
+	public void SetComprehension(Expression anExpr)
+	{
+		m_comprehension = anExpr;
+	}
+
+	public void SetHasComprehension(boolean flag)
+	{
+		m_hasComprehension = flag;
+	}
+
+	@Override
+	public Identifier ResolveIdentifier(String aName)
+	{
+		if (m_comprehensionVars.Defined(aName))
+			return m_comprehensionVars.Get(aName);
+		else
+			return null;
+	}
+
+	@Override
+	public IScope GetParentScope()
+	{
+		return m_parentScope;
+	}
+
+	@Override
+	public void SetParentScope(IScope parentScope)
+	{
+		m_parentScope = parentScope;
+	}
+
+	@Override
+	public void AddIdentifier(Identifier anIdentifier, Object tag)
+	{
+		m_comprehensionVars.AddIdentifier(anIdentifier);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetItems(ArrayList<Expression> newItems)
+	{
+		m_items = newItems;
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/InvalidCastException.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/InvalidCastException.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/InvalidCastException.java	(revision 2)
@@ -0,0 +1,38 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.utils.exceptions;
+
+
+public class InvalidCastException extends OoasCompilerRuntimeException {
+
+	/**
+	 *
+	 */
+	private static final long serialVersionUID = 1L;
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooaLexer.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooaLexer.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooaLexer.java	(revision 2)
@@ -0,0 +1,5152 @@
+// $ANTLR 3.4 C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g 2015-03-30 18:21:33
+
+/*
+    Ulysses OO-Action System Parser
+    
+    Copyright Graz University of Technology 2009
+    Copyright AIT Austrian Institute of Technology 2013
+ */
+ package org.momut.ooas.parser;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+
+@SuppressWarnings({"all", "warnings", "unchecked"})
+public class ooaLexer extends Lexer {
+    public static final int EOF=-1;
+    public static final int T__118=118;
+    public static final int T__119=119;
+    public static final int T__120=120;
+    public static final int T__121=121;
+    public static final int T__122=122;
+    public static final int T__123=123;
+    public static final int T__124=124;
+    public static final int T__125=125;
+    public static final int T__126=126;
+    public static final int T__127=127;
+    public static final int FLOAT_OR_INT_OR_RANGE=4;
+    public static final int LINE_COMMENT=5;
+    public static final int T_ABORT=6;
+    public static final int T_ABS=7;
+    public static final int T_ACTIONS=8;
+    public static final int T_AND=9;
+    public static final int T_ASSIGNMENT=10;
+    public static final int T_AUTOCONS=11;
+    public static final int T_BAR=12;
+    public static final int T_BIIMPLIES=13;
+    public static final int T_BOOL=14;
+    public static final int T_BREAK=15;
+    public static final int T_CARD=16;
+    public static final int T_CBRL=17;
+    public static final int T_CBRR=18;
+    public static final int T_CHAR=19;
+    public static final int T_COLON=20;
+    public static final int T_COMMA=21;
+    public static final int T_COMMENT=22;
+    public static final int T_CONC=23;
+    public static final int T_CONSTS=24;
+    public static final int T_CONT=25;
+    public static final int T_CTRL=26;
+    public static final int T_DCONC=27;
+    public static final int T_DERIV=28;
+    public static final int T_DIFF=29;
+    public static final int T_DIGIT=30;
+    public static final int T_DINTER=31;
+    public static final int T_DIV=32;
+    public static final int T_DO=33;
+    public static final int T_DOM=34;
+    public static final int T_DOMRESBY=35;
+    public static final int T_DOMRESTO=36;
+    public static final int T_DUNION=37;
+    public static final int T_ELEMS=38;
+    public static final int T_ELSE=39;
+    public static final int T_END=40;
+    public static final int T_EQUAL=41;
+    public static final int T_EXISTS=42;
+    public static final int T_FALSE=43;
+    public static final int T_FLOAT=44;
+    public static final int T_FLOATNUMBER=45;
+    public static final int T_FOLDLR=46;
+    public static final int T_FOLDRL=47;
+    public static final int T_FORALL=48;
+    public static final int T_GREATER=49;
+    public static final int T_GREATEREQUAL=50;
+    public static final int T_HEAD=51;
+    public static final int T_IDENTIFIER=52;
+    public static final int T_IDIV=53;
+    public static final int T_IF=54;
+    public static final int T_IMPLIES=55;
+    public static final int T_IN=56;
+    public static final int T_INDS=57;
+    public static final int T_INFTY=58;
+    public static final int T_INT=59;
+    public static final int T_INTER=60;
+    public static final int T_INTNUMBER=61;
+    public static final int T_KILL=62;
+    public static final int T_LEN=63;
+    public static final int T_LESS=64;
+    public static final int T_LESSEQUAL=65;
+    public static final int T_LETTER=66;
+    public static final int T_LIST=67;
+    public static final int T_LPAREN=68;
+    public static final int T_LSQPAREN=69;
+    public static final int T_MAP=70;
+    public static final int T_MAPS=71;
+    public static final int T_MERGE=72;
+    public static final int T_METHODS=73;
+    public static final int T_MINUS=74;
+    public static final int T_MOD=75;
+    public static final int T_MUNION=76;
+    public static final int T_NEW=77;
+    public static final int T_NIL=78;
+    public static final int T_NONDET=79;
+    public static final int T_NOT=80;
+    public static final int T_NOTEQUAL=81;
+    public static final int T_OBS=82;
+    public static final int T_OD=83;
+    public static final int T_OF=84;
+    public static final int T_OR=85;
+    public static final int T_POINT=86;
+    public static final int T_POW=87;
+    public static final int T_PRIMED=88;
+    public static final int T_PRIO=89;
+    public static final int T_PROD=90;
+    public static final int T_QUANTITY=91;
+    public static final int T_RANGETO=92;
+    public static final int T_REQUIRES=93;
+    public static final int T_RNG=94;
+    public static final int T_RNGRESBY=95;
+    public static final int T_RNGRESTO=96;
+    public static final int T_RPAREN=97;
+    public static final int T_RSQPAREN=98;
+    public static final int T_SELF=99;
+    public static final int T_SEMICOLON=100;
+    public static final int T_SEQMOD_MAPOVERRIDE=101;
+    public static final int T_SET=102;
+    public static final int T_SKIP=103;
+    public static final int T_STATIC=104;
+    public static final int T_STRINGLITERAL=105;
+    public static final int T_SUBSET=106;
+    public static final int T_SUM=107;
+    public static final int T_SYSTEM=108;
+    public static final int T_TAIL=109;
+    public static final int T_THEN=110;
+    public static final int T_TO=111;
+    public static final int T_TRUE=112;
+    public static final int T_TYPES=113;
+    public static final int T_UNION=114;
+    public static final int T_VAR=115;
+    public static final int T_WITH=116;
+    public static final int T_WS=117;
+
+    // delegates
+    // delegators
+    public Lexer[] getDelegates() {
+        return new Lexer[] {};
+    }
+
+    public ooaLexer() {} 
+    public ooaLexer(CharStream input) {
+        this(input, new RecognizerSharedState());
+    }
+    public ooaLexer(CharStream input, RecognizerSharedState state) {
+        super(input,state);
+    }
+    public String getGrammarFileName() { return "C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g"; }
+
+    // $ANTLR start "T__118"
+    public final void mT__118() throws RecognitionException {
+        try {
+            int _type = T__118;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:12:8: ( '&' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:12:10: '&'
+            {
+            match('&'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T__118"
+
+    // $ANTLR start "T__119"
+    public final void mT__119() throws RecognitionException {
+        try {
+            int _type = T__119;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:13:8: ( '::' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:13:10: '::'
+            {
+            match("::"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T__119"
+
+    // $ANTLR start "T__120"
+    public final void mT__120() throws RecognitionException {
+        try {
+            int _type = T__120;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:14:8: ( ']|' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:14:10: ']|'
+            {
+            match("]|"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T__120"
+
+    // $ANTLR start "T__121"
+    public final void mT__121() throws RecognitionException {
+        try {
+            int _type = T__121;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:15:8: ( 'as' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:15:10: 'as'
+            {
+            match("as"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T__121"
+
+    // $ANTLR start "T__122"
+    public final void mT__122() throws RecognitionException {
+        try {
+            int _type = T__122;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:16:8: ( 'begin' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:16:10: 'begin'
+            {
+            match("begin"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T__122"
+
+    // $ANTLR start "T__123"
+    public final void mT__123() throws RecognitionException {
+        try {
+            int _type = T__123;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:17:8: ( 'dec' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:17:10: 'dec'
+            {
+            match("dec"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T__123"
+
+    // $ANTLR start "T__124"
+    public final void mT__124() throws RecognitionException {
+        try {
+            int _type = T__124;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:18:8: ( 'inc' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:18:10: 'inc'
+            {
+            match("inc"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T__124"
+
+    // $ANTLR start "T__125"
+    public final void mT__125() throws RecognitionException {
+        try {
+            int _type = T__125;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:19:8: ( 'qval' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:19:10: 'qval'
+            {
+            match("qval"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T__125"
+
+    // $ANTLR start "T__126"
+    public final void mT__126() throws RecognitionException {
+        try {
+            int _type = T__126;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:20:8: ( 'steady' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:20:10: 'steady'
+            {
+            match("steady"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T__126"
+
+    // $ANTLR start "T__127"
+    public final void mT__127() throws RecognitionException {
+        try {
+            int _type = T__127;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:21:8: ( '|[' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:21:10: '|['
+            {
+            match("|["); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T__127"
+
+    // $ANTLR start "T_WS"
+    public final void mT_WS() throws RecognitionException {
+        try {
+            int _type = T_WS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1030:8: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1030:10: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' )
+            {
+            if ( (input.LA(1) >= '\t' && input.LA(1) <= '\n')||(input.LA(1) >= '\f' && input.LA(1) <= '\r')||input.LA(1)==' ' ) {
+                input.consume();
+                state.failed=false;
+            }
+            else {
+                if (state.backtracking>0) {state.failed=true; return ;}
+                MismatchedSetException mse = new MismatchedSetException(null,input);
+                recover(mse);
+                throw mse;
+            }
+
+
+            if ( state.backtracking==0 ) {_channel=HIDDEN;}
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_WS"
+
+    // $ANTLR start "T_COMMENT"
+    public final void mT_COMMENT() throws RecognitionException {
+        try {
+            int _type = T_COMMENT;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1034:6: ( '/*' ( . )* '*/' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1034:8: '/*' ( . )* '*/'
+            {
+            match("/*"); if (state.failed) return ;
+
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1034:13: ( . )*
+            loop1:
+            do {
+                int alt1=2;
+                int LA1_0 = input.LA(1);
+
+                if ( (LA1_0=='*') ) {
+                    int LA1_1 = input.LA(2);
+
+                    if ( (LA1_1=='/') ) {
+                        alt1=2;
+                    }
+                    else if ( ((LA1_1 >= '\u0000' && LA1_1 <= '.')||(LA1_1 >= '0' && LA1_1 <= '\uFFFF')) ) {
+                        alt1=1;
+                    }
+
+
+                }
+                else if ( ((LA1_0 >= '\u0000' && LA1_0 <= ')')||(LA1_0 >= '+' && LA1_0 <= '\uFFFF')) ) {
+                    alt1=1;
+                }
+
+
+                switch (alt1) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1034:13: .
+            	    {
+            	    matchAny(); if (state.failed) return ;
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop1;
+                }
+            } while (true);
+
+
+            match("*/"); if (state.failed) return ;
+
+
+
+            if ( state.backtracking==0 ) {_channel=HIDDEN;}
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_COMMENT"
+
+    // $ANTLR start "LINE_COMMENT"
+    public final void mLINE_COMMENT() throws RecognitionException {
+        try {
+            int _type = LINE_COMMENT;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1038:6: ( '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1038:8: '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
+            {
+            match('#'); if (state.failed) return ;
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1038:12: (~ ( '\\n' | '\\r' ) )*
+            loop2:
+            do {
+                int alt2=2;
+                int LA2_0 = input.LA(1);
+
+                if ( ((LA2_0 >= '\u0000' && LA2_0 <= '\t')||(LA2_0 >= '\u000B' && LA2_0 <= '\f')||(LA2_0 >= '\u000E' && LA2_0 <= '\uFFFF')) ) {
+                    alt2=1;
+                }
+
+
+                switch (alt2) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:
+            	    {
+            	    if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '\t')||(input.LA(1) >= '\u000B' && input.LA(1) <= '\f')||(input.LA(1) >= '\u000E' && input.LA(1) <= '\uFFFF') ) {
+            	        input.consume();
+            	        state.failed=false;
+            	    }
+            	    else {
+            	        if (state.backtracking>0) {state.failed=true; return ;}
+            	        MismatchedSetException mse = new MismatchedSetException(null,input);
+            	        recover(mse);
+            	        throw mse;
+            	    }
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop2;
+                }
+            } while (true);
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1038:26: ( '\\r' )?
+            int alt3=2;
+            int LA3_0 = input.LA(1);
+
+            if ( (LA3_0=='\r') ) {
+                alt3=1;
+            }
+            switch (alt3) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1038:26: '\\r'
+                    {
+                    match('\r'); if (state.failed) return ;
+
+                    }
+                    break;
+
+            }
+
+
+            match('\n'); if (state.failed) return ;
+
+            if ( state.backtracking==0 ) {_channel=HIDDEN;}
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "LINE_COMMENT"
+
+    // $ANTLR start "T_PRIMED"
+    public final void mT_PRIMED() throws RecognitionException {
+        try {
+            int _type = T_PRIMED;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1042:2: ( '\\'' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1042:4: '\\''
+            {
+            match('\''); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_PRIMED"
+
+    // $ANTLR start "T_STRINGLITERAL"
+    public final void mT_STRINGLITERAL() throws RecognitionException {
+        try {
+            int _type = T_STRINGLITERAL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1045:2: ( '\"' ( ( '\"' '\"' )=> '\"' |~ '\"' )* '\"' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1045:4: '\"' ( ( '\"' '\"' )=> '\"' |~ '\"' )* '\"'
+            {
+            match('\"'); if (state.failed) return ;
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1046:3: ( ( '\"' '\"' )=> '\"' |~ '\"' )*
+            loop4:
+            do {
+                int alt4=3;
+                int LA4_0 = input.LA(1);
+
+                if ( (LA4_0=='\"') ) {
+                    int LA4_1 = input.LA(2);
+
+                    if ( (LA4_1=='\"') && (synpred1_ooa())) {
+                        alt4=1;
+                    }
+                    else if ( ((LA4_1 >= '\u0000' && LA4_1 <= '!')||(LA4_1 >= '#' && LA4_1 <= '\uFFFF')) && (synpred1_ooa())) {
+                        alt4=1;
+                    }
+
+
+                }
+                else if ( ((LA4_0 >= '\u0000' && LA4_0 <= '!')||(LA4_0 >= '#' && LA4_0 <= '\uFFFF')) ) {
+                    alt4=2;
+                }
+
+
+                switch (alt4) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1047:9: ( '\"' '\"' )=> '\"'
+            	    {
+            	    match('\"'); if (state.failed) return ;
+
+            	    }
+            	    break;
+            	case 2 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1048:13: ~ '\"'
+            	    {
+            	    if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '!')||(input.LA(1) >= '#' && input.LA(1) <= '\uFFFF') ) {
+            	        input.consume();
+            	        state.failed=false;
+            	    }
+            	    else {
+            	        if (state.backtracking>0) {state.failed=true; return ;}
+            	        MismatchedSetException mse = new MismatchedSetException(null,input);
+            	        recover(mse);
+            	        throw mse;
+            	    }
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop4;
+                }
+            } while (true);
+
+
+            match('\"'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_STRINGLITERAL"
+
+    // $ANTLR start "T_ABORT"
+    public final void mT_ABORT() throws RecognitionException {
+        try {
+            int _type = T_ABORT;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1054:9: ( 'abort' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1054:11: 'abort'
+            {
+            match("abort"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_ABORT"
+
+    // $ANTLR start "T_ACTIONS"
+    public final void mT_ACTIONS() throws RecognitionException {
+        try {
+            int _type = T_ACTIONS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1056:2: ( 'actions' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1056:4: 'actions'
+            {
+            match("actions"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_ACTIONS"
+
+    // $ANTLR start "T_ASSIGNMENT"
+    public final void mT_ASSIGNMENT() throws RecognitionException {
+        try {
+            int _type = T_ASSIGNMENT;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1058:2: ( ':=' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1058:4: ':='
+            {
+            match(":="); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_ASSIGNMENT"
+
+    // $ANTLR start "T_AUTOCONS"
+    public final void mT_AUTOCONS() throws RecognitionException {
+        try {
+            int _type = T_AUTOCONS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1059:11: ( 'autocons' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1059:13: 'autocons'
+            {
+            match("autocons"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_AUTOCONS"
+
+    // $ANTLR start "T_BAR"
+    public final void mT_BAR() throws RecognitionException {
+        try {
+            int _type = T_BAR;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1060:7: ( '|' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1060:9: '|'
+            {
+            match('|'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_BAR"
+
+    // $ANTLR start "T_BOOL"
+    public final void mT_BOOL() throws RecognitionException {
+        try {
+            int _type = T_BOOL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1061:8: ( 'bool' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1061:10: 'bool'
+            {
+            match("bool"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_BOOL"
+
+    // $ANTLR start "T_CBRL"
+    public final void mT_CBRL() throws RecognitionException {
+        try {
+            int _type = T_CBRL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1062:8: ( '{' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1062:10: '{'
+            {
+            match('{'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_CBRL"
+
+    // $ANTLR start "T_CBRR"
+    public final void mT_CBRR() throws RecognitionException {
+        try {
+            int _type = T_CBRR;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1063:8: ( '}' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1063:10: '}'
+            {
+            match('}'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_CBRR"
+
+    // $ANTLR start "T_COLON"
+    public final void mT_COLON() throws RecognitionException {
+        try {
+            int _type = T_COLON;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1064:9: ( ':' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1064:11: ':'
+            {
+            match(':'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_COLON"
+
+    // $ANTLR start "T_COMMA"
+    public final void mT_COMMA() throws RecognitionException {
+        try {
+            int _type = T_COMMA;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1065:9: ( ',' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1065:11: ','
+            {
+            match(','); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_COMMA"
+
+    // $ANTLR start "T_CONT"
+    public final void mT_CONT() throws RecognitionException {
+        try {
+            int _type = T_CONT;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1066:8: ( 'qual' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1066:10: 'qual'
+            {
+            match("qual"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_CONT"
+
+    // $ANTLR start "T_CHAR"
+    public final void mT_CHAR() throws RecognitionException {
+        try {
+            int _type = T_CHAR;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1067:8: ( 'char' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1067:10: 'char'
+            {
+            match("char"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_CHAR"
+
+    // $ANTLR start "T_CTRL"
+    public final void mT_CTRL() throws RecognitionException {
+        try {
+            int _type = T_CTRL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1068:9: ( 'ctr' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1068:11: 'ctr'
+            {
+            match("ctr"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_CTRL"
+
+    // $ANTLR start "T_SYSTEM"
+    public final void mT_SYSTEM() throws RecognitionException {
+        try {
+            int _type = T_SYSTEM;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1070:2: ( 'system' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1070:4: 'system'
+            {
+            match("system"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_SYSTEM"
+
+    // $ANTLR start "T_DO"
+    public final void mT_DO() throws RecognitionException {
+        try {
+            int _type = T_DO;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1071:6: ( 'do' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1071:8: 'do'
+            {
+            match("do"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_DO"
+
+    // $ANTLR start "T_ELSE"
+    public final void mT_ELSE() throws RecognitionException {
+        try {
+            int _type = T_ELSE;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1072:8: ( 'else' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1072:10: 'else'
+            {
+            match("else"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_ELSE"
+
+    // $ANTLR start "T_END"
+    public final void mT_END() throws RecognitionException {
+        try {
+            int _type = T_END;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1073:7: ( 'end' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1073:9: 'end'
+            {
+            match("end"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_END"
+
+    // $ANTLR start "T_EQUAL"
+    public final void mT_EQUAL() throws RecognitionException {
+        try {
+            int _type = T_EQUAL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1074:9: ( '=' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1074:11: '='
+            {
+            match('='); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_EQUAL"
+
+    // $ANTLR start "T_EXISTS"
+    public final void mT_EXISTS() throws RecognitionException {
+        try {
+            int _type = T_EXISTS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1075:9: ( 'exists' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1075:11: 'exists'
+            {
+            match("exists"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_EXISTS"
+
+    // $ANTLR start "T_FLOAT"
+    public final void mT_FLOAT() throws RecognitionException {
+        try {
+            int _type = T_FLOAT;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1076:9: ( 'float' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1076:11: 'float'
+            {
+            match("float"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_FLOAT"
+
+    // $ANTLR start "T_FORALL"
+    public final void mT_FORALL() throws RecognitionException {
+        try {
+            int _type = T_FORALL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1077:9: ( 'forall' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1077:11: 'forall'
+            {
+            match("forall"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_FORALL"
+
+    // $ANTLR start "T_FALSE"
+    public final void mT_FALSE() throws RecognitionException {
+        try {
+            int _type = T_FALSE;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1078:9: ( 'false' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1078:11: 'false'
+            {
+            match("false"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_FALSE"
+
+    // $ANTLR start "T_IF"
+    public final void mT_IF() throws RecognitionException {
+        try {
+            int _type = T_IF;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1079:6: ( 'if' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1079:8: 'if'
+            {
+            match("if"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_IF"
+
+    // $ANTLR start "T_IN"
+    public final void mT_IN() throws RecognitionException {
+        try {
+            int _type = T_IN;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1080:6: ( 'in' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1080:8: 'in'
+            {
+            match("in"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_IN"
+
+    // $ANTLR start "T_INT"
+    public final void mT_INT() throws RecognitionException {
+        try {
+            int _type = T_INT;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1081:7: ( 'int' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1081:9: 'int'
+            {
+            match("int"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_INT"
+
+    // $ANTLR start "T_KILL"
+    public final void mT_KILL() throws RecognitionException {
+        try {
+            int _type = T_KILL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1082:8: ( 'kill' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1082:10: 'kill'
+            {
+            match("kill"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_KILL"
+
+    // $ANTLR start "T_LIST"
+    public final void mT_LIST() throws RecognitionException {
+        try {
+            int _type = T_LIST;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1083:8: ( 'list' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1083:10: 'list'
+            {
+            match("list"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_LIST"
+
+    // $ANTLR start "T_LPAREN"
+    public final void mT_LPAREN() throws RecognitionException {
+        try {
+            int _type = T_LPAREN;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1084:9: ( '(' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1084:11: '('
+            {
+            match('('); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_LPAREN"
+
+    // $ANTLR start "T_LSQPAREN"
+    public final void mT_LSQPAREN() throws RecognitionException {
+        try {
+            int _type = T_LSQPAREN;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1085:11: ( '[' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1085:13: '['
+            {
+            match('['); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_LSQPAREN"
+
+    // $ANTLR start "T_MAP"
+    public final void mT_MAP() throws RecognitionException {
+        try {
+            int _type = T_MAP;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1086:7: ( 'map' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1086:9: 'map'
+            {
+            match("map"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_MAP"
+
+    // $ANTLR start "T_MAPS"
+    public final void mT_MAPS() throws RecognitionException {
+        try {
+            int _type = T_MAPS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1087:8: ( '->' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1087:10: '->'
+            {
+            match("->"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_MAPS"
+
+    // $ANTLR start "T_METHODS"
+    public final void mT_METHODS() throws RecognitionException {
+        try {
+            int _type = T_METHODS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1089:2: ( 'methods' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1089:4: 'methods'
+            {
+            match("methods"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_METHODS"
+
+    // $ANTLR start "T_NEW"
+    public final void mT_NEW() throws RecognitionException {
+        try {
+            int _type = T_NEW;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1090:7: ( 'new' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1090:9: 'new'
+            {
+            match("new"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_NEW"
+
+    // $ANTLR start "T_NIL"
+    public final void mT_NIL() throws RecognitionException {
+        try {
+            int _type = T_NIL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1091:7: ( 'nil' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1091:9: 'nil'
+            {
+            match("nil"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_NIL"
+
+    // $ANTLR start "T_NONDET"
+    public final void mT_NONDET() throws RecognitionException {
+        try {
+            int _type = T_NONDET;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1092:9: ( '[]' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1092:11: '[]'
+            {
+            match("[]"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_NONDET"
+
+    // $ANTLR start "T_OBS"
+    public final void mT_OBS() throws RecognitionException {
+        try {
+            int _type = T_OBS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1093:7: ( 'obs' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1093:9: 'obs'
+            {
+            match("obs"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_OBS"
+
+    // $ANTLR start "T_OD"
+    public final void mT_OD() throws RecognitionException {
+        try {
+            int _type = T_OD;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1094:6: ( 'od' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1094:8: 'od'
+            {
+            match("od"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_OD"
+
+    // $ANTLR start "T_OF"
+    public final void mT_OF() throws RecognitionException {
+        try {
+            int _type = T_OF;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1095:6: ( 'of' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1095:8: 'of'
+            {
+            match("of"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_OF"
+
+    // $ANTLR start "T_PRIO"
+    public final void mT_PRIO() throws RecognitionException {
+        try {
+            int _type = T_PRIO;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1096:8: ( '//' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1096:10: '//'
+            {
+            match("//"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_PRIO"
+
+    // $ANTLR start "T_REQUIRES"
+    public final void mT_REQUIRES() throws RecognitionException {
+        try {
+            int _type = T_REQUIRES;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1098:2: ( 'requires' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1098:4: 'requires'
+            {
+            match("requires"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_REQUIRES"
+
+    // $ANTLR start "T_RPAREN"
+    public final void mT_RPAREN() throws RecognitionException {
+        try {
+            int _type = T_RPAREN;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1099:9: ( ')' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1099:11: ')'
+            {
+            match(')'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_RPAREN"
+
+    // $ANTLR start "T_RSQPAREN"
+    public final void mT_RSQPAREN() throws RecognitionException {
+        try {
+            int _type = T_RSQPAREN;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1100:11: ( ']' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1100:13: ']'
+            {
+            match(']'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_RSQPAREN"
+
+    // $ANTLR start "T_QUANTITY"
+    public final void mT_QUANTITY() throws RecognitionException {
+        try {
+            int _type = T_QUANTITY;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1102:2: ( 'qspace' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1102:4: 'qspace'
+            {
+            match("qspace"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_QUANTITY"
+
+    // $ANTLR start "T_SELF"
+    public final void mT_SELF() throws RecognitionException {
+        try {
+            int _type = T_SELF;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1103:8: ( 'self' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1103:10: 'self'
+            {
+            match("self"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_SELF"
+
+    // $ANTLR start "T_SET"
+    public final void mT_SET() throws RecognitionException {
+        try {
+            int _type = T_SET;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1104:8: ( 'set' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1104:10: 'set'
+            {
+            match("set"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_SET"
+
+    // $ANTLR start "T_SEMICOLON"
+    public final void mT_SEMICOLON() throws RecognitionException {
+        try {
+            int _type = T_SEMICOLON;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1106:2: ( ';' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1106:4: ';'
+            {
+            match(';'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_SEMICOLON"
+
+    // $ANTLR start "T_STATIC"
+    public final void mT_STATIC() throws RecognitionException {
+        try {
+            int _type = T_STATIC;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1107:9: ( 'static' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1107:11: 'static'
+            {
+            match("static"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_STATIC"
+
+    // $ANTLR start "T_SKIP"
+    public final void mT_SKIP() throws RecognitionException {
+        try {
+            int _type = T_SKIP;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1108:8: ( 'skip' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1108:10: 'skip'
+            {
+            match("skip"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_SKIP"
+
+    // $ANTLR start "T_BREAK"
+    public final void mT_BREAK() throws RecognitionException {
+        try {
+            int _type = T_BREAK;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1109:9: ( 'break' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1109:11: 'break'
+            {
+            match("break"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_BREAK"
+
+    // $ANTLR start "T_THEN"
+    public final void mT_THEN() throws RecognitionException {
+        try {
+            int _type = T_THEN;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1110:8: ( 'then' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1110:10: 'then'
+            {
+            match("then"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_THEN"
+
+    // $ANTLR start "T_TRUE"
+    public final void mT_TRUE() throws RecognitionException {
+        try {
+            int _type = T_TRUE;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1111:9: ( 'true' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1111:11: 'true'
+            {
+            match("true"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_TRUE"
+
+    // $ANTLR start "T_TO"
+    public final void mT_TO() throws RecognitionException {
+        try {
+            int _type = T_TO;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1112:6: ( 'to' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1112:8: 'to'
+            {
+            match("to"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_TO"
+
+    // $ANTLR start "T_TYPES"
+    public final void mT_TYPES() throws RecognitionException {
+        try {
+            int _type = T_TYPES;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1113:9: ( 'types' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1113:11: 'types'
+            {
+            match("types"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_TYPES"
+
+    // $ANTLR start "T_VAR"
+    public final void mT_VAR() throws RecognitionException {
+        try {
+            int _type = T_VAR;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1114:7: ( 'var' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1114:9: 'var'
+            {
+            match("var"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_VAR"
+
+    // $ANTLR start "T_WITH"
+    public final void mT_WITH() throws RecognitionException {
+        try {
+            int _type = T_WITH;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1115:8: ( 'with' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1115:10: 'with'
+            {
+            match("with"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_WITH"
+
+    // $ANTLR start "T_AND"
+    public final void mT_AND() throws RecognitionException {
+        try {
+            int _type = T_AND;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1121:7: ( 'and' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1121:9: 'and'
+            {
+            match("and"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_AND"
+
+    // $ANTLR start "T_BIIMPLIES"
+    public final void mT_BIIMPLIES() throws RecognitionException {
+        try {
+            int _type = T_BIIMPLIES;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1123:2: ( '<=>' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1123:4: '<=>'
+            {
+            match("<=>"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_BIIMPLIES"
+
+    // $ANTLR start "T_IMPLIES"
+    public final void mT_IMPLIES() throws RecognitionException {
+        try {
+            int _type = T_IMPLIES;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1125:2: ( '=>' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1125:4: '=>'
+            {
+            match("=>"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_IMPLIES"
+
+    // $ANTLR start "T_NOT"
+    public final void mT_NOT() throws RecognitionException {
+        try {
+            int _type = T_NOT;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1126:7: ( 'not' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1126:9: 'not'
+            {
+            match("not"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_NOT"
+
+    // $ANTLR start "T_NOTEQUAL"
+    public final void mT_NOTEQUAL() throws RecognitionException {
+        try {
+            int _type = T_NOTEQUAL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1127:11: ( '<>' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1127:13: '<>'
+            {
+            match("<>"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_NOTEQUAL"
+
+    // $ANTLR start "T_OR"
+    public final void mT_OR() throws RecognitionException {
+        try {
+            int _type = T_OR;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1128:6: ( 'or' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1128:8: 'or'
+            {
+            match("or"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_OR"
+
+    // $ANTLR start "T_ABS"
+    public final void mT_ABS() throws RecognitionException {
+        try {
+            int _type = T_ABS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1131:7: ( 'abs' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1131:9: 'abs'
+            {
+            match("abs"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_ABS"
+
+    // $ANTLR start "T_DIV"
+    public final void mT_DIV() throws RecognitionException {
+        try {
+            int _type = T_DIV;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1132:7: ( '/' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1132:9: '/'
+            {
+            match('/'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_DIV"
+
+    // $ANTLR start "T_GREATER"
+    public final void mT_GREATER() throws RecognitionException {
+        try {
+            int _type = T_GREATER;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1134:2: ( '>' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1134:4: '>'
+            {
+            match('>'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_GREATER"
+
+    // $ANTLR start "T_GREATEREQUAL"
+    public final void mT_GREATEREQUAL() throws RecognitionException {
+        try {
+            int _type = T_GREATEREQUAL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1136:2: ( '>=' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1136:4: '>='
+            {
+            match(">="); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_GREATEREQUAL"
+
+    // $ANTLR start "T_IDIV"
+    public final void mT_IDIV() throws RecognitionException {
+        try {
+            int _type = T_IDIV;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1137:8: ( 'div' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1137:10: 'div'
+            {
+            match("div"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_IDIV"
+
+    // $ANTLR start "T_LESS"
+    public final void mT_LESS() throws RecognitionException {
+        try {
+            int _type = T_LESS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1138:8: ( '<' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1138:10: '<'
+            {
+            match('<'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_LESS"
+
+    // $ANTLR start "T_LESSEQUAL"
+    public final void mT_LESSEQUAL() throws RecognitionException {
+        try {
+            int _type = T_LESSEQUAL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1140:2: ( '<=' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1140:4: '<='
+            {
+            match("<="); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_LESSEQUAL"
+
+    // $ANTLR start "T_MOD"
+    public final void mT_MOD() throws RecognitionException {
+        try {
+            int _type = T_MOD;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1141:7: ( 'mod' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1141:9: 'mod'
+            {
+            match("mod"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_MOD"
+
+    // $ANTLR start "T_POW"
+    public final void mT_POW() throws RecognitionException {
+        try {
+            int _type = T_POW;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1142:7: ( '**' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1142:9: '**'
+            {
+            match("**"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_POW"
+
+    // $ANTLR start "T_PROD"
+    public final void mT_PROD() throws RecognitionException {
+        try {
+            int _type = T_PROD;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1143:8: ( '*' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1143:10: '*'
+            {
+            match('*'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_PROD"
+
+    // $ANTLR start "T_DERIV"
+    public final void mT_DERIV() throws RecognitionException {
+        try {
+            int _type = T_DERIV;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1144:9: ( 'dt' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1144:11: 'dt'
+            {
+            match("dt"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_DERIV"
+
+    // $ANTLR start "T_CARD"
+    public final void mT_CARD() throws RecognitionException {
+        try {
+            int _type = T_CARD;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1147:8: ( 'card' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1147:10: 'card'
+            {
+            match("card"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_CARD"
+
+    // $ANTLR start "T_CONC"
+    public final void mT_CONC() throws RecognitionException {
+        try {
+            int _type = T_CONC;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1148:8: ( '^' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1148:10: '^'
+            {
+            match('^'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_CONC"
+
+    // $ANTLR start "T_DCONC"
+    public final void mT_DCONC() throws RecognitionException {
+        try {
+            int _type = T_DCONC;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1149:9: ( 'conc' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1149:11: 'conc'
+            {
+            match("conc"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_DCONC"
+
+    // $ANTLR start "T_DIFF"
+    public final void mT_DIFF() throws RecognitionException {
+        try {
+            int _type = T_DIFF;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1150:8: ( '\\\\' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1150:10: '\\\\'
+            {
+            match('\\'); if (state.failed) return ;
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_DIFF"
+
+    // $ANTLR start "T_DINTER"
+    public final void mT_DINTER() throws RecognitionException {
+        try {
+            int _type = T_DINTER;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1151:9: ( 'dinter' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1151:11: 'dinter'
+            {
+            match("dinter"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_DINTER"
+
+    // $ANTLR start "T_DUNION"
+    public final void mT_DUNION() throws RecognitionException {
+        try {
+            int _type = T_DUNION;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1152:9: ( 'dunion' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1152:11: 'dunion'
+            {
+            match("dunion"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_DUNION"
+
+    // $ANTLR start "T_ELEMS"
+    public final void mT_ELEMS() throws RecognitionException {
+        try {
+            int _type = T_ELEMS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1153:9: ( 'elems' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1153:11: 'elems'
+            {
+            match("elems"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_ELEMS"
+
+    // $ANTLR start "T_HEAD"
+    public final void mT_HEAD() throws RecognitionException {
+        try {
+            int _type = T_HEAD;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1154:8: ( 'hd' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1154:10: 'hd'
+            {
+            match("hd"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_HEAD"
+
+    // $ANTLR start "T_INDS"
+    public final void mT_INDS() throws RecognitionException {
+        try {
+            int _type = T_INDS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1155:8: ( 'inds' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1155:10: 'inds'
+            {
+            match("inds"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_INDS"
+
+    // $ANTLR start "T_INTER"
+    public final void mT_INTER() throws RecognitionException {
+        try {
+            int _type = T_INTER;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1156:9: ( 'inter' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1156:11: 'inter'
+            {
+            match("inter"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_INTER"
+
+    // $ANTLR start "T_LEN"
+    public final void mT_LEN() throws RecognitionException {
+        try {
+            int _type = T_LEN;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1157:7: ( 'len' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1157:9: 'len'
+            {
+            match("len"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_LEN"
+
+    // $ANTLR start "T_SEQMOD_MAPOVERRIDE"
+    public final void mT_SEQMOD_MAPOVERRIDE() throws RecognitionException {
+        try {
+            int _type = T_SEQMOD_MAPOVERRIDE;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1159:2: ( '++' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1159:4: '++'
+            {
+            match("++"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_SEQMOD_MAPOVERRIDE"
+
+    // $ANTLR start "T_SUBSET"
+    public final void mT_SUBSET() throws RecognitionException {
+        try {
+            int _type = T_SUBSET;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1160:9: ( 'subset' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1160:11: 'subset'
+            {
+            match("subset"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_SUBSET"
+
+    // $ANTLR start "T_TAIL"
+    public final void mT_TAIL() throws RecognitionException {
+        try {
+            int _type = T_TAIL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1161:8: ( 'tl' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1161:10: 'tl'
+            {
+            match("tl"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_TAIL"
+
+    // $ANTLR start "T_UNION"
+    public final void mT_UNION() throws RecognitionException {
+        try {
+            int _type = T_UNION;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1162:9: ( 'union' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1162:11: 'union'
+            {
+            match("union"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_UNION"
+
+    // $ANTLR start "T_FOLDLR"
+    public final void mT_FOLDLR() throws RecognitionException {
+        try {
+            int _type = T_FOLDLR;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1164:2: ( ':>:' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1164:4: ':>:'
+            {
+            match(":>:"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_FOLDLR"
+
+    // $ANTLR start "T_FOLDRL"
+    public final void mT_FOLDRL() throws RecognitionException {
+        try {
+            int _type = T_FOLDRL;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1166:2: ( ':<:' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1166:4: ':<:'
+            {
+            match(":<:"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_FOLDRL"
+
+    // $ANTLR start "T_DOM"
+    public final void mT_DOM() throws RecognitionException {
+        try {
+            int _type = T_DOM;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1170:7: ( 'dom' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1170:9: 'dom'
+            {
+            match("dom"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_DOM"
+
+    // $ANTLR start "T_DOMRESBY"
+    public final void mT_DOMRESBY() throws RecognitionException {
+        try {
+            int _type = T_DOMRESBY;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1172:2: ( '<-:' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1172:4: '<-:'
+            {
+            match("<-:"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_DOMRESBY"
+
+    // $ANTLR start "T_DOMRESTO"
+    public final void mT_DOMRESTO() throws RecognitionException {
+        try {
+            int _type = T_DOMRESTO;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1174:2: ( '<:' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1174:4: '<:'
+            {
+            match("<:"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_DOMRESTO"
+
+    // $ANTLR start "T_RNG"
+    public final void mT_RNG() throws RecognitionException {
+        try {
+            int _type = T_RNG;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1175:7: ( 'rng' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1175:9: 'rng'
+            {
+            match("rng"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_RNG"
+
+    // $ANTLR start "T_RNGRESBY"
+    public final void mT_RNGRESBY() throws RecognitionException {
+        try {
+            int _type = T_RNGRESBY;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1177:2: ( ':->' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1177:4: ':->'
+            {
+            match(":->"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_RNGRESBY"
+
+    // $ANTLR start "T_RNGRESTO"
+    public final void mT_RNGRESTO() throws RecognitionException {
+        try {
+            int _type = T_RNGRESTO;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1179:2: ( ':>' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1179:4: ':>'
+            {
+            match(":>"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_RNGRESTO"
+
+    // $ANTLR start "T_MERGE"
+    public final void mT_MERGE() throws RecognitionException {
+        try {
+            int _type = T_MERGE;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1180:9: ( 'merge' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1180:11: 'merge'
+            {
+            match("merge"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_MERGE"
+
+    // $ANTLR start "T_MUNION"
+    public final void mT_MUNION() throws RecognitionException {
+        try {
+            int _type = T_MUNION;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1181:9: ( 'munion' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1181:11: 'munion'
+            {
+            match("munion"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_MUNION"
+
+    // $ANTLR start "T_CONSTS"
+    public final void mT_CONSTS() throws RecognitionException {
+        try {
+            int _type = T_CONSTS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1183:9: ( 'consts' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1183:11: 'consts'
+            {
+            match("consts"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_CONSTS"
+
+    // $ANTLR start "T_INFTY"
+    public final void mT_INFTY() throws RecognitionException {
+        try {
+            int _type = T_INFTY;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1187:9: ( ( T_MINUS | T_SUM )? 'inf' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1187:11: ( T_MINUS | T_SUM )? 'inf'
+            {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1187:11: ( T_MINUS | T_SUM )?
+            int alt5=2;
+            int LA5_0 = input.LA(1);
+
+            if ( (LA5_0=='+'||LA5_0=='-') ) {
+                alt5=1;
+            }
+            switch (alt5) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:
+                    {
+                    if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
+                        input.consume();
+                        state.failed=false;
+                    }
+                    else {
+                        if (state.backtracking>0) {state.failed=true; return ;}
+                        MismatchedSetException mse = new MismatchedSetException(null,input);
+                        recover(mse);
+                        throw mse;
+                    }
+
+
+                    }
+                    break;
+
+            }
+
+
+            match("inf"); if (state.failed) return ;
+
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_INFTY"
+
+    // $ANTLR start "T_INTNUMBER"
+    public final void mT_INTNUMBER() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1194:2: ()
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1194:4: 
+            {
+            }
+
+
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_INTNUMBER"
+
+    // $ANTLR start "T_FLOATNUMBER"
+    public final void mT_FLOATNUMBER() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1196:2: ()
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1196:4: 
+            {
+            }
+
+
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_FLOATNUMBER"
+
+    // $ANTLR start "T_RANGETO"
+    public final void mT_RANGETO() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1198:2: ()
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1198:4: 
+            {
+            }
+
+
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_RANGETO"
+
+    // $ANTLR start "FLOAT_OR_INT_OR_RANGE"
+    public final void mFLOAT_OR_INT_OR_RANGE() throws RecognitionException {
+        try {
+            int _type = FLOAT_OR_INT_OR_RANGE;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1201:2: ( ( T_MINUS | T_SUM )? ( T_DIGIT )+ ( ( T_POINT T_POINT )=>| ( T_POINT T_DIGIT )=> T_POINT ( T_DIGIT )+ ( ( 'e' | 'E' ) ( T_MINUS | T_SUM )? ( T_DIGIT )+ )? |) | T_POINT ( T_POINT |) | T_MINUS | T_SUM )
+            int alt14=4;
+            switch ( input.LA(1) ) {
+            case '-':
+                {
+                int LA14_1 = input.LA(2);
+
+                if ( ((LA14_1 >= '0' && LA14_1 <= '9')) ) {
+                    alt14=1;
+                }
+                else {
+                    alt14=3;
+                }
+                }
+                break;
+            case '0':
+            case '1':
+            case '2':
+            case '3':
+            case '4':
+            case '5':
+            case '6':
+            case '7':
+            case '8':
+            case '9':
+                {
+                alt14=1;
+                }
+                break;
+            case '.':
+                {
+                alt14=2;
+                }
+                break;
+            case '+':
+                {
+                int LA14_4 = input.LA(2);
+
+                if ( ((LA14_4 >= '0' && LA14_4 <= '9')) ) {
+                    alt14=1;
+                }
+                else {
+                    alt14=4;
+                }
+                }
+                break;
+            default:
+                if (state.backtracking>0) {state.failed=true; return ;}
+                NoViableAltException nvae =
+                    new NoViableAltException("", 14, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt14) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1201:5: ( T_MINUS | T_SUM )? ( T_DIGIT )+ ( ( T_POINT T_POINT )=>| ( T_POINT T_DIGIT )=> T_POINT ( T_DIGIT )+ ( ( 'e' | 'E' ) ( T_MINUS | T_SUM )? ( T_DIGIT )+ )? |)
+                    {
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1201:5: ( T_MINUS | T_SUM )?
+                    int alt6=2;
+                    int LA6_0 = input.LA(1);
+
+                    if ( (LA6_0=='+'||LA6_0=='-') ) {
+                        alt6=1;
+                    }
+                    switch (alt6) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:
+                            {
+                            if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
+                                input.consume();
+                                state.failed=false;
+                            }
+                            else {
+                                if (state.backtracking>0) {state.failed=true; return ;}
+                                MismatchedSetException mse = new MismatchedSetException(null,input);
+                                recover(mse);
+                                throw mse;
+                            }
+
+
+                            }
+                            break;
+
+                    }
+
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1201:22: ( T_DIGIT )+
+                    int cnt7=0;
+                    loop7:
+                    do {
+                        int alt7=2;
+                        int LA7_0 = input.LA(1);
+
+                        if ( ((LA7_0 >= '0' && LA7_0 <= '9')) ) {
+                            alt7=1;
+                        }
+
+
+                        switch (alt7) {
+                    	case 1 :
+                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:
+                    	    {
+                    	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
+                    	        input.consume();
+                    	        state.failed=false;
+                    	    }
+                    	    else {
+                    	        if (state.backtracking>0) {state.failed=true; return ;}
+                    	        MismatchedSetException mse = new MismatchedSetException(null,input);
+                    	        recover(mse);
+                    	        throw mse;
+                    	    }
+
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    if ( cnt7 >= 1 ) break loop7;
+                    	    if (state.backtracking>0) {state.failed=true; return ;}
+                                EarlyExitException eee =
+                                    new EarlyExitException(7, input);
+                                throw eee;
+                        }
+                        cnt7++;
+                    } while (true);
+
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1202:3: ( ( T_POINT T_POINT )=>| ( T_POINT T_DIGIT )=> T_POINT ( T_DIGIT )+ ( ( 'e' | 'E' ) ( T_MINUS | T_SUM )? ( T_DIGIT )+ )? |)
+                    int alt12=3;
+                    int LA12_0 = input.LA(1);
+
+                    if ( (LA12_0=='.') && (synpred3_ooa())) {
+                        alt12=2;
+                    }
+                    else if ( (synpred2_ooa()) ) {
+                        alt12=1;
+                    }
+                    else if ( (true) ) {
+                        alt12=3;
+                    }
+                    else {
+                        if (state.backtracking>0) {state.failed=true; return ;}
+                        NoViableAltException nvae =
+                            new NoViableAltException("", 12, 0, input);
+
+                        throw nvae;
+
+                    }
+                    switch (alt12) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1203:5: ( T_POINT T_POINT )=>
+                            {
+                            if ( state.backtracking==0 ) {_type=T_INTNUMBER;}
+
+                            }
+                            break;
+                        case 2 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1204:6: ( T_POINT T_DIGIT )=> T_POINT ( T_DIGIT )+ ( ( 'e' | 'E' ) ( T_MINUS | T_SUM )? ( T_DIGIT )+ )?
+                            {
+                            mT_POINT(); if (state.failed) return ;
+
+
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1204:35: ( T_DIGIT )+
+                            int cnt8=0;
+                            loop8:
+                            do {
+                                int alt8=2;
+                                int LA8_0 = input.LA(1);
+
+                                if ( ((LA8_0 >= '0' && LA8_0 <= '9')) ) {
+                                    alt8=1;
+                                }
+
+
+                                switch (alt8) {
+                            	case 1 :
+                            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:
+                            	    {
+                            	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
+                            	        input.consume();
+                            	        state.failed=false;
+                            	    }
+                            	    else {
+                            	        if (state.backtracking>0) {state.failed=true; return ;}
+                            	        MismatchedSetException mse = new MismatchedSetException(null,input);
+                            	        recover(mse);
+                            	        throw mse;
+                            	    }
+
+
+                            	    }
+                            	    break;
+
+                            	default :
+                            	    if ( cnt8 >= 1 ) break loop8;
+                            	    if (state.backtracking>0) {state.failed=true; return ;}
+                                        EarlyExitException eee =
+                                            new EarlyExitException(8, input);
+                                        throw eee;
+                                }
+                                cnt8++;
+                            } while (true);
+
+
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1204:44: ( ( 'e' | 'E' ) ( T_MINUS | T_SUM )? ( T_DIGIT )+ )?
+                            int alt11=2;
+                            int LA11_0 = input.LA(1);
+
+                            if ( (LA11_0=='E'||LA11_0=='e') ) {
+                                alt11=1;
+                            }
+                            switch (alt11) {
+                                case 1 :
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1204:45: ( 'e' | 'E' ) ( T_MINUS | T_SUM )? ( T_DIGIT )+
+                                    {
+                                    if ( input.LA(1)=='E'||input.LA(1)=='e' ) {
+                                        input.consume();
+                                        state.failed=false;
+                                    }
+                                    else {
+                                        if (state.backtracking>0) {state.failed=true; return ;}
+                                        MismatchedSetException mse = new MismatchedSetException(null,input);
+                                        recover(mse);
+                                        throw mse;
+                                    }
+
+
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1204:55: ( T_MINUS | T_SUM )?
+                                    int alt9=2;
+                                    int LA9_0 = input.LA(1);
+
+                                    if ( (LA9_0=='+'||LA9_0=='-') ) {
+                                        alt9=1;
+                                    }
+                                    switch (alt9) {
+                                        case 1 :
+                                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:
+                                            {
+                                            if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
+                                                input.consume();
+                                                state.failed=false;
+                                            }
+                                            else {
+                                                if (state.backtracking>0) {state.failed=true; return ;}
+                                                MismatchedSetException mse = new MismatchedSetException(null,input);
+                                                recover(mse);
+                                                throw mse;
+                                            }
+
+
+                                            }
+                                            break;
+
+                                    }
+
+
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1204:72: ( T_DIGIT )+
+                                    int cnt10=0;
+                                    loop10:
+                                    do {
+                                        int alt10=2;
+                                        int LA10_0 = input.LA(1);
+
+                                        if ( ((LA10_0 >= '0' && LA10_0 <= '9')) ) {
+                                            alt10=1;
+                                        }
+
+
+                                        switch (alt10) {
+                                    	case 1 :
+                                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:
+                                    	    {
+                                    	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
+                                    	        input.consume();
+                                    	        state.failed=false;
+                                    	    }
+                                    	    else {
+                                    	        if (state.backtracking>0) {state.failed=true; return ;}
+                                    	        MismatchedSetException mse = new MismatchedSetException(null,input);
+                                    	        recover(mse);
+                                    	        throw mse;
+                                    	    }
+
+
+                                    	    }
+                                    	    break;
+
+                                    	default :
+                                    	    if ( cnt10 >= 1 ) break loop10;
+                                    	    if (state.backtracking>0) {state.failed=true; return ;}
+                                                EarlyExitException eee =
+                                                    new EarlyExitException(10, input);
+                                                throw eee;
+                                        }
+                                        cnt10++;
+                                    } while (true);
+
+
+                                    }
+                                    break;
+
+                            }
+
+
+                            if ( state.backtracking==0 ) {_type=T_FLOATNUMBER;}
+
+                            }
+                            break;
+                        case 3 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1205:6: 
+                            {
+                            if ( state.backtracking==0 ) {_type=T_INTNUMBER;}
+
+                            }
+                            break;
+
+                    }
+
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1207:4: T_POINT ( T_POINT |)
+                    {
+                    mT_POINT(); if (state.failed) return ;
+
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1208:3: ( T_POINT |)
+                    int alt13=2;
+                    int LA13_0 = input.LA(1);
+
+                    if ( (LA13_0=='.') ) {
+                        alt13=1;
+                    }
+                    else {
+                        alt13=2;
+                    }
+                    switch (alt13) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1209:5: T_POINT
+                            {
+                            mT_POINT(); if (state.failed) return ;
+
+
+                            if ( state.backtracking==0 ) {_type=T_RANGETO;}
+
+                            }
+                            break;
+                        case 2 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1210:13: 
+                            {
+                            if ( state.backtracking==0 ) {_type=T_POINT;}
+
+                            }
+                            break;
+
+                    }
+
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1212:4: T_MINUS
+                    {
+                    mT_MINUS(); if (state.failed) return ;
+
+
+                    if ( state.backtracking==0 ) {_type=T_MINUS;}
+
+                    }
+                    break;
+                case 4 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1213:4: T_SUM
+                    {
+                    mT_SUM(); if (state.failed) return ;
+
+
+                    if ( state.backtracking==0 ) {_type=T_SUM;}
+
+                    }
+                    break;
+
+            }
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "FLOAT_OR_INT_OR_RANGE"
+
+    // $ANTLR start "T_MINUS"
+    public final void mT_MINUS() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1218:17: ( '-' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1218:19: '-'
+            {
+            match('-'); if (state.failed) return ;
+
+            }
+
+
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_MINUS"
+
+    // $ANTLR start "T_SUM"
+    public final void mT_SUM() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1219:16: ( '+' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1219:18: '+'
+            {
+            match('+'); if (state.failed) return ;
+
+            }
+
+
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_SUM"
+
+    // $ANTLR start "T_POINT"
+    public final void mT_POINT() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1220:17: ( '.' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1220:19: '.'
+            {
+            match('.'); if (state.failed) return ;
+
+            }
+
+
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_POINT"
+
+    // $ANTLR start "T_IDENTIFIER"
+    public final void mT_IDENTIFIER() throws RecognitionException {
+        try {
+            int _type = T_IDENTIFIER;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1226:2: ( T_LETTER ( T_LETTER | T_DIGIT )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1226:4: T_LETTER ( T_LETTER | T_DIGIT )*
+            {
+            mT_LETTER(); if (state.failed) return ;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1226:13: ( T_LETTER | T_DIGIT )*
+            loop15:
+            do {
+                int alt15=2;
+                int LA15_0 = input.LA(1);
+
+                if ( (LA15_0=='$'||(LA15_0 >= '0' && LA15_0 <= '9')||(LA15_0 >= 'A' && LA15_0 <= 'Z')||LA15_0=='_'||(LA15_0 >= 'a' && LA15_0 <= 'z')) ) {
+                    alt15=1;
+                }
+
+
+                switch (alt15) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:
+            	    {
+            	    if ( input.LA(1)=='$'||(input.LA(1) >= '0' && input.LA(1) <= '9')||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
+            	        input.consume();
+            	        state.failed=false;
+            	    }
+            	    else {
+            	        if (state.backtracking>0) {state.failed=true; return ;}
+            	        MismatchedSetException mse = new MismatchedSetException(null,input);
+            	        recover(mse);
+            	        throw mse;
+            	    }
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop15;
+                }
+            } while (true);
+
+
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_IDENTIFIER"
+
+    // $ANTLR start "T_LETTER"
+    public final void mT_LETTER() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1235:2: ( '$' | 'A' .. 'Z' | 'a' .. 'z' | '_' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:
+            {
+            if ( input.LA(1)=='$'||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
+                input.consume();
+                state.failed=false;
+            }
+            else {
+                if (state.backtracking>0) {state.failed=true; return ;}
+                MismatchedSetException mse = new MismatchedSetException(null,input);
+                recover(mse);
+                throw mse;
+            }
+
+
+            }
+
+
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_LETTER"
+
+    // $ANTLR start "T_DIGIT"
+    public final void mT_DIGIT() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1242:8: ( '0' .. '9' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:
+            {
+            if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
+                input.consume();
+                state.failed=false;
+            }
+            else {
+                if (state.backtracking>0) {state.failed=true; return ;}
+                MismatchedSetException mse = new MismatchedSetException(null,input);
+                recover(mse);
+                throw mse;
+            }
+
+
+            }
+
+
+        }
+        finally {
+        	// do for sure before leaving
+        }
+    }
+    // $ANTLR end "T_DIGIT"
+
+    public void mTokens() throws RecognitionException {
+        // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:8: ( T__118 | T__119 | T__120 | T__121 | T__122 | T__123 | T__124 | T__125 | T__126 | T__127 | T_WS | T_COMMENT | LINE_COMMENT | T_PRIMED | T_STRINGLITERAL | T_ABORT | T_ACTIONS | T_ASSIGNMENT | T_AUTOCONS | T_BAR | T_BOOL | T_CBRL | T_CBRR | T_COLON | T_COMMA | T_CONT | T_CHAR | T_CTRL | T_SYSTEM | T_DO | T_ELSE | T_END | T_EQUAL | T_EXISTS | T_FLOAT | T_FORALL | T_FALSE | T_IF | T_IN | T_INT | T_KILL | T_LIST | T_LPAREN | T_LSQPAREN | T_MAP | T_MAPS | T_METHODS | T_NEW | T_NIL | T_NONDET | T_OBS | T_OD | T_OF | T_PRIO | T_REQUIRES | T_RPAREN | T_RSQPAREN | T_QUANTITY | T_SELF | T_SET | T_SEMICOLON | T_STATIC | T_SKIP | T_BREAK | T_THEN | T_TRUE | T_TO | T_TYPES | T_VAR | T_WITH | T_AND | T_BIIMPLIES | T_IMPLIES | T_NOT | T_NOTEQUAL | T_OR | T_ABS | T_DIV | T_GREATER | T_GREATEREQUAL | T_IDIV | T_LESS | T_LESSEQUAL | T_MOD | T_POW | T_PROD | T_DERIV | T_CARD | T_CONC | T_DCONC | T_DIFF | T_DINTER | T_DUNION | T_ELEMS | T_HEAD | T_INDS | T_INTER | T_LEN | T_SEQMOD_MAPOVERRIDE | T_SUBSET | T_TAIL | T_UNION | T_FOLDLR | T_FOLDRL | T_DOM | T_DOMRESBY | T_DOMRESTO | T_RNG | T_RNGRESBY | T_RNGRESTO | T_MERGE | T_MUNION | T_CONSTS | T_INFTY | FLOAT_OR_INT_OR_RANGE | T_IDENTIFIER )
+        int alt16=116;
+        alt16 = dfa16.predict(input);
+        switch (alt16) {
+            case 1 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:10: T__118
+                {
+                mT__118(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 2 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:17: T__119
+                {
+                mT__119(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 3 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:24: T__120
+                {
+                mT__120(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 4 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:31: T__121
+                {
+                mT__121(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 5 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:38: T__122
+                {
+                mT__122(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 6 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:45: T__123
+                {
+                mT__123(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 7 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:52: T__124
+                {
+                mT__124(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 8 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:59: T__125
+                {
+                mT__125(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 9 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:66: T__126
+                {
+                mT__126(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 10 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:73: T__127
+                {
+                mT__127(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 11 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:80: T_WS
+                {
+                mT_WS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 12 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:85: T_COMMENT
+                {
+                mT_COMMENT(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 13 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:95: LINE_COMMENT
+                {
+                mLINE_COMMENT(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 14 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:108: T_PRIMED
+                {
+                mT_PRIMED(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 15 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:117: T_STRINGLITERAL
+                {
+                mT_STRINGLITERAL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 16 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:133: T_ABORT
+                {
+                mT_ABORT(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 17 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:141: T_ACTIONS
+                {
+                mT_ACTIONS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 18 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:151: T_ASSIGNMENT
+                {
+                mT_ASSIGNMENT(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 19 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:164: T_AUTOCONS
+                {
+                mT_AUTOCONS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 20 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:175: T_BAR
+                {
+                mT_BAR(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 21 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:181: T_BOOL
+                {
+                mT_BOOL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 22 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:188: T_CBRL
+                {
+                mT_CBRL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 23 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:195: T_CBRR
+                {
+                mT_CBRR(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 24 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:202: T_COLON
+                {
+                mT_COLON(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 25 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:210: T_COMMA
+                {
+                mT_COMMA(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 26 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:218: T_CONT
+                {
+                mT_CONT(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 27 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:225: T_CHAR
+                {
+                mT_CHAR(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 28 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:232: T_CTRL
+                {
+                mT_CTRL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 29 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:239: T_SYSTEM
+                {
+                mT_SYSTEM(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 30 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:248: T_DO
+                {
+                mT_DO(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 31 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:253: T_ELSE
+                {
+                mT_ELSE(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 32 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:260: T_END
+                {
+                mT_END(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 33 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:266: T_EQUAL
+                {
+                mT_EQUAL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 34 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:274: T_EXISTS
+                {
+                mT_EXISTS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 35 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:283: T_FLOAT
+                {
+                mT_FLOAT(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 36 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:291: T_FORALL
+                {
+                mT_FORALL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 37 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:300: T_FALSE
+                {
+                mT_FALSE(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 38 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:308: T_IF
+                {
+                mT_IF(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 39 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:313: T_IN
+                {
+                mT_IN(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 40 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:318: T_INT
+                {
+                mT_INT(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 41 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:324: T_KILL
+                {
+                mT_KILL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 42 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:331: T_LIST
+                {
+                mT_LIST(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 43 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:338: T_LPAREN
+                {
+                mT_LPAREN(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 44 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:347: T_LSQPAREN
+                {
+                mT_LSQPAREN(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 45 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:358: T_MAP
+                {
+                mT_MAP(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 46 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:364: T_MAPS
+                {
+                mT_MAPS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 47 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:371: T_METHODS
+                {
+                mT_METHODS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 48 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:381: T_NEW
+                {
+                mT_NEW(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 49 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:387: T_NIL
+                {
+                mT_NIL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 50 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:393: T_NONDET
+                {
+                mT_NONDET(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 51 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:402: T_OBS
+                {
+                mT_OBS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 52 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:408: T_OD
+                {
+                mT_OD(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 53 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:413: T_OF
+                {
+                mT_OF(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 54 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:418: T_PRIO
+                {
+                mT_PRIO(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 55 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:425: T_REQUIRES
+                {
+                mT_REQUIRES(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 56 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:436: T_RPAREN
+                {
+                mT_RPAREN(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 57 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:445: T_RSQPAREN
+                {
+                mT_RSQPAREN(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 58 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:456: T_QUANTITY
+                {
+                mT_QUANTITY(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 59 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:467: T_SELF
+                {
+                mT_SELF(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 60 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:474: T_SET
+                {
+                mT_SET(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 61 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:480: T_SEMICOLON
+                {
+                mT_SEMICOLON(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 62 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:492: T_STATIC
+                {
+                mT_STATIC(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 63 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:501: T_SKIP
+                {
+                mT_SKIP(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 64 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:508: T_BREAK
+                {
+                mT_BREAK(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 65 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:516: T_THEN
+                {
+                mT_THEN(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 66 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:523: T_TRUE
+                {
+                mT_TRUE(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 67 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:530: T_TO
+                {
+                mT_TO(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 68 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:535: T_TYPES
+                {
+                mT_TYPES(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 69 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:543: T_VAR
+                {
+                mT_VAR(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 70 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:549: T_WITH
+                {
+                mT_WITH(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 71 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:556: T_AND
+                {
+                mT_AND(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 72 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:562: T_BIIMPLIES
+                {
+                mT_BIIMPLIES(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 73 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:574: T_IMPLIES
+                {
+                mT_IMPLIES(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 74 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:584: T_NOT
+                {
+                mT_NOT(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 75 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:590: T_NOTEQUAL
+                {
+                mT_NOTEQUAL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 76 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:601: T_OR
+                {
+                mT_OR(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 77 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:606: T_ABS
+                {
+                mT_ABS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 78 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:612: T_DIV
+                {
+                mT_DIV(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 79 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:618: T_GREATER
+                {
+                mT_GREATER(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 80 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:628: T_GREATEREQUAL
+                {
+                mT_GREATEREQUAL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 81 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:643: T_IDIV
+                {
+                mT_IDIV(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 82 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:650: T_LESS
+                {
+                mT_LESS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 83 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:657: T_LESSEQUAL
+                {
+                mT_LESSEQUAL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 84 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:669: T_MOD
+                {
+                mT_MOD(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 85 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:675: T_POW
+                {
+                mT_POW(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 86 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:681: T_PROD
+                {
+                mT_PROD(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 87 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:688: T_DERIV
+                {
+                mT_DERIV(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 88 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:696: T_CARD
+                {
+                mT_CARD(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 89 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:703: T_CONC
+                {
+                mT_CONC(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 90 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:710: T_DCONC
+                {
+                mT_DCONC(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 91 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:718: T_DIFF
+                {
+                mT_DIFF(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 92 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:725: T_DINTER
+                {
+                mT_DINTER(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 93 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:734: T_DUNION
+                {
+                mT_DUNION(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 94 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:743: T_ELEMS
+                {
+                mT_ELEMS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 95 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:751: T_HEAD
+                {
+                mT_HEAD(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 96 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:758: T_INDS
+                {
+                mT_INDS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 97 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:765: T_INTER
+                {
+                mT_INTER(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 98 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:773: T_LEN
+                {
+                mT_LEN(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 99 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:779: T_SEQMOD_MAPOVERRIDE
+                {
+                mT_SEQMOD_MAPOVERRIDE(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 100 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:800: T_SUBSET
+                {
+                mT_SUBSET(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 101 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:809: T_TAIL
+                {
+                mT_TAIL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 102 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:816: T_UNION
+                {
+                mT_UNION(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 103 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:824: T_FOLDLR
+                {
+                mT_FOLDLR(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 104 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:833: T_FOLDRL
+                {
+                mT_FOLDRL(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 105 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:842: T_DOM
+                {
+                mT_DOM(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 106 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:848: T_DOMRESBY
+                {
+                mT_DOMRESBY(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 107 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:859: T_DOMRESTO
+                {
+                mT_DOMRESTO(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 108 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:870: T_RNG
+                {
+                mT_RNG(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 109 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:876: T_RNGRESBY
+                {
+                mT_RNGRESBY(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 110 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:887: T_RNGRESTO
+                {
+                mT_RNGRESTO(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 111 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:898: T_MERGE
+                {
+                mT_MERGE(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 112 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:906: T_MUNION
+                {
+                mT_MUNION(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 113 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:915: T_CONSTS
+                {
+                mT_CONSTS(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 114 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:924: T_INFTY
+                {
+                mT_INFTY(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 115 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:932: FLOAT_OR_INT_OR_RANGE
+                {
+                mFLOAT_OR_INT_OR_RANGE(); if (state.failed) return ;
+
+
+                }
+                break;
+            case 116 :
+                // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1:954: T_IDENTIFIER
+                {
+                mT_IDENTIFIER(); if (state.failed) return ;
+
+
+                }
+                break;
+
+        }
+
+    }
+
+    // $ANTLR start synpred1_ooa
+    public final void synpred1_ooa_fragment() throws RecognitionException {
+        // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1047:9: ( '\"' '\"' )
+        // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1047:11: '\"' '\"'
+        {
+        match('\"'); if (state.failed) return ;
+
+        match('\"'); if (state.failed) return ;
+
+        }
+
+    }
+    // $ANTLR end synpred1_ooa
+
+    // $ANTLR start synpred2_ooa
+    public final void synpred2_ooa_fragment() throws RecognitionException {
+        // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1203:5: ( T_POINT T_POINT )
+        // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1203:6: T_POINT T_POINT
+        {
+        mT_POINT(); if (state.failed) return ;
+
+
+        mT_POINT(); if (state.failed) return ;
+
+
+        }
+
+    }
+    // $ANTLR end synpred2_ooa
+
+    // $ANTLR start synpred3_ooa
+    public final void synpred3_ooa_fragment() throws RecognitionException {
+        // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1204:6: ( T_POINT T_DIGIT )
+        // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1204:7: T_POINT T_DIGIT
+        {
+        mT_POINT(); if (state.failed) return ;
+
+
+        mT_DIGIT(); if (state.failed) return ;
+
+
+        }
+
+    }
+    // $ANTLR end synpred3_ooa
+
+    public final boolean synpred2_ooa() {
+        state.backtracking++;
+        int start = input.mark();
+        try {
+            synpred2_ooa_fragment(); // can never throw exception
+        } catch (RecognitionException re) {
+            System.err.println("impossible: "+re);
+        }
+        boolean success = !state.failed;
+        input.rewind(start);
+        state.backtracking--;
+        state.failed=false;
+        return success;
+    }
+    public final boolean synpred3_ooa() {
+        state.backtracking++;
+        int start = input.mark();
+        try {
+            synpred3_ooa_fragment(); // can never throw exception
+        } catch (RecognitionException re) {
+            System.err.println("impossible: "+re);
+        }
+        boolean success = !state.failed;
+        input.rewind(start);
+        state.backtracking--;
+        state.failed=false;
+        return success;
+    }
+    public final boolean synpred1_ooa() {
+        state.backtracking++;
+        int start = input.mark();
+        try {
+            synpred1_ooa_fragment(); // can never throw exception
+        } catch (RecognitionException re) {
+            System.err.println("impossible: "+re);
+        }
+        boolean success = !state.failed;
+        input.rewind(start);
+        state.backtracking--;
+        state.failed=false;
+        return success;
+    }
+
+
+    protected DFA16 dfa16 = new DFA16(this);
+    static final String DFA16_eotS =
+        "\2\uffff\1\64\1\66\6\56\1\117\1\uffff\1\122\6\uffff\2\56\1\133\3"+
+        "\56\1\uffff\1\143\1\56\1\55\3\56\2\uffff\3\56\1\176\1\u0080\1\u0082"+
+        "\2\uffff\1\56\1\55\1\56\4\uffff\1\u0087\5\uffff\1\u0088\10\56\1"+
+        "\u0093\1\56\1\u0096\1\56\1\u009c\1\u009d\10\56\5\uffff\7\56\2\uffff"+
+        "\6\56\2\uffff\4\56\2\uffff\4\56\1\u00bf\1\u00c0\1\u00c1\4\56\1\u00c6"+
+        "\1\56\1\u00c8\2\56\1\u00cc\10\uffff\1\u00cd\1\uffff\1\56\3\uffff"+
+        "\1\56\1\u00d0\2\56\1\u00d3\3\56\1\u00d7\1\u00d8\1\uffff\1\u00d9"+
+        "\1\56\1\uffff\1\56\1\u00dc\1\u00de\1\56\1\151\2\uffff\7\56\1\u00e7"+
+        "\3\56\1\u00eb\4\56\1\u00f1\6\56\1\u00f8\1\u00f9\2\56\1\u00fc\1\56"+
+        "\1\u00fe\1\u00ff\1\u0100\1\u0101\3\uffff\1\56\1\u0103\2\56\1\uffff"+
+        "\1\56\1\uffff\1\u0107\1\56\3\uffff\2\56\1\uffff\2\56\1\uffff\1\56"+
+        "\1\u010e\1\56\3\uffff\2\56\1\uffff\1\56\1\uffff\1\u0113\1\u0114"+
+        "\1\u0115\4\56\1\u011a\1\uffff\1\u011b\1\56\1\u011d\1\uffff\1\u011e"+
+        "\1\u011f\1\56\1\u0121\1\56\1\uffff\4\56\1\u0127\1\u0128\2\uffff"+
+        "\2\56\1\uffff\1\56\4\uffff\1\56\1\uffff\1\u012d\1\u012e\1\56\1\uffff"+
+        "\1\u0130\1\56\1\u0132\2\56\1\u0135\1\uffff\1\u0136\2\56\1\u0139"+
+        "\3\uffff\4\56\2\uffff\1\56\3\uffff\1\56\1\uffff\1\u0140\1\56\1\u0142"+
+        "\1\56\1\u0144\2\uffff\1\56\1\u0146\2\56\2\uffff\1\u0149\1\uffff"+
+        "\1\u014a\1\uffff\2\56\2\uffff\1\u014d\1\u014e\1\uffff\1\u014f\1"+
+        "\u0150\1\u0151\1\u0152\1\u0153\1\u0154\1\uffff\1\u0155\1\uffff\1"+
+        "\u0156\1\uffff\1\56\1\uffff\1\u0158\1\56\2\uffff\1\u015a\1\56\12"+
+        "\uffff\1\u015c\1\uffff\1\56\1\uffff\1\u015e\1\uffff\1\u015f\2\uffff";
+    static final String DFA16_eofS =
+        "\u0160\uffff";
+    static final String DFA16_minS =
+        "\1\11\1\uffff\1\55\1\174\1\142\2\145\1\146\1\163\1\145\1\133\1\uffff"+
+        "\1\52\6\uffff\1\141\1\154\1\76\1\141\1\151\1\145\1\uffff\1\135\1"+
+        "\141\1\76\1\145\1\142\1\145\2\uffff\1\150\1\141\1\151\1\55\1\75"+
+        "\1\52\2\uffff\1\144\1\53\1\156\4\uffff\1\72\5\uffff\1\44\1\157\2"+
+        "\164\1\144\1\147\1\157\1\145\1\143\1\44\1\156\1\44\1\156\2\44\2"+
+        "\141\1\160\1\141\1\163\1\154\1\151\1\142\5\uffff\1\141\2\162\1\156"+
+        "\1\145\1\144\1\151\2\uffff\1\157\1\162\2\154\1\163\1\156\2\uffff"+
+        "\1\160\1\162\1\144\1\156\2\uffff\1\167\1\154\1\164\1\163\3\44\1"+
+        "\161\1\147\1\145\1\165\1\44\1\160\1\44\1\162\1\164\1\76\10\uffff"+
+        "\1\44\1\uffff\1\151\3\uffff\1\162\1\44\1\151\1\157\1\44\1\151\1"+
+        "\154\1\141\2\44\1\uffff\1\44\1\164\1\uffff\1\151\2\44\1\163\1\44"+
+        "\2\uffff\2\154\2\141\2\164\1\146\1\44\1\160\1\163\1\162\1\44\1\144"+
+        "\1\143\1\145\1\155\1\44\1\163\2\141\1\163\1\154\1\164\2\44\1\150"+
+        "\1\147\1\44\1\151\4\44\3\uffff\1\165\1\44\1\156\1\145\1\uffff\1"+
+        "\145\1\uffff\1\44\1\150\3\uffff\1\157\1\164\1\uffff\1\157\1\143"+
+        "\1\uffff\1\156\1\44\1\153\3\uffff\1\145\1\157\1\uffff\1\162\1\uffff"+
+        "\3\44\1\143\1\144\1\151\1\145\1\44\1\uffff\1\44\1\145\1\44\1\uffff"+
+        "\2\44\1\164\1\44\1\163\1\uffff\2\164\1\154\1\145\2\44\2\uffff\1"+
+        "\157\1\145\1\uffff\1\157\4\uffff\1\151\1\uffff\2\44\1\163\1\uffff"+
+        "\1\44\1\156\1\44\1\156\1\157\1\44\1\uffff\1\44\1\162\1\156\1\44"+
+        "\3\uffff\1\145\1\171\1\143\1\155\2\uffff\1\164\3\uffff\1\163\1\uffff"+
+        "\1\44\1\163\1\44\1\154\1\44\2\uffff\1\144\1\44\1\156\1\162\2\uffff"+
+        "\1\44\1\uffff\1\44\1\uffff\1\163\1\156\2\uffff\2\44\1\uffff\6\44"+
+        "\1\uffff\1\44\1\uffff\1\44\1\uffff\1\163\1\uffff\1\44\1\145\2\uffff"+
+        "\1\44\1\163\12\uffff\1\44\1\uffff\1\163\1\uffff\1\44\1\uffff\1\44"+
+        "\2\uffff";
+    static final String DFA16_maxS =
+        "\1\175\1\uffff\1\76\1\174\1\165\1\162\1\165\1\156\1\166\1\171\1"+
+        "\133\1\uffff\1\57\6\uffff\1\164\1\170\1\76\1\157\2\151\1\uffff\1"+
+        "\135\1\165\1\151\1\157\1\162\1\156\2\uffff\1\171\1\141\1\151\1\76"+
+        "\1\75\1\52\2\uffff\1\144\1\151\1\156\4\uffff\1\72\5\uffff\1\172"+
+        "\1\163\2\164\1\144\1\147\1\157\1\145\1\143\1\172\1\166\1\172\1\156"+
+        "\2\172\2\141\1\160\1\145\1\163\1\164\1\151\1\142\5\uffff\1\141\2"+
+        "\162\1\156\1\163\1\144\1\151\2\uffff\1\157\1\162\2\154\1\163\1\156"+
+        "\2\uffff\1\160\1\164\1\144\1\156\2\uffff\1\167\1\154\1\164\1\163"+
+        "\3\172\1\161\1\147\1\145\1\165\1\172\1\160\1\172\1\162\1\164\1\76"+
+        "\10\uffff\1\172\1\uffff\1\151\3\uffff\1\162\1\172\1\151\1\157\1"+
+        "\172\1\151\1\154\1\141\2\172\1\uffff\1\172\1\164\1\uffff\1\151\2"+
+        "\172\1\163\1\172\2\uffff\2\154\2\141\2\164\1\146\1\172\1\160\1\163"+
+        "\1\162\1\172\1\144\1\163\1\145\1\155\1\172\1\163\2\141\1\163\1\154"+
+        "\1\164\2\172\1\150\1\147\1\172\1\151\4\172\3\uffff\1\165\1\172\1"+
+        "\156\1\145\1\uffff\1\145\1\uffff\1\172\1\150\3\uffff\1\157\1\164"+
+        "\1\uffff\1\157\1\143\1\uffff\1\156\1\172\1\153\3\uffff\1\145\1\157"+
+        "\1\uffff\1\162\1\uffff\3\172\1\143\1\144\1\151\1\145\1\172\1\uffff"+
+        "\1\172\1\145\1\172\1\uffff\2\172\1\164\1\172\1\163\1\uffff\2\164"+
+        "\1\154\1\145\2\172\2\uffff\1\157\1\145\1\uffff\1\157\4\uffff\1\151"+
+        "\1\uffff\2\172\1\163\1\uffff\1\172\1\156\1\172\1\156\1\157\1\172"+
+        "\1\uffff\1\172\1\162\1\156\1\172\3\uffff\1\145\1\171\1\143\1\155"+
+        "\2\uffff\1\164\3\uffff\1\163\1\uffff\1\172\1\163\1\172\1\154\1\172"+
+        "\2\uffff\1\144\1\172\1\156\1\162\2\uffff\1\172\1\uffff\1\172\1\uffff"+
+        "\1\163\1\156\2\uffff\2\172\1\uffff\6\172\1\uffff\1\172\1\uffff\1"+
+        "\172\1\uffff\1\163\1\uffff\1\172\1\145\2\uffff\1\172\1\163\12\uffff"+
+        "\1\172\1\uffff\1\163\1\uffff\1\172\1\uffff\1\172\2\uffff";
+    static final String DFA16_acceptS =
+        "\1\uffff\1\1\11\uffff\1\13\1\uffff\1\15\1\16\1\17\1\26\1\27\1\31"+
+        "\6\uffff\1\53\6\uffff\1\70\1\75\6\uffff\1\131\1\133\3\uffff\1\163"+
+        "\1\164\1\2\1\22\1\uffff\1\150\1\155\1\30\1\3\1\71\27\uffff\1\12"+
+        "\1\24\1\14\1\66\1\116\7\uffff\1\111\1\41\6\uffff\1\62\1\54\4\uffff"+
+        "\1\56\1\162\21\uffff\1\113\1\152\1\153\1\122\1\120\1\117\1\125\1"+
+        "\126\1\uffff\1\143\1\uffff\1\147\1\156\1\4\12\uffff\1\36\2\uffff"+
+        "\1\127\5\uffff\1\47\1\46\41\uffff\1\64\1\65\1\114\4\uffff\1\103"+
+        "\1\uffff\1\145\2\uffff\1\110\1\123\1\137\2\uffff\1\115\2\uffff\1"+
+        "\107\3\uffff\1\6\1\151\1\121\2\uffff\1\7\1\uffff\1\50\10\uffff\1"+
+        "\74\3\uffff\1\34\5\uffff\1\40\6\uffff\1\142\1\55\2\uffff\1\124\1"+
+        "\uffff\1\60\1\61\1\112\1\63\1\uffff\1\154\3\uffff\1\105\6\uffff"+
+        "\1\25\4\uffff\1\140\1\10\1\32\4\uffff\1\73\1\77\1\uffff\1\33\1\130"+
+        "\1\132\1\uffff\1\37\5\uffff\1\51\1\52\4\uffff\1\101\1\102\1\uffff"+
+        "\1\106\1\uffff\1\20\2\uffff\1\5\1\100\2\uffff\1\141\6\uffff\1\136"+
+        "\1\uffff\1\43\1\uffff\1\45\1\uffff\1\157\2\uffff\1\104\1\146\2\uffff"+
+        "\1\134\1\135\1\72\1\11\1\76\1\35\1\144\1\161\1\42\1\44\1\uffff\1"+
+        "\160\1\uffff\1\21\1\uffff\1\57\1\uffff\1\23\1\67";
+    static final String DFA16_specialS =
+        "\u0160\uffff}>";
+    static final String[] DFA16_transitionS = {
+            "\2\13\1\uffff\2\13\22\uffff\1\13\1\uffff\1\17\1\15\1\56\1\uffff"+
+            "\1\1\1\16\1\31\1\40\1\47\1\53\1\22\1\34\1\55\1\14\12\55\1\2"+
+            "\1\41\1\45\1\25\1\46\2\uffff\32\56\1\32\1\51\1\3\1\50\1\56\1"+
+            "\uffff\1\4\1\5\1\23\1\6\1\24\1\26\1\56\1\52\1\7\1\56\1\27\1"+
+            "\30\1\33\1\35\1\36\1\56\1\10\1\37\1\11\1\42\1\54\1\43\1\44\3"+
+            "\56\1\20\1\12\1\21",
+            "",
+            "\1\63\14\uffff\1\57\1\uffff\1\62\1\60\1\61",
+            "\1\65",
+            "\1\70\1\71\12\uffff\1\73\4\uffff\1\67\1\uffff\1\72",
+            "\1\74\11\uffff\1\75\2\uffff\1\76",
+            "\1\77\3\uffff\1\101\5\uffff\1\100\4\uffff\1\102\1\103",
+            "\1\105\7\uffff\1\104",
+            "\1\110\1\uffff\1\107\1\106",
+            "\1\113\5\uffff\1\114\10\uffff\1\111\1\115\3\uffff\1\112",
+            "\1\116",
+            "",
+            "\1\120\4\uffff\1\121",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "\1\125\6\uffff\1\123\6\uffff\1\126\4\uffff\1\124",
+            "\1\127\1\uffff\1\130\11\uffff\1\131",
+            "\1\132",
+            "\1\136\12\uffff\1\134\2\uffff\1\135",
+            "\1\137",
+            "\1\141\3\uffff\1\140",
+            "",
+            "\1\142",
+            "\1\144\3\uffff\1\145\11\uffff\1\146\5\uffff\1\147",
+            "\1\150\52\uffff\1\151",
+            "\1\152\3\uffff\1\153\5\uffff\1\154",
+            "\1\155\1\uffff\1\156\1\uffff\1\157\13\uffff\1\160",
+            "\1\161\10\uffff\1\162",
+            "",
+            "",
+            "\1\163\3\uffff\1\167\2\uffff\1\165\2\uffff\1\164\6\uffff\1"+
+            "\166",
+            "\1\170",
+            "\1\171",
+            "\1\174\14\uffff\1\175\2\uffff\1\172\1\173",
+            "\1\177",
+            "\1\u0081",
+            "",
+            "",
+            "\1\u0083",
+            "\1\u0084\75\uffff\1\151",
+            "\1\u0085",
+            "",
+            "",
+            "",
+            "",
+            "\1\u0086",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0089\3\uffff\1\u008a",
+            "\1\u008b",
+            "\1\u008c",
+            "\1\u008d",
+            "\1\u008e",
+            "\1\u008f",
+            "\1\u0090",
+            "\1\u0091",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\14"+
+            "\56\1\u0092\15\56",
+            "\1\u0095\7\uffff\1\u0094",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0097",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\2\56"+
+            "\1\u0098\1\u009a\1\56\1\u009b\15\56\1\u0099\6\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u009e",
+            "\1\u009f",
+            "\1\u00a0",
+            "\1\u00a2\3\uffff\1\u00a1",
+            "\1\u00a3",
+            "\1\u00a4\7\uffff\1\u00a5",
+            "\1\u00a6",
+            "\1\u00a7",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "\1\u00a8",
+            "\1\u00a9",
+            "\1\u00aa",
+            "\1\u00ab",
+            "\1\u00ad\15\uffff\1\u00ac",
+            "\1\u00ae",
+            "\1\u00af",
+            "",
+            "",
+            "\1\u00b0",
+            "\1\u00b1",
+            "\1\u00b2",
+            "\1\u00b3",
+            "\1\u00b4",
+            "\1\u00b5",
+            "",
+            "",
+            "\1\u00b6",
+            "\1\u00b8\1\uffff\1\u00b7",
+            "\1\u00b9",
+            "\1\u00ba",
+            "",
+            "",
+            "\1\u00bb",
+            "\1\u00bc",
+            "\1\u00bd",
+            "\1\u00be",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u00c2",
+            "\1\u00c3",
+            "\1\u00c4",
+            "\1\u00c5",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u00c7",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u00c9",
+            "\1\u00ca",
+            "\1\u00cb",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\u00ce",
+            "",
+            "",
+            "",
+            "\1\u00cf",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u00d1",
+            "\1\u00d2",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u00d4",
+            "\1\u00d5",
+            "\1\u00d6",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u00da",
+            "",
+            "\1\u00db",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\4\56"+
+            "\1\u00dd\25\56",
+            "\1\u00df",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "",
+            "\1\u00e0",
+            "\1\u00e1",
+            "\1\u00e2",
+            "\1\u00e3",
+            "\1\u00e4",
+            "\1\u00e5",
+            "\1\u00e6",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u00e8",
+            "\1\u00e9",
+            "\1\u00ea",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u00ec",
+            "\1\u00ed\17\uffff\1\u00ee",
+            "\1\u00ef",
+            "\1\u00f0",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u00f2",
+            "\1\u00f3",
+            "\1\u00f4",
+            "\1\u00f5",
+            "\1\u00f6",
+            "\1\u00f7",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u00fa",
+            "\1\u00fb",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u00fd",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "",
+            "",
+            "\1\u0102",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0104",
+            "\1\u0105",
+            "",
+            "\1\u0106",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0108",
+            "",
+            "",
+            "",
+            "\1\u0109",
+            "\1\u010a",
+            "",
+            "\1\u010b",
+            "\1\u010c",
+            "",
+            "\1\u010d",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u010f",
+            "",
+            "",
+            "",
+            "\1\u0110",
+            "\1\u0111",
+            "",
+            "\1\u0112",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0116",
+            "\1\u0117",
+            "\1\u0118",
+            "\1\u0119",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u011c",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0120",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0122",
+            "",
+            "\1\u0123",
+            "\1\u0124",
+            "\1\u0125",
+            "\1\u0126",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "",
+            "\1\u0129",
+            "\1\u012a",
+            "",
+            "\1\u012b",
+            "",
+            "",
+            "",
+            "",
+            "\1\u012c",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u012f",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0131",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0133",
+            "\1\u0134",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0137",
+            "\1\u0138",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "",
+            "",
+            "\1\u013a",
+            "\1\u013b",
+            "\1\u013c",
+            "\1\u013d",
+            "",
+            "",
+            "\1\u013e",
+            "",
+            "",
+            "",
+            "\1\u013f",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0141",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0143",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "",
+            "\1\u0145",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0147",
+            "\1\u0148",
+            "",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\u014b",
+            "\1\u014c",
+            "",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\u0157",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u0159",
+            "",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "\1\u015b",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\u015d",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            "\1\56\13\uffff\12\56\7\uffff\32\56\4\uffff\1\56\1\uffff\32"+
+            "\56",
+            "",
+            ""
+    };
+
+    static final short[] DFA16_eot = DFA.unpackEncodedString(DFA16_eotS);
+    static final short[] DFA16_eof = DFA.unpackEncodedString(DFA16_eofS);
+    static final char[] DFA16_min = DFA.unpackEncodedStringToUnsignedChars(DFA16_minS);
+    static final char[] DFA16_max = DFA.unpackEncodedStringToUnsignedChars(DFA16_maxS);
+    static final short[] DFA16_accept = DFA.unpackEncodedString(DFA16_acceptS);
+    static final short[] DFA16_special = DFA.unpackEncodedString(DFA16_specialS);
+    static final short[][] DFA16_transition;
+
+    static {
+        int numStates = DFA16_transitionS.length;
+        DFA16_transition = new short[numStates][];
+        for (int i=0; i<numStates; i++) {
+            DFA16_transition[i] = DFA.unpackEncodedString(DFA16_transitionS[i]);
+        }
+    }
+
+    class DFA16 extends DFA {
+
+        public DFA16(BaseRecognizer recognizer) {
+            this.recognizer = recognizer;
+            this.decisionNumber = 16;
+            this.eot = DFA16_eot;
+            this.eof = DFA16_eof;
+            this.min = DFA16_min;
+            this.max = DFA16_max;
+            this.accept = DFA16_accept;
+            this.special = DFA16_special;
+            this.transition = DFA16_transition;
+        }
+        public String getDescription() {
+            return "1:1: Tokens : ( T__118 | T__119 | T__120 | T__121 | T__122 | T__123 | T__124 | T__125 | T__126 | T__127 | T_WS | T_COMMENT | LINE_COMMENT | T_PRIMED | T_STRINGLITERAL | T_ABORT | T_ACTIONS | T_ASSIGNMENT | T_AUTOCONS | T_BAR | T_BOOL | T_CBRL | T_CBRR | T_COLON | T_COMMA | T_CONT | T_CHAR | T_CTRL | T_SYSTEM | T_DO | T_ELSE | T_END | T_EQUAL | T_EXISTS | T_FLOAT | T_FORALL | T_FALSE | T_IF | T_IN | T_INT | T_KILL | T_LIST | T_LPAREN | T_LSQPAREN | T_MAP | T_MAPS | T_METHODS | T_NEW | T_NIL | T_NONDET | T_OBS | T_OD | T_OF | T_PRIO | T_REQUIRES | T_RPAREN | T_RSQPAREN | T_QUANTITY | T_SELF | T_SET | T_SEMICOLON | T_STATIC | T_SKIP | T_BREAK | T_THEN | T_TRUE | T_TO | T_TYPES | T_VAR | T_WITH | T_AND | T_BIIMPLIES | T_IMPLIES | T_NOT | T_NOTEQUAL | T_OR | T_ABS | T_DIV | T_GREATER | T_GREATEREQUAL | T_IDIV | T_LESS | T_LESSEQUAL | T_MOD | T_POW | T_PROD | T_DERIV | T_CARD | T_CONC | T_DCONC | T_DIFF | T_DINTER | T_DUNION | T_ELEMS | T_HEAD | T_INDS | T_INTER | T_LEN | T_SEQMOD_MAPOVERRIDE | T_SUBSET | T_TAIL | T_UNION | T_FOLDLR | T_FOLDRL | T_DOM | T_DOMRESBY | T_DOMRESTO | T_RNG | T_RNGRESBY | T_RNGRESTO | T_MERGE | T_MUNION | T_CONSTS | T_INFTY | FLOAT_OR_INT_OR_RANGE | T_IDENTIFIER );";
+        }
+    }
+ 
+
+}
\ No newline at end of file
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TypeConstructionExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TypeConstructionExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TypeConstructionExpression.java	(revision 2)
@@ -0,0 +1,44 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+///////////////////////////////////////////////
+///  constructors
+///
+public abstract class TypeConstructionExpression extends LeafExpression
+{
+	public TypeConstructionExpression(ExpressionKind aKind, int line, int pos)
+	{
+		super (LeafTypeEnum.complex, aKind, line, pos);
+	}
+
+	public TypeConstructionExpression(TypeConstructionExpression toCopy)
+	{
+		super (toCopy);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaActionClassifierVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaActionClassifierVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaActionClassifierVisitor.java	(revision 2)
@@ -0,0 +1,285 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import java.util.LinkedList;
+
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.statements.StatementKind;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.FunctionType.FunctionTypeEnum;
+import org.momut.ooas.parser.ParserMessage;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+
+/// <summary>
+/// This visitor scans all methods and named actions in order to check
+/// whether they are safe, in the sense that they are only using
+/// basic commands that obey the excluded miracle rule automatically.
+///
+/// The idea is that the weakest precondition of "safe named actions"
+/// automatically is the guard of the obligatorty guarded command.
+///
+/// Allowed commands for "safe" code:
+///    -> Assignment (deterministic!)
+///    -> Sequential Composition
+/// Currently not supported within the analysis:
+///    -> Conditional Statement (emulated by requires A: end [] requires not A: end)
+///    -> Iteration (not available)
+/// </summary>
+public final class OoaActionClassifierVisitor extends OoaCompleteAstTraversalVisitor
+{
+	private static final class RefWorkAround {
+		boolean m_hasUnsafeElement;
+		Statement ablock;
+		public RefWorkAround(boolean ue, Statement b) {
+			m_hasUnsafeElement = ue;
+			ablock = b;
+		}
+	}
+
+	private boolean getValue(Boolean input, boolean defaultValue) {
+		return input == null ? defaultValue: input;
+	}
+
+
+	@SuppressWarnings("serial")
+	private void CalcBodySafe(FunctionIdentifier methodIdentifier, FunctionType mType, final RefWorkAround w)
+	{
+		String methodAction;
+		if (mType.functionType() == FunctionTypeEnum.Method)
+			methodAction = "Method";
+		else
+			methodAction = "Action";
+
+
+		while ((w.ablock != null) && (w.ablock.kind() == StatementKind.PrioBlock || w.ablock.kind() == StatementKind.NondetBlock))
+		{
+			final Block block = (Block) w.ablock;
+			if (block.statements().size() == 0)
+				break;
+
+			if (block.statements().size() > 1)
+			{
+				m_ParserState.AddMessage(
+						new ParserMessage(m_ParserState.filename, w.ablock.line(),
+								w.ablock.pos(), String.format("%s %s extended: More than one element in Nondet/Prio Block.",
+										methodAction, methodIdentifier.tokenText())));
+				mType.SetMiracleSafe(false);
+			}
+			w.ablock = block.statements().peekFirst();
+		}
+
+		final LinkedList<Statement> stmts = w.ablock.kind() == StatementKind.SeqBlock ? ((Block) w.ablock).statements() : new LinkedList<Statement>(){{add(w.ablock);}};
+		for (final Statement s: stmts)
+		{
+			switch (s.kind())
+			{
+			case Abort:
+				// abort maps any postcondition to false, iow. wp(abort,X) = false
+				w.m_hasUnsafeElement = true; // excluded miracle holds, but I'm not sure about continuity.. *g*
+				m_ParserState.AddMessage(
+						new ParserMessage(m_ParserState.filename, w.ablock.line(),
+								w.ablock.pos(), String.format("%s %s extended: Abort detected.",
+										methodAction, methodIdentifier.tokenText())));
+				break;
+			case Assignment:
+				final Assignment ass = (Assignment)s;
+				w.m_hasUnsafeElement |= ass.nondetExpression() != null;
+				if (w.m_hasUnsafeElement)
+					m_ParserState.AddMessage(
+							new ParserMessage(m_ParserState.filename, w.ablock.line(),
+									w.ablock.pos(), String.format("%s %s extended: possibly nondeterministic assignment.",
+											methodAction, methodIdentifier.tokenText())));
+				// check value expressions
+				for (final Expression x: ass.values())
+				{
+					if (x.GetUninitializedFreeVariables().size() > 0)
+					{
+						w.m_hasUnsafeElement = true;
+						m_ParserState.AddMessage(
+								new ParserMessage(m_ParserState.filename, w.ablock.line(),
+										w.ablock.pos(), String.format("%s %s extended: uninitialized free variables in expression.",
+												methodAction, methodIdentifier.tokenText())));
+						continue;
+					}
+					for (final FunctionIdentifier ct: x.callTargets())
+					{
+						if ( ((FunctionType)ct.type()).isMiracleSafe() == null)
+							ct.Accept(this);
+						w.m_hasUnsafeElement |= getValue(((FunctionType)ct.type()).isMiracleSafe(), true);
+						if (w.m_hasUnsafeElement)
+							m_ParserState.AddMessage(
+									new ParserMessage(m_ParserState.filename, w.ablock.line(),
+											w.ablock.pos(), String.format("%s %s extended: call of extended method in value expression.",
+													methodAction, methodIdentifier.tokenText())));
+					}
+				}
+				break;
+			case GuardedCommand:
+				w.m_hasUnsafeElement = true; // we do not allow guarded commands in methods as they would be included in actions!
+				// we do not allow a second guarded command in named actions.
+				m_ParserState.AddMessage(
+						new ParserMessage(m_ParserState.filename, w.ablock.line(),
+								w.ablock.pos(), String.format("%s %s extended: guarded command detected.",
+										methodAction, methodIdentifier.tokenText())));
+				break;
+			case Kill:
+				w.m_hasUnsafeElement = true;
+				m_ParserState.AddMessage(
+						new ParserMessage(m_ParserState.filename, w.ablock.line(),
+								w.ablock.pos(), String.format("%s %s extended: Kill detected.",
+										methodAction, methodIdentifier.tokenText())));
+				break;
+			case MethodCall:
+				final Call acall = (Call)s;
+
+				for (final FunctionIdentifier anid: acall.callExpression().callTargets())
+				{
+					final FunctionType atype = (FunctionType)anid.type();
+					if (atype.isMiracleSafe() == null)
+						atype.identifier().Accept(this);
+					w.m_hasUnsafeElement |= getValue(atype.isMiracleSafe(), true);
+					if (w.m_hasUnsafeElement)
+						m_ParserState.AddMessage(
+								new ParserMessage(m_ParserState.filename, w.ablock.line(),
+										w.ablock.pos(), String.format("%s %s extended: calls extended method '%s'.",
+												methodAction, methodIdentifier.tokenText(),anid.tokenText())));
+				}
+				break;
+			case NondetBlock:
+				w.m_hasUnsafeElement = true;
+				m_ParserState.AddMessage(
+						new ParserMessage(m_ParserState.filename, w.ablock.line(),
+								w.ablock.pos(), String.format("%s %s extended: more than one nondet-block.",
+										methodAction, methodIdentifier.tokenText())));
+				break;
+			case PrioBlock:
+				w.m_hasUnsafeElement = true;
+				m_ParserState.AddMessage(
+						new ParserMessage(m_ParserState.filename, w.ablock.line(),
+								w.ablock.pos(), String.format("%s %s extended: more than one prio block.",
+										methodAction, methodIdentifier.tokenText())));
+				break;
+			case Skip:
+			case Break:
+				break;
+			case QualConstraint:
+				w.m_hasUnsafeElement = true;
+				break;
+			case SeqBlock:
+				// seq block in seq block should not occur..
+			default:
+				throw new NotImplementedException();
+			}
+			if (w.m_hasUnsafeElement)
+				break;
+		}
+	}
+
+
+	@Override
+	public void visit(MethodIdentifier methodIdentifier)
+	{
+		final FunctionType mType = (FunctionType)methodIdentifier.type();
+		if (mType.isMiracleSafe() != null)
+			return;
+
+		// AST of method may have one prioritized block before the nondet block
+		// both blocks must not have more than one element. (we do not implement conditional)
+		final RefWorkAround w = new RefWorkAround(false, methodIdentifier.body());
+		CalcBodySafe(methodIdentifier, mType, w);
+
+		/*
+        if (!m_hasUnsafeElement)
+            m_ParserState.AddMessage(
+                new ParserMessage(m_ParserState.filename, ablock.line,
+                    ablock.pos, String.Format("Found basic method: '%s'",
+                    methodIdentifier.tokenText)));
+		 */
+
+		mType.SetMiracleSafe(!w.m_hasUnsafeElement);
+	}
+
+
+	@Override
+	public void visit(NamedActionIdentifier namedActionIdentifier)
+	{
+		final FunctionType mType = (FunctionType)namedActionIdentifier.type();
+		if (mType.isMiracleSafe() != null)
+			return;
+
+		final RefWorkAround w = new RefWorkAround(false, namedActionIdentifier.body());
+
+		CalcBodySafe(namedActionIdentifier, mType, w);
+		/*
+        if (!hasUnsafeElement)
+            m_ParserState.AddMessage(
+                new ParserMessage(m_ParserState.filename, ablock.line,
+                    ablock.pos, String.Format("Found basic action: '%s'",
+                    namedActionIdentifier.tokenText)));
+		 */
+		mType.SetMiracleSafe(!w.m_hasUnsafeElement);
+	}
+
+	@Override
+	public void visit(OoActionSystemType ooActionSystemType)
+	{
+		super.visit(ooActionSystemType);
+		boolean allsafe = true;
+		for (final Identifier x: ooActionSystemType.symbols().symbolList())
+		{
+			if (x.kind() == IdentifierKind.MethodIdentifier
+					|| x.kind() == IdentifierKind.NamedActionIdentifier)
+			{
+				allsafe &= getValue(((FunctionType)x.type()).isMiracleSafe(), false);
+			}
+		}
+		if (allsafe)
+			m_ParserState.AddMessage(
+					new ParserMessage(m_ParserState.filename, ooActionSystemType.identifier().line(),
+							ooActionSystemType.identifier().column(), String.format("Found action system with basic actions/methods only: '%s'",
+									ooActionSystemType.identifier().tokenText())));
+	}
+
+
+	public OoaActionClassifierVisitor(ParserState aState)
+	{
+		super (aState);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/ArgumentException.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/ArgumentException.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/ArgumentException.java	(revision 2)
@@ -0,0 +1,37 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.utils.exceptions;
+
+
+public class ArgumentException extends OoasCompilerRuntimeException {
+
+	private static final long serialVersionUID = 1L;
+
+	public ArgumentException() {super();}
+	public ArgumentException(String s) {super(s);}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ValueExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ValueExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/ValueExpression.java	(revision 2)
@@ -0,0 +1,85 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.expressions;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+
+///////////////////////////////////////////////
+///  Some constant bool, int, float, char,
+///  qval or nil value
+///
+public final class ValueExpression<T> extends LeafExpression
+{
+	private final T m_value;
+
+	public T value() { return m_value; }
+	public final Class<T> m_clazz;
+
+	public ValueExpression(T aValue, int line, int pos, Class<T> clazz)
+	{
+		super(LeafTypeEnum.unset, ExpressionKind.Value, line, pos);
+		m_value = aValue;
+		if (Integer.class.isAssignableFrom(clazz))
+			m_valueType = LeafTypeEnum.integer;
+		else if (Boolean.class.isAssignableFrom(clazz))
+			m_valueType = LeafTypeEnum.bool;
+		else if (Double.class.isAssignableFrom(clazz))
+			m_valueType = LeafTypeEnum.real;
+		else if (Character.class.isAssignableFrom(clazz))
+			m_valueType = LeafTypeEnum.chr;
+		else if (QrType.class.isAssignableFrom(clazz))
+			m_valueType = LeafTypeEnum.qval;
+		else if (Object.class.isAssignableFrom(clazz))
+			m_valueType = LeafTypeEnum.reference;
+		else
+			throw new ArgumentException();
+
+		m_clazz = clazz;
+	}
+
+	public ValueExpression(ValueExpression<T> toCopy)
+	{
+		super(toCopy);
+		m_value = toCopy.m_value;
+		m_clazz = toCopy.m_clazz;
+	}
+
+	@Override
+	public /*override*/ Expression Clone()
+	{
+		return new ValueExpression<T>(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaEmptyVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaEmptyVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaEmptyVisitor.java	(revision 2)
@@ -0,0 +1,222 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.ExistsQuantifier;
+import org.momut.ooas.ast.expressions.ForallQuantifier;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.ListConstructor;
+import org.momut.ooas.ast.expressions.MapConstructor;
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+import org.momut.ooas.ast.expressions.QValConstructor;
+import org.momut.ooas.ast.expressions.SetConstructor;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.TypeExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.UnresolvedIdentifierExpression;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.ConstantIdentifier;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.identifiers.LocalVariableIdentifier;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.Module;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.NondetIdentifierList;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.identifiers.PrioIdentifierList;
+import org.momut.ooas.ast.identifiers.SelfTypeIdentifier;
+import org.momut.ooas.ast.identifiers.SeqIdentifierList;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.identifiers.UnspecIdentifierList;
+import org.momut.ooas.ast.statements.AbortStatement;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.BreakStatement;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.KillStatement;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.QualitativeConstraintStatement;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.SkipStatement;
+import org.momut.ooas.ast.types.AnyType;
+import org.momut.ooas.ast.types.BoolType;
+import org.momut.ooas.ast.types.CharType;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.NullType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+
+public class OoaEmptyVisitor implements IAstVisitor {
+	@Override
+	public String returnVisitorName() {
+		return this.getClass().getSimpleName();
+	}
+
+	@Override
+	public void done() {
+	}
+
+	@Override
+	public void visit(EnumIdentifier enumIdentifier)             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(LandmarkIdentifier landmarkIdentifier)     {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(AttributeIdentifier attributeIdentifier)   {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(ExpressionVariableIdentifier expressionVariableIdentifier) {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(ParameterIdentifier parameterIdentifier)   {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(LocalVariableIdentifier localVariableIdentifier) {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(TypeIdentifier typeIdentifier)             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(SelfTypeIdentifier typeIdentifier)         {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(MethodIdentifier methodIdentifier)         {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(NamedActionIdentifier namedActionIdentifier) {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(Module module)                             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(NondetIdentifierList nondetIdentifierList) {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(SeqIdentifierList seqIdentifierList)       {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(PrioIdentifierList prioIdentifierList)     {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(UnspecIdentifierList unspecIdentifierList) {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(ConstantIdentifier constantIdentifier)     {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(NondetBlock nondetBlock)                   {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(SeqBlock seqBlock)                         {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(PrioBlock prioBlock)                       {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(GuardedCommand guardedCommand)             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(Assignment assignment)                     {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(Call call)                                 {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(SkipStatement skipStatement)               {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(BreakStatement breakStatement)             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(AbortStatement abortStatement)             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(KillStatement killStatement)               {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(QualitativeConstraintStatement qalitativeConstraintStatement) {throw new UnsupportedOperationException();}
+	@Override
+	public <T> void visit(ValueExpression<T> valueExpression)    {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(UnresolvedIdentifierExpression unresolvedIdentifierExpression) {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(IdentifierExpression identifierExpression) {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(ListConstructor listConstructor)           {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(SetConstructor setConstructor)             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(MapConstructor mapConstructor)             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(TupleConstructor tupleConstructor)         {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(ObjectConstructor objectConstructor)       {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(QValConstructor qValConstructor)           {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(AccessExpression accessExpression)         {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(BinaryOperator binaryOperator)             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(TernaryOperator ternaryOperator)           {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(TupleMapAccessExpression tupleMapAccessExpression) {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(CallExpression callExpression)             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(ForallQuantifier quantifier)               {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(ExistsQuantifier quantifier)               {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(UnaryOperator unaryOperator)               {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(TypeExpression typeExpression)             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(CharType charType)                         {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(IntType intType)                           {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(BoolType boolType)                         {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(FloatType floatType)                       {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(EnumType enumType)                         {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(ListType listType)                         {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(MapType mapType)                           {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(QrType qrType)                             {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(TupleType tupleType)                       {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(FunctionType functionType)                 {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(OoActionSystemType ooActionSystemType)     {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(OpaqueType opaqueType)                     {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(AnyType anyType)                           {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(NullType nullType)                         {throw new UnsupportedOperationException();}
+	@Override
+	public void visit(MainModule mainModule)                     {throw new UnsupportedOperationException();}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooaParser.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooaParser.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooaParser.java	(revision 2)
@@ -0,0 +1,8071 @@
+// $ANTLR 3.4 C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g 2015-03-30 18:21:32
+
+ /*
+    Ulysses OO-Action System Parser
+
+    Copyright Graz University of Technology 2009
+    Copyright AIT Austrian Institute of Technology 2013
+ */
+ package org.momut.ooas.parser;
+
+ import org.momut.ooas.ast.expressions.*;
+ import org.momut.ooas.ast.statements.*;
+ import org.momut.ooas.ast.identifiers.*;
+ import org.momut.ooas.ast.types.*;
+ import org.momut.ooas.ast.types.FunctionType.FunctionTypeEnum;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings({"all", "warnings", "unchecked"})
+public class ooaParser extends ooaCustomParser {
+    public static final String[] tokenNames = new String[] {
+        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "FLOAT_OR_INT_OR_RANGE", "LINE_COMMENT", "T_ABORT", "T_ABS", "T_ACTIONS", "T_AND", "T_ASSIGNMENT", "T_AUTOCONS", "T_BAR", "T_BIIMPLIES", "T_BOOL", "T_BREAK", "T_CARD", "T_CBRL", "T_CBRR", "T_CHAR", "T_COLON", "T_COMMA", "T_COMMENT", "T_CONC", "T_CONSTS", "T_CONT", "T_CTRL", "T_DCONC", "T_DERIV", "T_DIFF", "T_DIGIT", "T_DINTER", "T_DIV", "T_DO", "T_DOM", "T_DOMRESBY", "T_DOMRESTO", "T_DUNION", "T_ELEMS", "T_ELSE", "T_END", "T_EQUAL", "T_EXISTS", "T_FALSE", "T_FLOAT", "T_FLOATNUMBER", "T_FOLDLR", "T_FOLDRL", "T_FORALL", "T_GREATER", "T_GREATEREQUAL", "T_HEAD", "T_IDENTIFIER", "T_IDIV", "T_IF", "T_IMPLIES", "T_IN", "T_INDS", "T_INFTY", "T_INT", "T_INTER", "T_INTNUMBER", "T_KILL", "T_LEN", "T_LESS", "T_LESSEQUAL", "T_LETTER", "T_LIST", "T_LPAREN", "T_LSQPAREN", "T_MAP", "T_MAPS", "T_MERGE", "T_METHODS", "T_MINUS", "T_MOD", "T_MUNION", "T_NEW", "T_NIL", "T_NONDET", "T_NOT", "T_NOTEQUAL", "T_OBS", "T_OD", "T_OF", "T_OR", "T_POINT", "T_POW", "T_PRIMED", "T_PRIO", "T_PROD", "T_QUANTITY", "T_RANGETO", "T_REQUIRES", "T_RNG", "T_RNGRESBY", "T_RNGRESTO", "T_RPAREN", "T_RSQPAREN", "T_SELF", "T_SEMICOLON", "T_SEQMOD_MAPOVERRIDE", "T_SET", "T_SKIP", "T_STATIC", "T_STRINGLITERAL", "T_SUBSET", "T_SUM", "T_SYSTEM", "T_TAIL", "T_THEN", "T_TO", "T_TRUE", "T_TYPES", "T_UNION", "T_VAR", "T_WITH", "T_WS", "'&'", "'::'", "']|'", "'as'", "'begin'", "'dec'", "'inc'", "'qval'", "'steady'", "'|['"
+    };
+
+    public static final int EOF=-1;
+    public static final int T__118=118;
+    public static final int T__119=119;
+    public static final int T__120=120;
+    public static final int T__121=121;
+    public static final int T__122=122;
+    public static final int T__123=123;
+    public static final int T__124=124;
+    public static final int T__125=125;
+    public static final int T__126=126;
+    public static final int T__127=127;
+    public static final int FLOAT_OR_INT_OR_RANGE=4;
+    public static final int LINE_COMMENT=5;
+    public static final int T_ABORT=6;
+    public static final int T_ABS=7;
+    public static final int T_ACTIONS=8;
+    public static final int T_AND=9;
+    public static final int T_ASSIGNMENT=10;
+    public static final int T_AUTOCONS=11;
+    public static final int T_BAR=12;
+    public static final int T_BIIMPLIES=13;
+    public static final int T_BOOL=14;
+    public static final int T_BREAK=15;
+    public static final int T_CARD=16;
+    public static final int T_CBRL=17;
+    public static final int T_CBRR=18;
+    public static final int T_CHAR=19;
+    public static final int T_COLON=20;
+    public static final int T_COMMA=21;
+    public static final int T_COMMENT=22;
+    public static final int T_CONC=23;
+    public static final int T_CONSTS=24;
+    public static final int T_CONT=25;
+    public static final int T_CTRL=26;
+    public static final int T_DCONC=27;
+    public static final int T_DERIV=28;
+    public static final int T_DIFF=29;
+    public static final int T_DIGIT=30;
+    public static final int T_DINTER=31;
+    public static final int T_DIV=32;
+    public static final int T_DO=33;
+    public static final int T_DOM=34;
+    public static final int T_DOMRESBY=35;
+    public static final int T_DOMRESTO=36;
+    public static final int T_DUNION=37;
+    public static final int T_ELEMS=38;
+    public static final int T_ELSE=39;
+    public static final int T_END=40;
+    public static final int T_EQUAL=41;
+    public static final int T_EXISTS=42;
+    public static final int T_FALSE=43;
+    public static final int T_FLOAT=44;
+    public static final int T_FLOATNUMBER=45;
+    public static final int T_FOLDLR=46;
+    public static final int T_FOLDRL=47;
+    public static final int T_FORALL=48;
+    public static final int T_GREATER=49;
+    public static final int T_GREATEREQUAL=50;
+    public static final int T_HEAD=51;
+    public static final int T_IDENTIFIER=52;
+    public static final int T_IDIV=53;
+    public static final int T_IF=54;
+    public static final int T_IMPLIES=55;
+    public static final int T_IN=56;
+    public static final int T_INDS=57;
+    public static final int T_INFTY=58;
+    public static final int T_INT=59;
+    public static final int T_INTER=60;
+    public static final int T_INTNUMBER=61;
+    public static final int T_KILL=62;
+    public static final int T_LEN=63;
+    public static final int T_LESS=64;
+    public static final int T_LESSEQUAL=65;
+    public static final int T_LETTER=66;
+    public static final int T_LIST=67;
+    public static final int T_LPAREN=68;
+    public static final int T_LSQPAREN=69;
+    public static final int T_MAP=70;
+    public static final int T_MAPS=71;
+    public static final int T_MERGE=72;
+    public static final int T_METHODS=73;
+    public static final int T_MINUS=74;
+    public static final int T_MOD=75;
+    public static final int T_MUNION=76;
+    public static final int T_NEW=77;
+    public static final int T_NIL=78;
+    public static final int T_NONDET=79;
+    public static final int T_NOT=80;
+    public static final int T_NOTEQUAL=81;
+    public static final int T_OBS=82;
+    public static final int T_OD=83;
+    public static final int T_OF=84;
+    public static final int T_OR=85;
+    public static final int T_POINT=86;
+    public static final int T_POW=87;
+    public static final int T_PRIMED=88;
+    public static final int T_PRIO=89;
+    public static final int T_PROD=90;
+    public static final int T_QUANTITY=91;
+    public static final int T_RANGETO=92;
+    public static final int T_REQUIRES=93;
+    public static final int T_RNG=94;
+    public static final int T_RNGRESBY=95;
+    public static final int T_RNGRESTO=96;
+    public static final int T_RPAREN=97;
+    public static final int T_RSQPAREN=98;
+    public static final int T_SELF=99;
+    public static final int T_SEMICOLON=100;
+    public static final int T_SEQMOD_MAPOVERRIDE=101;
+    public static final int T_SET=102;
+    public static final int T_SKIP=103;
+    public static final int T_STATIC=104;
+    public static final int T_STRINGLITERAL=105;
+    public static final int T_SUBSET=106;
+    public static final int T_SUM=107;
+    public static final int T_SYSTEM=108;
+    public static final int T_TAIL=109;
+    public static final int T_THEN=110;
+    public static final int T_TO=111;
+    public static final int T_TRUE=112;
+    public static final int T_TYPES=113;
+    public static final int T_UNION=114;
+    public static final int T_VAR=115;
+    public static final int T_WITH=116;
+    public static final int T_WS=117;
+
+    // delegates
+    public ooaCustomParser[] getDelegates() {
+        return new ooaCustomParser[] {};
+    }
+
+    // delegators
+
+
+    public ooaParser(TokenStream input) {
+        this(input, new RecognizerSharedState());
+    }
+    public ooaParser(TokenStream input, RecognizerSharedState state) {
+        super(input, state);
+    }
+
+    public String[] getTokenNames() { return ooaParser.tokenNames; }
+    public String getGrammarFileName() { return "C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g"; }
+
+
+
+    // $ANTLR start "ooActionSystems"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:152:1: ooActionSystems : ( T_CONSTS namedConstList )? T_TYPES namedTypeList T_SYSTEM comp= asTypeComposition[null] ;
+    public final void ooActionSystems()  {
+        IdentifierList comp =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:153:2: ( ( T_CONSTS namedConstList )? T_TYPES namedTypeList T_SYSTEM comp= asTypeComposition[null] )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:153:4: ( T_CONSTS namedConstList )? T_TYPES namedTypeList T_SYSTEM comp= asTypeComposition[null]
+            {
+            initializeTopLevelParserState();
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:155:11: ( T_CONSTS namedConstList )?
+            int alt1=2;
+            int LA1_0 = input.LA(1);
+
+            if ( (LA1_0==T_CONSTS) ) {
+                alt1=1;
+            }
+            switch (alt1) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:155:12: T_CONSTS namedConstList
+                    {
+                    match(input,T_CONSTS,FOLLOW_T_CONSTS_in_ooActionSystems74); 
+
+                    pushFollow(FOLLOW_namedConstList_in_ooActionSystems76);
+                    namedConstList();
+
+                    state._fsp--;
+
+
+                    }
+                    break;
+
+            }
+
+
+            match(input,T_TYPES,FOLLOW_T_TYPES_in_ooActionSystems86); 
+
+            pushFollow(FOLLOW_namedTypeList_in_ooActionSystems94);
+            namedTypeList();
+
+            state._fsp--;
+
+
+            match(input,T_SYSTEM,FOLLOW_T_SYSTEM_in_ooActionSystems99); 
+
+            pushFollow(FOLLOW_asTypeComposition_in_ooActionSystems106);
+            comp=asTypeComposition(null);
+
+            state._fsp--;
+
+
+            fixUpRun(comp);
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "ooActionSystems"
+
+
+
+    // $ANTLR start "namedConstList"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:170:1: namedConstList : namedConst ( T_SEMICOLON namedConst )* ;
+    public final void namedConstList() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:171:2: ( namedConst ( T_SEMICOLON namedConst )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:171:4: namedConst ( T_SEMICOLON namedConst )*
+            {
+            pushFollow(FOLLOW_namedConst_in_namedConstList129);
+            namedConst();
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:171:15: ( T_SEMICOLON namedConst )*
+            loop2:
+            do {
+                int alt2=2;
+                int LA2_0 = input.LA(1);
+
+                if ( (LA2_0==T_SEMICOLON) ) {
+                    alt2=1;
+                }
+
+
+                switch (alt2) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:171:16: T_SEMICOLON namedConst
+            	    {
+            	    match(input,T_SEMICOLON,FOLLOW_T_SEMICOLON_in_namedConstList132); 
+
+            	    pushFollow(FOLLOW_namedConst_in_namedConstList134);
+            	    namedConst();
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop2;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "namedConstList"
+
+
+
+    // $ANTLR start "namedConst"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:174:1: namedConst : aName= T_IDENTIFIER T_EQUAL anExpr= expression ;
+    public final void namedConst() throws RecognitionException {
+        Token aName=null;
+        Expression anExpr =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:175:2: (aName= T_IDENTIFIER T_EQUAL anExpr= expression )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:175:4: aName= T_IDENTIFIER T_EQUAL anExpr= expression
+            {
+            aName=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_namedConst150); 
+
+            match(input,T_EQUAL,FOLLOW_T_EQUAL_in_namedConst154); 
+
+            pushFollow(FOLLOW_expression_in_namedConst160);
+            anExpr=expression();
+
+            state._fsp--;
+
+
+            addNamedConst(aName,anExpr);
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "namedConst"
+
+
+
+    // $ANTLR start "namedTypeList"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:185:1: namedTypeList : namedType ( T_SEMICOLON namedType )* ;
+    public final void namedTypeList() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:186:2: ( namedType ( T_SEMICOLON namedType )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:186:4: namedType ( T_SEMICOLON namedType )*
+            {
+            pushFollow(FOLLOW_namedType_in_namedTypeList180);
+            namedType();
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:186:14: ( T_SEMICOLON namedType )*
+            loop3:
+            do {
+                int alt3=2;
+                int LA3_0 = input.LA(1);
+
+                if ( (LA3_0==T_SEMICOLON) ) {
+                    alt3=1;
+                }
+
+
+                switch (alt3) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:186:15: T_SEMICOLON namedType
+            	    {
+            	    match(input,T_SEMICOLON,FOLLOW_T_SEMICOLON_in_namedTypeList183); 
+
+            	    pushFollow(FOLLOW_namedType_in_namedTypeList185);
+            	    namedType();
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop3;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "namedTypeList"
+
+
+
+    // $ANTLR start "namedType"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:189:1: namedType : aName= T_IDENTIFIER T_EQUAL (aType= complexType |anOoaType= ooActionSystem ) ;
+    public final void namedType() throws RecognitionException {
+        Token aName=null;
+        UlyssesType aType =null;
+
+        OoActionSystemType anOoaType =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:190:2: (aName= T_IDENTIFIER T_EQUAL (aType= complexType |anOoaType= ooActionSystem ) )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:190:4: aName= T_IDENTIFIER T_EQUAL (aType= complexType |anOoaType= ooActionSystem )
+            {
+            aName=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_namedType201); 
+
+            match(input,T_EQUAL,FOLLOW_T_EQUAL_in_namedType206); 
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:192:3: (aType= complexType |anOoaType= ooActionSystem )
+            int alt4=2;
+            int LA4_0 = input.LA(1);
+
+            if ( (LA4_0==T_BOOL||LA4_0==T_CBRL||LA4_0==T_CHAR||LA4_0==T_FLOAT||LA4_0==T_IDENTIFIER||LA4_0==T_INT||(LA4_0 >= T_LIST && LA4_0 <= T_MAP)||LA4_0==T_QUANTITY) ) {
+                alt4=1;
+            }
+            else if ( (LA4_0==T_AUTOCONS||LA4_0==T_SYSTEM) ) {
+                alt4=2;
+            }
+            else {
+                NoViableAltException nvae =
+                    new NoViableAltException("", 4, 0, input);
+
+                throw nvae;
+
+            }
+            switch (alt4) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:193:4: aType= complexType
+                    {
+                    pushFollow(FOLLOW_complexType_in_namedType218);
+                    aType=complexType();
+
+                    state._fsp--;
+
+
+                    createNamedType(aName,aType);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:194:5: anOoaType= ooActionSystem
+                    {
+                    pushFollow(FOLLOW_ooActionSystem_in_namedType230);
+                    anOoaType=ooActionSystem();
+
+                    state._fsp--;
+
+
+                    createNamedType(aName,anOoaType);
+
+                    }
+                    break;
+
+            }
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "namedType"
+
+
+
+    // $ANTLR start "asTypeComposition"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:200:1: asTypeComposition[IdentifierList top] returns [IdentifierList prioList] : asTypeCompositionParallel[prioList] ( T_PRIO asTypeCompositionParallel[prioList] )* ;
+    public final IdentifierList asTypeComposition(IdentifierList top) throws RecognitionException {
+        IdentifierList prioList = null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:202:2: ( asTypeCompositionParallel[prioList] ( T_PRIO asTypeCompositionParallel[prioList] )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:202:6: asTypeCompositionParallel[prioList] ( T_PRIO asTypeCompositionParallel[prioList] )*
+            {
+            prioList = new PrioIdentifierList(top);
+
+            pushFollow(FOLLOW_asTypeCompositionParallel_in_asTypeComposition266);
+            asTypeCompositionParallel(prioList);
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:203:40: ( T_PRIO asTypeCompositionParallel[prioList] )*
+            loop5:
+            do {
+                int alt5=2;
+                int LA5_0 = input.LA(1);
+
+                if ( (LA5_0==T_PRIO) ) {
+                    alt5=1;
+                }
+
+
+                switch (alt5) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:203:41: T_PRIO asTypeCompositionParallel[prioList]
+            	    {
+            	    match(input,T_PRIO,FOLLOW_T_PRIO_in_asTypeComposition271); 
+
+            	    pushFollow(FOLLOW_asTypeCompositionParallel_in_asTypeComposition273);
+            	    asTypeCompositionParallel(prioList);
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop5;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return prioList;
+    }
+    // $ANTLR end "asTypeComposition"
+
+
+
+    // $ANTLR start "asTypeCompositionParallel"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:206:1: asTypeCompositionParallel[IdentifierList top] : asTypeCompositionSequential[parList] ( T_NONDET asTypeCompositionSequential[parList] )* ;
+    public final void asTypeCompositionParallel(IdentifierList top) throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:207:2: ( asTypeCompositionSequential[parList] ( T_NONDET asTypeCompositionSequential[parList] )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:207:6: asTypeCompositionSequential[parList] ( T_NONDET asTypeCompositionSequential[parList] )*
+            {
+            IdentifierList parList = new NondetIdentifierList(top);
+
+            pushFollow(FOLLOW_asTypeCompositionSequential_in_asTypeCompositionParallel296);
+            asTypeCompositionSequential(parList);
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:208:40: ( T_NONDET asTypeCompositionSequential[parList] )*
+            loop6:
+            do {
+                int alt6=2;
+                int LA6_0 = input.LA(1);
+
+                if ( (LA6_0==T_NONDET) ) {
+                    alt6=1;
+                }
+
+
+                switch (alt6) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:208:41: T_NONDET asTypeCompositionSequential[parList]
+            	    {
+            	    match(input,T_NONDET,FOLLOW_T_NONDET_in_asTypeCompositionParallel300); 
+
+            	    pushFollow(FOLLOW_asTypeCompositionSequential_in_asTypeCompositionParallel302);
+            	    asTypeCompositionSequential(parList);
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop6;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "asTypeCompositionParallel"
+
+
+
+    // $ANTLR start "asTypeCompositionSequential"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:211:1: asTypeCompositionSequential[IdentifierList top] : asTypeCompositionBlockParen[seqList] ;
+    public final void asTypeCompositionSequential(IdentifierList top) throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:212:2: ( asTypeCompositionBlockParen[seqList] )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:212:6: asTypeCompositionBlockParen[seqList]
+            {
+            IdentifierList seqList = new SeqIdentifierList(top);
+
+            pushFollow(FOLLOW_asTypeCompositionBlockParen_in_asTypeCompositionSequential324);
+            asTypeCompositionBlockParen(seqList);
+
+            state._fsp--;
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "asTypeCompositionSequential"
+
+
+
+    // $ANTLR start "asTypeCompositionBlockParen"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:216:1: asTypeCompositionBlockParen[IdentifierList top] : ( T_LPAREN asTypeComposition[top] T_RPAREN |aName= T_IDENTIFIER );
+    public final void asTypeCompositionBlockParen(IdentifierList top) throws RecognitionException {
+        Token aName=null;
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:217:2: ( T_LPAREN asTypeComposition[top] T_RPAREN |aName= T_IDENTIFIER )
+            int alt7=2;
+            int LA7_0 = input.LA(1);
+
+            if ( (LA7_0==T_LPAREN) ) {
+                alt7=1;
+            }
+            else if ( (LA7_0==T_IDENTIFIER) ) {
+                alt7=2;
+            }
+            else {
+                NoViableAltException nvae =
+                    new NoViableAltException("", 7, 0, input);
+
+                throw nvae;
+
+            }
+            switch (alt7) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:217:4: T_LPAREN asTypeComposition[top] T_RPAREN
+                    {
+                    match(input,T_LPAREN,FOLLOW_T_LPAREN_in_asTypeCompositionBlockParen339); 
+
+                    pushFollow(FOLLOW_asTypeComposition_in_asTypeCompositionBlockParen341);
+                    asTypeComposition(top);
+
+                    state._fsp--;
+
+
+                    match(input,T_RPAREN,FOLLOW_T_RPAREN_in_asTypeCompositionBlockParen344); 
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:218:4: aName= T_IDENTIFIER
+                    {
+                    aName=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_asTypeCompositionBlockParen351); 
+
+                    addToIdentifierList(top,aName);
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "asTypeCompositionBlockParen"
+
+
+
+    // $ANTLR start "complexType"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:226:1: complexType returns [UlyssesType aTypeSymbol] : ( T_LIST T_LSQPAREN numOfElements= ( T_INTNUMBER | T_IDENTIFIER ) T_RSQPAREN T_OF innertype= complexType | T_LSQPAREN alistelem= T_IDENTIFIER ( T_COMMA otherlistelem= T_IDENTIFIER )* T_RSQPAREN | T_MAP ( T_LSQPAREN numOfElements= ( T_INTNUMBER | T_IDENTIFIER ) T_RSQPAREN )? mapfromtype= simpleType T_TO maptotype= complexType | T_QUANTITY T_OF T_LSQPAREN (alandmark= T_IDENTIFIER |alandmark= T_MINUS T_INFTY ) ( T_COMMA (otherlandmark= T_IDENTIFIER |otherlandmark= T_INFTY ) )* T_RSQPAREN | T_LPAREN aType= complexType ( T_COMMA anotherType= complexType )* T_RPAREN |r= simpleType );
+    public final UlyssesType complexType() throws RecognitionException {
+        UlyssesType aTypeSymbol = null;
+
+
+        Token numOfElements=null;
+        Token alistelem=null;
+        Token otherlistelem=null;
+        Token alandmark=null;
+        Token otherlandmark=null;
+        UlyssesType innertype =null;
+
+        UlyssesType mapfromtype =null;
+
+        UlyssesType maptotype =null;
+
+        UlyssesType aType =null;
+
+        UlyssesType anotherType =null;
+
+        UlyssesType r =null;
+
+
+         
+        		aTypeSymbol = null;
+        		alandmark = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:232:2: ( T_LIST T_LSQPAREN numOfElements= ( T_INTNUMBER | T_IDENTIFIER ) T_RSQPAREN T_OF innertype= complexType | T_LSQPAREN alistelem= T_IDENTIFIER ( T_COMMA otherlistelem= T_IDENTIFIER )* T_RSQPAREN | T_MAP ( T_LSQPAREN numOfElements= ( T_INTNUMBER | T_IDENTIFIER ) T_RSQPAREN )? mapfromtype= simpleType T_TO maptotype= complexType | T_QUANTITY T_OF T_LSQPAREN (alandmark= T_IDENTIFIER |alandmark= T_MINUS T_INFTY ) ( T_COMMA (otherlandmark= T_IDENTIFIER |otherlandmark= T_INFTY ) )* T_RSQPAREN | T_LPAREN aType= complexType ( T_COMMA anotherType= complexType )* T_RPAREN |r= simpleType )
+            int alt14=6;
+            switch ( input.LA(1) ) {
+            case T_LIST:
+                {
+                alt14=1;
+                }
+                break;
+            case T_LSQPAREN:
+                {
+                alt14=2;
+                }
+                break;
+            case T_MAP:
+                {
+                alt14=3;
+                }
+                break;
+            case T_QUANTITY:
+                {
+                alt14=4;
+                }
+                break;
+            case T_LPAREN:
+                {
+                alt14=5;
+                }
+                break;
+            case T_BOOL:
+            case T_CBRL:
+            case T_CHAR:
+            case T_FLOAT:
+            case T_IDENTIFIER:
+            case T_INT:
+                {
+                alt14=6;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 14, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt14) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:232:4: T_LIST T_LSQPAREN numOfElements= ( T_INTNUMBER | T_IDENTIFIER ) T_RSQPAREN T_OF innertype= complexType
+                    {
+                    match(input,T_LIST,FOLLOW_T_LIST_in_complexType382); 
+
+                    match(input,T_LSQPAREN,FOLLOW_T_LSQPAREN_in_complexType385); 
+
+                    numOfElements=(Token)input.LT(1);
+
+                    if ( input.LA(1)==T_IDENTIFIER||input.LA(1)==T_INTNUMBER ) {
+                        input.consume();
+                        state.errorRecovery=false;
+                    }
+                    else {
+                        MismatchedSetException mse = new MismatchedSetException(null,input);
+                        throw mse;
+                    }
+
+
+                    match(input,T_RSQPAREN,FOLLOW_T_RSQPAREN_in_complexType395); 
+
+                    match(input,T_OF,FOLLOW_T_OF_in_complexType397); 
+
+                    pushFollow(FOLLOW_complexType_in_complexType402);
+                    innertype=complexType();
+
+                    state._fsp--;
+
+
+                    aTypeSymbol = createListType(numOfElements,innertype);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:236:4: T_LSQPAREN alistelem= T_IDENTIFIER ( T_COMMA otherlistelem= T_IDENTIFIER )* T_RSQPAREN
+                    {
+                    match(input,T_LSQPAREN,FOLLOW_T_LSQPAREN_in_complexType417); 
+
+                    alistelem=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_complexType421); 
+
+                    aTypeSymbol = createListEnumType(alistelem);
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:237:4: ( T_COMMA otherlistelem= T_IDENTIFIER )*
+                    loop8:
+                    do {
+                        int alt8=2;
+                        int LA8_0 = input.LA(1);
+
+                        if ( (LA8_0==T_COMMA) ) {
+                            alt8=1;
+                        }
+
+
+                        switch (alt8) {
+                    	case 1 :
+                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:237:5: T_COMMA otherlistelem= T_IDENTIFIER
+                    	    {
+                    	    match(input,T_COMMA,FOLLOW_T_COMMA_in_complexType430); 
+
+                    	    otherlistelem=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_complexType434); 
+
+                    	    addToListEnumType(aTypeSymbol,otherlistelem);
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop8;
+                        }
+                    } while (true);
+
+
+                    match(input,T_RSQPAREN,FOLLOW_T_RSQPAREN_in_complexType440); 
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:240:4: T_MAP ( T_LSQPAREN numOfElements= ( T_INTNUMBER | T_IDENTIFIER ) T_RSQPAREN )? mapfromtype= simpleType T_TO maptotype= complexType
+                    {
+                    match(input,T_MAP,FOLLOW_T_MAP_in_complexType450); 
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:240:12: ( T_LSQPAREN numOfElements= ( T_INTNUMBER | T_IDENTIFIER ) T_RSQPAREN )?
+                    int alt9=2;
+                    int LA9_0 = input.LA(1);
+
+                    if ( (LA9_0==T_LSQPAREN) ) {
+                        alt9=1;
+                    }
+                    switch (alt9) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:240:13: T_LSQPAREN numOfElements= ( T_INTNUMBER | T_IDENTIFIER ) T_RSQPAREN
+                            {
+                            match(input,T_LSQPAREN,FOLLOW_T_LSQPAREN_in_complexType455); 
+
+                            numOfElements=(Token)input.LT(1);
+
+                            if ( input.LA(1)==T_IDENTIFIER||input.LA(1)==T_INTNUMBER ) {
+                                input.consume();
+                                state.errorRecovery=false;
+                            }
+                            else {
+                                MismatchedSetException mse = new MismatchedSetException(null,input);
+                                throw mse;
+                            }
+
+
+                            match(input,T_RSQPAREN,FOLLOW_T_RSQPAREN_in_complexType465); 
+
+                            }
+                            break;
+
+                    }
+
+
+                    pushFollow(FOLLOW_simpleType_in_complexType471);
+                    mapfromtype=simpleType();
+
+                    state._fsp--;
+
+
+                    match(input,T_TO,FOLLOW_T_TO_in_complexType473); 
+
+                    pushFollow(FOLLOW_complexType_in_complexType477);
+                    maptotype=complexType();
+
+                    state._fsp--;
+
+
+                    aTypeSymbol = createMapType(numOfElements,mapfromtype,maptotype);
+
+                    }
+                    break;
+                case 4 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:243:4: T_QUANTITY T_OF T_LSQPAREN (alandmark= T_IDENTIFIER |alandmark= T_MINUS T_INFTY ) ( T_COMMA (otherlandmark= T_IDENTIFIER |otherlandmark= T_INFTY ) )* T_RSQPAREN
+                    {
+                    match(input,T_QUANTITY,FOLLOW_T_QUANTITY_in_complexType491); 
+
+                    match(input,T_OF,FOLLOW_T_OF_in_complexType493); 
+
+                    match(input,T_LSQPAREN,FOLLOW_T_LSQPAREN_in_complexType495); 
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:243:31: (alandmark= T_IDENTIFIER |alandmark= T_MINUS T_INFTY )
+                    int alt10=2;
+                    int LA10_0 = input.LA(1);
+
+                    if ( (LA10_0==T_IDENTIFIER) ) {
+                        alt10=1;
+                    }
+                    else if ( (LA10_0==T_MINUS) ) {
+                        alt10=2;
+                    }
+                    else {
+                        NoViableAltException nvae =
+                            new NoViableAltException("", 10, 0, input);
+
+                        throw nvae;
+
+                    }
+                    switch (alt10) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:243:32: alandmark= T_IDENTIFIER
+                            {
+                            alandmark=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_complexType500); 
+
+                            }
+                            break;
+                        case 2 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:243:56: alandmark= T_MINUS T_INFTY
+                            {
+                            alandmark=(Token)match(input,T_MINUS,FOLLOW_T_MINUS_in_complexType505); 
+
+                            match(input,T_INFTY,FOLLOW_T_INFTY_in_complexType507); 
+
+                            }
+                            break;
+
+                    }
+
+
+                    aTypeSymbol = createQrType(alandmark);
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:244:4: ( T_COMMA (otherlandmark= T_IDENTIFIER |otherlandmark= T_INFTY ) )*
+                    loop12:
+                    do {
+                        int alt12=2;
+                        int LA12_0 = input.LA(1);
+
+                        if ( (LA12_0==T_COMMA) ) {
+                            alt12=1;
+                        }
+
+
+                        switch (alt12) {
+                    	case 1 :
+                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:244:5: T_COMMA (otherlandmark= T_IDENTIFIER |otherlandmark= T_INFTY )
+                    	    {
+                    	    match(input,T_COMMA,FOLLOW_T_COMMA_in_complexType517); 
+
+                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:244:13: (otherlandmark= T_IDENTIFIER |otherlandmark= T_INFTY )
+                    	    int alt11=2;
+                    	    int LA11_0 = input.LA(1);
+
+                    	    if ( (LA11_0==T_IDENTIFIER) ) {
+                    	        alt11=1;
+                    	    }
+                    	    else if ( (LA11_0==T_INFTY) ) {
+                    	        alt11=2;
+                    	    }
+                    	    else {
+                    	        NoViableAltException nvae =
+                    	            new NoViableAltException("", 11, 0, input);
+
+                    	        throw nvae;
+
+                    	    }
+                    	    switch (alt11) {
+                    	        case 1 :
+                    	            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:244:14: otherlandmark= T_IDENTIFIER
+                    	            {
+                    	            otherlandmark=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_complexType522); 
+
+                    	            }
+                    	            break;
+                    	        case 2 :
+                    	            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:244:41: otherlandmark= T_INFTY
+                    	            {
+                    	            otherlandmark=(Token)match(input,T_INFTY,FOLLOW_T_INFTY_in_complexType526); 
+
+                    	            }
+                    	            break;
+
+                    	    }
+
+
+                    	    addToQrType(aTypeSymbol,otherlandmark);
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop12;
+                        }
+                    } while (true);
+
+
+                    match(input,T_RSQPAREN,FOLLOW_T_RSQPAREN_in_complexType533); 
+
+                    }
+                    break;
+                case 5 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:246:5: T_LPAREN aType= complexType ( T_COMMA anotherType= complexType )* T_RPAREN
+                    {
+                    match(input,T_LPAREN,FOLLOW_T_LPAREN_in_complexType543); 
+
+                    pushFollow(FOLLOW_complexType_in_complexType547);
+                    aType=complexType();
+
+                    state._fsp--;
+
+
+                    aTypeSymbol = createTupleType(aType);
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:247:4: ( T_COMMA anotherType= complexType )*
+                    loop13:
+                    do {
+                        int alt13=2;
+                        int LA13_0 = input.LA(1);
+
+                        if ( (LA13_0==T_COMMA) ) {
+                            alt13=1;
+                        }
+
+
+                        switch (alt13) {
+                    	case 1 :
+                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:247:5: T_COMMA anotherType= complexType
+                    	    {
+                    	    match(input,T_COMMA,FOLLOW_T_COMMA_in_complexType556); 
+
+                    	    pushFollow(FOLLOW_complexType_in_complexType560);
+                    	    anotherType=complexType();
+
+                    	    state._fsp--;
+
+
+                    	    addToTupleType(aTypeSymbol,anotherType);
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop13;
+                        }
+                    } while (true);
+
+
+                    match(input,T_RPAREN,FOLLOW_T_RPAREN_in_complexType567); 
+
+                    }
+                    break;
+                case 6 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:250:4: r= simpleType
+                    {
+                    pushFollow(FOLLOW_simpleType_in_complexType580);
+                    r=simpleType();
+
+                    state._fsp--;
+
+
+                    aTypeSymbol = r;
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            fixupComplexType(aTypeSymbol);
+        }
+        return aTypeSymbol;
+    }
+    // $ANTLR end "complexType"
+
+
+
+    // $ANTLR start "simpleType"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:256:1: simpleType returns [UlyssesType aTypeSymbol] : ( T_BOOL | T_INT T_LSQPAREN rangeLow= ( T_INTNUMBER | T_INFTY | T_IDENTIFIER ) T_RANGETO rangeHigh= ( T_INTNUMBER | T_INFTY | T_IDENTIFIER ) T_RSQPAREN | T_FLOAT T_LSQPAREN rangeLow= ( T_FLOATNUMBER | T_INFTY | T_IDENTIFIER ) T_RANGETO rangeHigh= ( T_FLOATNUMBER | T_INFTY | T_IDENTIFIER ) T_RSQPAREN | T_CHAR | T_CBRL aRangeValue= T_IDENTIFIER ( T_EQUAL optVal= T_INTNUMBER )? ( T_COMMA otherRangeValue= T_IDENTIFIER ( T_EQUAL otherOptVal= T_INTNUMBER )? )* T_CBRR |aType= T_IDENTIFIER );
+    public final UlyssesType simpleType() throws RecognitionException {
+        UlyssesType aTypeSymbol = null;
+
+
+        Token rangeLow=null;
+        Token rangeHigh=null;
+        Token aRangeValue=null;
+        Token optVal=null;
+        Token otherRangeValue=null;
+        Token otherOptVal=null;
+        Token aType=null;
+
+         
+        		aTypeSymbol = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:261:2: ( T_BOOL | T_INT T_LSQPAREN rangeLow= ( T_INTNUMBER | T_INFTY | T_IDENTIFIER ) T_RANGETO rangeHigh= ( T_INTNUMBER | T_INFTY | T_IDENTIFIER ) T_RSQPAREN | T_FLOAT T_LSQPAREN rangeLow= ( T_FLOATNUMBER | T_INFTY | T_IDENTIFIER ) T_RANGETO rangeHigh= ( T_FLOATNUMBER | T_INFTY | T_IDENTIFIER ) T_RSQPAREN | T_CHAR | T_CBRL aRangeValue= T_IDENTIFIER ( T_EQUAL optVal= T_INTNUMBER )? ( T_COMMA otherRangeValue= T_IDENTIFIER ( T_EQUAL otherOptVal= T_INTNUMBER )? )* T_CBRR |aType= T_IDENTIFIER )
+            int alt18=6;
+            switch ( input.LA(1) ) {
+            case T_BOOL:
+                {
+                alt18=1;
+                }
+                break;
+            case T_INT:
+                {
+                alt18=2;
+                }
+                break;
+            case T_FLOAT:
+                {
+                alt18=3;
+                }
+                break;
+            case T_CHAR:
+                {
+                alt18=4;
+                }
+                break;
+            case T_CBRL:
+                {
+                alt18=5;
+                }
+                break;
+            case T_IDENTIFIER:
+                {
+                alt18=6;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 18, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt18) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:261:4: T_BOOL
+                    {
+                    match(input,T_BOOL,FOLLOW_T_BOOL_in_simpleType613); 
+
+                    aTypeSymbol = createBoolType();
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:264:4: T_INT T_LSQPAREN rangeLow= ( T_INTNUMBER | T_INFTY | T_IDENTIFIER ) T_RANGETO rangeHigh= ( T_INTNUMBER | T_INFTY | T_IDENTIFIER ) T_RSQPAREN
+                    {
+                    match(input,T_INT,FOLLOW_T_INT_in_simpleType626); 
+
+                    match(input,T_LSQPAREN,FOLLOW_T_LSQPAREN_in_simpleType628); 
+
+                    rangeLow=(Token)input.LT(1);
+
+                    if ( input.LA(1)==T_IDENTIFIER||input.LA(1)==T_INFTY||input.LA(1)==T_INTNUMBER ) {
+                        input.consume();
+                        state.errorRecovery=false;
+                    }
+                    else {
+                        MismatchedSetException mse = new MismatchedSetException(null,input);
+                        throw mse;
+                    }
+
+
+                    match(input,T_RANGETO,FOLLOW_T_RANGETO_in_simpleType640); 
+
+                    rangeHigh=(Token)input.LT(1);
+
+                    if ( input.LA(1)==T_IDENTIFIER||input.LA(1)==T_INFTY||input.LA(1)==T_INTNUMBER ) {
+                        input.consume();
+                        state.errorRecovery=false;
+                    }
+                    else {
+                        MismatchedSetException mse = new MismatchedSetException(null,input);
+                        throw mse;
+                    }
+
+
+                    match(input,T_RSQPAREN,FOLLOW_T_RSQPAREN_in_simpleType652); 
+
+                    aTypeSymbol = createIntType(rangeLow,rangeHigh);
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:268:4: T_FLOAT T_LSQPAREN rangeLow= ( T_FLOATNUMBER | T_INFTY | T_IDENTIFIER ) T_RANGETO rangeHigh= ( T_FLOATNUMBER | T_INFTY | T_IDENTIFIER ) T_RSQPAREN
+                    {
+                    match(input,T_FLOAT,FOLLOW_T_FLOAT_in_simpleType671); 
+
+                    match(input,T_LSQPAREN,FOLLOW_T_LSQPAREN_in_simpleType674); 
+
+                    rangeLow=(Token)input.LT(1);
+
+                    if ( input.LA(1)==T_FLOATNUMBER||input.LA(1)==T_IDENTIFIER||input.LA(1)==T_INFTY ) {
+                        input.consume();
+                        state.errorRecovery=false;
+                    }
+                    else {
+                        MismatchedSetException mse = new MismatchedSetException(null,input);
+                        throw mse;
+                    }
+
+
+                    match(input,T_RANGETO,FOLLOW_T_RANGETO_in_simpleType686); 
+
+                    rangeHigh=(Token)input.LT(1);
+
+                    if ( input.LA(1)==T_FLOATNUMBER||input.LA(1)==T_IDENTIFIER||input.LA(1)==T_INFTY ) {
+                        input.consume();
+                        state.errorRecovery=false;
+                    }
+                    else {
+                        MismatchedSetException mse = new MismatchedSetException(null,input);
+                        throw mse;
+                    }
+
+
+                    match(input,T_RSQPAREN,FOLLOW_T_RSQPAREN_in_simpleType698); 
+
+                    aTypeSymbol = createFloatType(rangeLow,rangeHigh);
+
+                    }
+                    break;
+                case 4 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:272:4: T_CHAR
+                    {
+                    match(input,T_CHAR,FOLLOW_T_CHAR_in_simpleType716); 
+
+                    aTypeSymbol = createCharType();
+
+                    }
+                    break;
+                case 5 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:276:4: T_CBRL aRangeValue= T_IDENTIFIER ( T_EQUAL optVal= T_INTNUMBER )? ( T_COMMA otherRangeValue= T_IDENTIFIER ( T_EQUAL otherOptVal= T_INTNUMBER )? )* T_CBRR
+                    {
+                    match(input,T_CBRL,FOLLOW_T_CBRL_in_simpleType732); 
+
+                    aRangeValue=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_simpleType736); 
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:276:36: ( T_EQUAL optVal= T_INTNUMBER )?
+                    int alt15=2;
+                    int LA15_0 = input.LA(1);
+
+                    if ( (LA15_0==T_EQUAL) ) {
+                        alt15=1;
+                    }
+                    switch (alt15) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:276:37: T_EQUAL optVal= T_INTNUMBER
+                            {
+                            match(input,T_EQUAL,FOLLOW_T_EQUAL_in_simpleType739); 
+
+                            optVal=(Token)match(input,T_INTNUMBER,FOLLOW_T_INTNUMBER_in_simpleType743); 
+
+                            }
+                            break;
+
+                    }
+
+
+                    aTypeSymbol = createEnumType(aRangeValue, optVal);
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:277:4: ( T_COMMA otherRangeValue= T_IDENTIFIER ( T_EQUAL otherOptVal= T_INTNUMBER )? )*
+                    loop17:
+                    do {
+                        int alt17=2;
+                        int LA17_0 = input.LA(1);
+
+                        if ( (LA17_0==T_COMMA) ) {
+                            alt17=1;
+                        }
+
+
+                        switch (alt17) {
+                    	case 1 :
+                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:277:5: T_COMMA otherRangeValue= T_IDENTIFIER ( T_EQUAL otherOptVal= T_INTNUMBER )?
+                    	    {
+                    	    match(input,T_COMMA,FOLLOW_T_COMMA_in_simpleType754); 
+
+                    	    otherRangeValue=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_simpleType758); 
+
+                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:277:42: ( T_EQUAL otherOptVal= T_INTNUMBER )?
+                    	    int alt16=2;
+                    	    int LA16_0 = input.LA(1);
+
+                    	    if ( (LA16_0==T_EQUAL) ) {
+                    	        alt16=1;
+                    	    }
+                    	    switch (alt16) {
+                    	        case 1 :
+                    	            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:277:43: T_EQUAL otherOptVal= T_INTNUMBER
+                    	            {
+                    	            match(input,T_EQUAL,FOLLOW_T_EQUAL_in_simpleType761); 
+
+                    	            otherOptVal=(Token)match(input,T_INTNUMBER,FOLLOW_T_INTNUMBER_in_simpleType765); 
+
+                    	            }
+                    	            break;
+
+                    	    }
+
+
+                    	    addToEnumType(aTypeSymbol,otherRangeValue,otherOptVal); otherOptVal=null;
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop17;
+                        }
+                    } while (true);
+
+
+                    match(input,T_CBRR,FOLLOW_T_CBRR_in_simpleType773); 
+
+                    }
+                    break;
+                case 6 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:279:4: aType= T_IDENTIFIER
+                    {
+                    aType=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_simpleType784); 
+
+                    aTypeSymbol = getNamedType(aType);
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            fixupSimpleType(aTypeSymbol);
+        }
+        return aTypeSymbol;
+    }
+    // $ANTLR end "simpleType"
+
+
+
+    // $ANTLR start "ooActionSystem"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:289:1: ooActionSystem returns [OoActionSystemType aTypeSymbol] : ( T_AUTOCONS )? T_SYSTEM ( T_LPAREN refinesSystemName= T_IDENTIFIER T_RPAREN )? '|[' ( T_VAR attrList )? ( T_METHODS methodList )? ( T_ACTIONS namedActionList )? ( T_DO (bl= actionBlock[null] )? T_OD )? ']|' ;
+    public final OoActionSystemType ooActionSystem() throws RecognitionException {
+        OoActionSystemType aTypeSymbol = null;
+
+
+        Token refinesSystemName=null;
+        Block bl =null;
+
+
+         
+        		boolean autoCons = false; 
+        		aTypeSymbol = null;
+        		refinesSystemName = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:296:2: ( ( T_AUTOCONS )? T_SYSTEM ( T_LPAREN refinesSystemName= T_IDENTIFIER T_RPAREN )? '|[' ( T_VAR attrList )? ( T_METHODS methodList )? ( T_ACTIONS namedActionList )? ( T_DO (bl= actionBlock[null] )? T_OD )? ']|' )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:296:9: ( T_AUTOCONS )? T_SYSTEM ( T_LPAREN refinesSystemName= T_IDENTIFIER T_RPAREN )? '|[' ( T_VAR attrList )? ( T_METHODS methodList )? ( T_ACTIONS namedActionList )? ( T_DO (bl= actionBlock[null] )? T_OD )? ']|'
+            {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:296:9: ( T_AUTOCONS )?
+            int alt19=2;
+            int LA19_0 = input.LA(1);
+
+            if ( (LA19_0==T_AUTOCONS) ) {
+                alt19=1;
+            }
+            switch (alt19) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:296:10: T_AUTOCONS
+                    {
+                    match(input,T_AUTOCONS,FOLLOW_T_AUTOCONS_in_ooActionSystem827); 
+
+                    autoCons = true;
+
+                    }
+                    break;
+
+            }
+
+
+            match(input,T_SYSTEM,FOLLOW_T_SYSTEM_in_ooActionSystem836); 
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:297:12: ( T_LPAREN refinesSystemName= T_IDENTIFIER T_RPAREN )?
+            int alt20=2;
+            int LA20_0 = input.LA(1);
+
+            if ( (LA20_0==T_LPAREN) ) {
+                alt20=1;
+            }
+            switch (alt20) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:297:13: T_LPAREN refinesSystemName= T_IDENTIFIER T_RPAREN
+                    {
+                    match(input,T_LPAREN,FOLLOW_T_LPAREN_in_ooActionSystem839); 
+
+                    refinesSystemName=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_ooActionSystem843); 
+
+                    match(input,T_RPAREN,FOLLOW_T_RPAREN_in_ooActionSystem845); 
+
+                    }
+                    break;
+
+            }
+
+
+            aTypeSymbol = createOoaType(refinesSystemName,autoCons);
+
+            match(input,127,FOLLOW_127_in_ooActionSystem858); 
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:300:4: ( T_VAR attrList )?
+            int alt21=2;
+            int LA21_0 = input.LA(1);
+
+            if ( (LA21_0==T_VAR) ) {
+                alt21=1;
+            }
+            switch (alt21) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:300:5: T_VAR attrList
+                    {
+                    match(input,T_VAR,FOLLOW_T_VAR_in_ooActionSystem864); 
+
+                    pushFollow(FOLLOW_attrList_in_ooActionSystem866);
+                    attrList();
+
+                    state._fsp--;
+
+
+                    }
+                    break;
+
+            }
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:301:4: ( T_METHODS methodList )?
+            int alt22=2;
+            int LA22_0 = input.LA(1);
+
+            if ( (LA22_0==T_METHODS) ) {
+                alt22=1;
+            }
+            switch (alt22) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:301:5: T_METHODS methodList
+                    {
+                    match(input,T_METHODS,FOLLOW_T_METHODS_in_ooActionSystem874); 
+
+                    pushFollow(FOLLOW_methodList_in_ooActionSystem876);
+                    methodList();
+
+                    state._fsp--;
+
+
+                    }
+                    break;
+
+            }
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:302:4: ( T_ACTIONS namedActionList )?
+            int alt23=2;
+            int LA23_0 = input.LA(1);
+
+            if ( (LA23_0==T_ACTIONS) ) {
+                alt23=1;
+            }
+            switch (alt23) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:302:5: T_ACTIONS namedActionList
+                    {
+                    match(input,T_ACTIONS,FOLLOW_T_ACTIONS_in_ooActionSystem884); 
+
+                    pushFollow(FOLLOW_namedActionList_in_ooActionSystem886);
+                    namedActionList();
+
+                    state._fsp--;
+
+
+                    }
+                    break;
+
+            }
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:303:4: ( T_DO (bl= actionBlock[null] )? T_OD )?
+            int alt25=2;
+            int LA25_0 = input.LA(1);
+
+            if ( (LA25_0==T_DO) ) {
+                alt25=1;
+            }
+            switch (alt25) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:303:5: T_DO (bl= actionBlock[null] )? T_OD
+                    {
+                    match(input,T_DO,FOLLOW_T_DO_in_ooActionSystem894); 
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:303:10: (bl= actionBlock[null] )?
+                    int alt24=2;
+                    int LA24_0 = input.LA(1);
+
+                    if ( (LA24_0==T_IDENTIFIER||LA24_0==T_LPAREN||LA24_0==T_REQUIRES||LA24_0==T_SKIP||LA24_0==T_VAR) ) {
+                        alt24=1;
+                    }
+                    switch (alt24) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:303:11: bl= actionBlock[null]
+                            {
+                            pushFollow(FOLLOW_actionBlock_in_ooActionSystem899);
+                            bl=actionBlock(null);
+
+                            state._fsp--;
+
+
+                            addActionBlock(aTypeSymbol,bl);
+
+                            }
+                            break;
+
+                    }
+
+
+                    match(input,T_OD,FOLLOW_T_OD_in_ooActionSystem906); 
+
+                    }
+                    break;
+
+            }
+
+
+            match(input,120,FOLLOW_120_in_ooActionSystem912); 
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            fixupOoaType(aTypeSymbol);
+        }
+        return aTypeSymbol;
+    }
+    // $ANTLR end "ooActionSystem"
+
+
+
+    // $ANTLR start "attrList"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:315:1: attrList : attr ( T_SEMICOLON attr )* ;
+    public final void attrList() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:316:2: ( attr ( T_SEMICOLON attr )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:316:4: attr ( T_SEMICOLON attr )*
+            {
+            BeginParsingAttributes();
+
+            pushFollow(FOLLOW_attr_in_attrList943);
+            attr();
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:317:9: ( T_SEMICOLON attr )*
+            loop26:
+            do {
+                int alt26=2;
+                int LA26_0 = input.LA(1);
+
+                if ( (LA26_0==T_SEMICOLON) ) {
+                    alt26=1;
+                }
+
+
+                switch (alt26) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:317:10: T_SEMICOLON attr
+            	    {
+            	    match(input,T_SEMICOLON,FOLLOW_T_SEMICOLON_in_attrList946); 
+
+            	    pushFollow(FOLLOW_attr_in_attrList948);
+            	    attr();
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop26;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+
+            		EndParsingAttributes();
+            	
+        }
+        return ;
+    }
+    // $ANTLR end "attrList"
+
+
+
+    // $ANTLR start "attr"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:323:1: attr : ( T_STATIC )? ( T_OBS | T_CTRL )? varname= T_IDENTIFIER T_COLON aType= complexType ( T_EQUAL anExpr= expression )? ;
+    public final void attr() throws RecognitionException {
+        Token varname=null;
+        UlyssesType aType =null;
+
+        Expression anExpr =null;
+
+
+         
+        		boolean isStatic = false; 
+        		boolean isCtr = false;
+        		boolean isObs = false;				
+        		
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:330:2: ( ( T_STATIC )? ( T_OBS | T_CTRL )? varname= T_IDENTIFIER T_COLON aType= complexType ( T_EQUAL anExpr= expression )? )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:330:5: ( T_STATIC )? ( T_OBS | T_CTRL )? varname= T_IDENTIFIER T_COLON aType= complexType ( T_EQUAL anExpr= expression )?
+            {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:330:5: ( T_STATIC )?
+            int alt27=2;
+            int LA27_0 = input.LA(1);
+
+            if ( (LA27_0==T_STATIC) ) {
+                alt27=1;
+            }
+            switch (alt27) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:330:6: T_STATIC
+                    {
+                    match(input,T_STATIC,FOLLOW_T_STATIC_in_attr973); 
+
+                    isStatic = true;
+
+                    }
+                    break;
+
+            }
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:330:36: ( T_OBS | T_CTRL )?
+            int alt28=3;
+            int LA28_0 = input.LA(1);
+
+            if ( (LA28_0==T_OBS) ) {
+                alt28=1;
+            }
+            else if ( (LA28_0==T_CTRL) ) {
+                alt28=2;
+            }
+            switch (alt28) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:330:37: T_OBS
+                    {
+                    match(input,T_OBS,FOLLOW_T_OBS_in_attr980); 
+
+                    isObs = true;
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:330:61: T_CTRL
+                    {
+                    match(input,T_CTRL,FOLLOW_T_CTRL_in_attr986); 
+
+                    isCtr = true;
+
+                    }
+                    break;
+
+            }
+
+
+            varname=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_attr997); 
+
+            match(input,T_COLON,FOLLOW_T_COLON_in_attr1000); 
+
+            pushFollow(FOLLOW_complexType_in_attr1004);
+            aType=complexType();
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:331:51: ( T_EQUAL anExpr= expression )?
+            int alt29=2;
+            int LA29_0 = input.LA(1);
+
+            if ( (LA29_0==T_EQUAL) ) {
+                alt29=1;
+            }
+            switch (alt29) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:331:52: T_EQUAL anExpr= expression
+                    {
+                    match(input,T_EQUAL,FOLLOW_T_EQUAL_in_attr1007); 
+
+                    pushFollow(FOLLOW_expression_in_attr1011);
+                    anExpr=expression();
+
+                    state._fsp--;
+
+
+                    }
+                    break;
+
+            }
+
+
+            createAttribute(varname, isStatic, isObs, isCtr, aType, anExpr);
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "attr"
+
+
+
+    // $ANTLR start "methodList"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:338:1: methodList : method ( T_SEMICOLON method )* ;
+    public final void methodList() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:339:2: ( method ( T_SEMICOLON method )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:339:5: method ( T_SEMICOLON method )*
+            {
+            pushFollow(FOLLOW_method_in_methodList1033);
+            method();
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:339:12: ( T_SEMICOLON method )*
+            loop30:
+            do {
+                int alt30=2;
+                int LA30_0 = input.LA(1);
+
+                if ( (LA30_0==T_SEMICOLON) ) {
+                    alt30=1;
+                }
+
+
+                switch (alt30) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:339:13: T_SEMICOLON method
+            	    {
+            	    match(input,T_SEMICOLON,FOLLOW_T_SEMICOLON_in_methodList1036); 
+
+            	    pushFollow(FOLLOW_method_in_methodList1038);
+            	    method();
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop30;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "methodList"
+
+
+
+    // $ANTLR start "method"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:342:1: method : mname= T_IDENTIFIER ( T_LPAREN methodParameterList[newMethod] T_RPAREN )? ( T_COLON rt= complexType )? T_EQUAL ( T_VAR localActionVars[newMethod] 'begin' )? statements= actionBody[null] T_END ;
+    public final void method() throws RecognitionException {
+        Token mname=null;
+        UlyssesType rt =null;
+
+        Block statements =null;
+
+
+        	
+        		FunctionIdentifier newMethod = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:346:2: (mname= T_IDENTIFIER ( T_LPAREN methodParameterList[newMethod] T_RPAREN )? ( T_COLON rt= complexType )? T_EQUAL ( T_VAR localActionVars[newMethod] 'begin' )? statements= actionBody[null] T_END )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:346:4: mname= T_IDENTIFIER ( T_LPAREN methodParameterList[newMethod] T_RPAREN )? ( T_COLON rt= complexType )? T_EQUAL ( T_VAR localActionVars[newMethod] 'begin' )? statements= actionBody[null] T_END
+            {
+            mname=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_method1060); 
+
+            newMethod = createMethodSymbol(mname);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:347:3: ( T_LPAREN methodParameterList[newMethod] T_RPAREN )?
+            int alt31=2;
+            int LA31_0 = input.LA(1);
+
+            if ( (LA31_0==T_LPAREN) ) {
+                alt31=1;
+            }
+            switch (alt31) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:347:4: T_LPAREN methodParameterList[newMethod] T_RPAREN
+                    {
+                    match(input,T_LPAREN,FOLLOW_T_LPAREN_in_method1068); 
+
+                    pushFollow(FOLLOW_methodParameterList_in_method1070);
+                    methodParameterList(newMethod);
+
+                    state._fsp--;
+
+
+                    match(input,T_RPAREN,FOLLOW_T_RPAREN_in_method1074); 
+
+                    }
+                    break;
+
+            }
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:348:3: ( T_COLON rt= complexType )?
+            int alt32=2;
+            int LA32_0 = input.LA(1);
+
+            if ( (LA32_0==T_COLON) ) {
+                alt32=1;
+            }
+            switch (alt32) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:348:4: T_COLON rt= complexType
+                    {
+                    match(input,T_COLON,FOLLOW_T_COLON_in_method1082); 
+
+                    pushFollow(FOLLOW_complexType_in_method1086);
+                    rt=complexType();
+
+                    state._fsp--;
+
+
+                    setMethodReturnType(newMethod,rt);
+
+                    }
+                    break;
+
+            }
+
+
+            match(input,T_EQUAL,FOLLOW_T_EQUAL_in_method1096); 
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:350:4: ( T_VAR localActionVars[newMethod] 'begin' )?
+            int alt33=2;
+            int LA33_0 = input.LA(1);
+
+            if ( (LA33_0==T_VAR) ) {
+                int LA33_1 = input.LA(2);
+
+                if ( (LA33_1==T_IDENTIFIER) ) {
+                    alt33=1;
+                }
+            }
+            switch (alt33) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:350:6: T_VAR localActionVars[newMethod] 'begin'
+                    {
+                    match(input,T_VAR,FOLLOW_T_VAR_in_method1104); 
+
+                    pushFollow(FOLLOW_localActionVars_in_method1106);
+                    localActionVars(newMethod);
+
+                    state._fsp--;
+
+
+                    match(input,122,FOLLOW_122_in_method1109); 
+
+                    }
+                    break;
+
+            }
+
+
+            pushFollow(FOLLOW_actionBody_in_method1384);
+            statements=actionBody(null);
+
+            state._fsp--;
+
+
+            addMethodBody(newMethod,statements);
+
+            match(input,T_END,FOLLOW_T_END_in_method1392); 
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popResolveStack(newMethod);
+        }
+        return ;
+    }
+    // $ANTLR end "method"
+
+
+
+    // $ANTLR start "methodParameterList"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:359:1: methodParameterList[FunctionIdentifier newMethod] : paramName= T_IDENTIFIER T_COLON atype= complexType ( T_COMMA otherparam= T_IDENTIFIER T_COLON othertype= complexType )* ;
+    public final void methodParameterList(FunctionIdentifier newMethod) throws RecognitionException {
+        Token paramName=null;
+        Token otherparam=null;
+        UlyssesType atype =null;
+
+        UlyssesType othertype =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:360:2: (paramName= T_IDENTIFIER T_COLON atype= complexType ( T_COMMA otherparam= T_IDENTIFIER T_COLON othertype= complexType )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:360:5: paramName= T_IDENTIFIER T_COLON atype= complexType ( T_COMMA otherparam= T_IDENTIFIER T_COLON othertype= complexType )*
+            {
+            paramName=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_methodParameterList1416); 
+
+            match(input,T_COLON,FOLLOW_T_COLON_in_methodParameterList1418); 
+
+            pushFollow(FOLLOW_complexType_in_methodParameterList1422);
+            atype=complexType();
+
+            state._fsp--;
+
+
+            addMethodParameter(newMethod,paramName,atype);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:361:4: ( T_COMMA otherparam= T_IDENTIFIER T_COLON othertype= complexType )*
+            loop34:
+            do {
+                int alt34=2;
+                int LA34_0 = input.LA(1);
+
+                if ( (LA34_0==T_COMMA) ) {
+                    alt34=1;
+                }
+
+
+                switch (alt34) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:361:5: T_COMMA otherparam= T_IDENTIFIER T_COLON othertype= complexType
+            	    {
+            	    match(input,T_COMMA,FOLLOW_T_COMMA_in_methodParameterList1430); 
+
+            	    otherparam=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_methodParameterList1434); 
+
+            	    match(input,T_COLON,FOLLOW_T_COLON_in_methodParameterList1436); 
+
+            	    pushFollow(FOLLOW_complexType_in_methodParameterList1440);
+            	    othertype=complexType();
+
+            	    state._fsp--;
+
+
+            	    addMethodParameter(newMethod,otherparam,othertype);
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop34;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "methodParameterList"
+
+
+
+    // $ANTLR start "namedActionList"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:370:1: namedActionList : namedAction ( T_SEMICOLON namedAction )* ;
+    public final void namedActionList() throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:371:2: ( namedAction ( T_SEMICOLON namedAction )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:371:4: namedAction ( T_SEMICOLON namedAction )*
+            {
+            pushFollow(FOLLOW_namedAction_in_namedActionList1467);
+            namedAction();
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:371:16: ( T_SEMICOLON namedAction )*
+            loop35:
+            do {
+                int alt35=2;
+                int LA35_0 = input.LA(1);
+
+                if ( (LA35_0==T_SEMICOLON) ) {
+                    alt35=1;
+                }
+
+
+                switch (alt35) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:371:17: T_SEMICOLON namedAction
+            	    {
+            	    match(input,T_SEMICOLON,FOLLOW_T_SEMICOLON_in_namedActionList1470); 
+
+            	    pushFollow(FOLLOW_namedAction_in_namedActionList1472);
+            	    namedAction();
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop35;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "namedActionList"
+
+
+
+    // $ANTLR start "namedAction"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:374:1: namedAction : ( T_CTRL | T_OBS |) actionname= T_IDENTIFIER ( T_LPAREN methodParameterList[newAction] T_RPAREN )? T_EQUAL ( T_VAR localActionVars[newAction] )? body= discreteActionBody ;
+    public final void namedAction() throws RecognitionException {
+        Token actionname=null;
+        GuardedCommand body =null;
+
+
+
+        		FunctionTypeEnum actionType;
+        		FunctionIdentifier newAction = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:379:2: ( ( T_CTRL | T_OBS |) actionname= T_IDENTIFIER ( T_LPAREN methodParameterList[newAction] T_RPAREN )? T_EQUAL ( T_VAR localActionVars[newAction] )? body= discreteActionBody )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:384:3: ( T_CTRL | T_OBS |) actionname= T_IDENTIFIER ( T_LPAREN methodParameterList[newAction] T_RPAREN )? T_EQUAL ( T_VAR localActionVars[newAction] )? body= discreteActionBody
+            {
+            actionType = FunctionTypeEnum.Internal;
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:385:3: ( T_CTRL | T_OBS |)
+            int alt36=3;
+            switch ( input.LA(1) ) {
+            case T_CTRL:
+                {
+                alt36=1;
+                }
+                break;
+            case T_OBS:
+                {
+                alt36=2;
+                }
+                break;
+            case T_IDENTIFIER:
+                {
+                alt36=3;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 36, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt36) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:385:4: T_CTRL
+                    {
+                    match(input,T_CTRL,FOLLOW_T_CTRL_in_namedAction1510); 
+
+                    actionType = FunctionTypeEnum.Controllable;
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:385:58: T_OBS
+                    {
+                    match(input,T_OBS,FOLLOW_T_OBS_in_namedAction1515); 
+
+                    actionType = FunctionTypeEnum.Observable;
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:385:109: 
+                    {
+                    }
+                    break;
+
+            }
+
+
+            actionname=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_namedAction1527); 
+
+            newAction = createNamedAction(actionname,actionType);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:387:3: ( T_LPAREN methodParameterList[newAction] T_RPAREN )?
+            int alt37=2;
+            int LA37_0 = input.LA(1);
+
+            if ( (LA37_0==T_LPAREN) ) {
+                alt37=1;
+            }
+            switch (alt37) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:387:4: T_LPAREN methodParameterList[newAction] T_RPAREN
+                    {
+                    match(input,T_LPAREN,FOLLOW_T_LPAREN_in_namedAction1535); 
+
+                    pushFollow(FOLLOW_methodParameterList_in_namedAction1537);
+                    methodParameterList(newAction);
+
+                    state._fsp--;
+
+
+                    match(input,T_RPAREN,FOLLOW_T_RPAREN_in_namedAction1541); 
+
+                    }
+                    break;
+
+            }
+
+
+            match(input,T_EQUAL,FOLLOW_T_EQUAL_in_namedAction1548); 
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:389:3: ( T_VAR localActionVars[newAction] )?
+            int alt38=2;
+            int LA38_0 = input.LA(1);
+
+            if ( (LA38_0==T_VAR) ) {
+                alt38=1;
+            }
+            switch (alt38) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:389:4: T_VAR localActionVars[newAction]
+                    {
+                    match(input,T_VAR,FOLLOW_T_VAR_in_namedAction1554); 
+
+                    pushFollow(FOLLOW_localActionVars_in_namedAction1556);
+                    localActionVars(newAction);
+
+                    state._fsp--;
+
+
+                    }
+                    break;
+
+            }
+
+
+            pushFollow(FOLLOW_discreteActionBody_in_namedAction1567);
+            body=discreteActionBody();
+
+            state._fsp--;
+
+
+            addActionBody(newAction,body);
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popResolveStack(newAction);
+        }
+        return ;
+    }
+    // $ANTLR end "namedAction"
+
+
+
+    // $ANTLR start "localActionVars"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:397:1: localActionVars[FunctionIdentifier newMethod] : id1= T_IDENTIFIER T_COLON t1= complexType ( T_SEMICOLON id2= T_IDENTIFIER T_COLON t2= complexType )* ;
+    public final void localActionVars(FunctionIdentifier newMethod) throws RecognitionException {
+        Token id1=null;
+        Token id2=null;
+        UlyssesType t1 =null;
+
+        UlyssesType t2 =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:398:2: (id1= T_IDENTIFIER T_COLON t1= complexType ( T_SEMICOLON id2= T_IDENTIFIER T_COLON t2= complexType )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:399:3: id1= T_IDENTIFIER T_COLON t1= complexType ( T_SEMICOLON id2= T_IDENTIFIER T_COLON t2= complexType )*
+            {
+            id1=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_localActionVars1599); 
+
+            match(input,T_COLON,FOLLOW_T_COLON_in_localActionVars1601); 
+
+            pushFollow(FOLLOW_complexType_in_localActionVars1605);
+            t1=complexType();
+
+            state._fsp--;
+
+
+            addLocalVariableToNamedAction(newMethod,id1,t1);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:400:4: ( T_SEMICOLON id2= T_IDENTIFIER T_COLON t2= complexType )*
+            loop39:
+            do {
+                int alt39=2;
+                int LA39_0 = input.LA(1);
+
+                if ( (LA39_0==T_SEMICOLON) ) {
+                    alt39=1;
+                }
+
+
+                switch (alt39) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:400:5: T_SEMICOLON id2= T_IDENTIFIER T_COLON t2= complexType
+            	    {
+            	    match(input,T_SEMICOLON,FOLLOW_T_SEMICOLON_in_localActionVars1614); 
+
+            	    id2=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_localActionVars1618); 
+
+            	    match(input,T_COLON,FOLLOW_T_COLON_in_localActionVars1620); 
+
+            	    pushFollow(FOLLOW_complexType_in_localActionVars1624);
+            	    t2=complexType();
+
+            	    state._fsp--;
+
+
+            	    addLocalVariableToNamedAction(newMethod,id2,t2);
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop39;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "localActionVars"
+
+
+
+    // $ANTLR start "anonymousAction"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:406:1: anonymousAction returns [GuardedCommand result] : b= discreteActionBody ;
+    public final GuardedCommand anonymousAction() throws RecognitionException {
+        GuardedCommand result = null;
+
+
+        GuardedCommand b =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:408:2: (b= discreteActionBody )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:410:3: b= discreteActionBody
+            {
+            pushFollow(FOLLOW_discreteActionBody_in_anonymousAction1659);
+            b=discreteActionBody();
+
+            state._fsp--;
+
+
+            result = b;
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "anonymousAction"
+
+
+
+    // $ANTLR start "continuousActionBody"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:413:1: continuousActionBody returns [GuardedCommand result] : T_CONT T_REQUIRES expr= expression T_COLON bdy= qualConstraintList T_END ;
+    public final GuardedCommand continuousActionBody() throws RecognitionException {
+        GuardedCommand result = null;
+
+
+        Expression expr =null;
+
+        Block bdy =null;
+
+
+
+        		result = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:418:2: ( T_CONT T_REQUIRES expr= expression T_COLON bdy= qualConstraintList T_END )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:418:4: T_CONT T_REQUIRES expr= expression T_COLON bdy= qualConstraintList T_END
+            {
+            match(input,T_CONT,FOLLOW_T_CONT_in_continuousActionBody1684); 
+
+            match(input,T_REQUIRES,FOLLOW_T_REQUIRES_in_continuousActionBody1686); 
+
+            pushFollow(FOLLOW_expression_in_continuousActionBody1690);
+            expr=expression();
+
+            state._fsp--;
+
+
+            match(input,T_COLON,FOLLOW_T_COLON_in_continuousActionBody1692); 
+
+            pushFollow(FOLLOW_qualConstraintList_in_continuousActionBody1699);
+            bdy=qualConstraintList();
+
+            state._fsp--;
+
+
+            match(input,T_END,FOLLOW_T_END_in_continuousActionBody1704); 
+
+            result = createGuardedCommandStatement(expr,bdy,true);
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "continuousActionBody"
+
+
+
+    // $ANTLR start "qualConstraintList"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:424:1: qualConstraintList returns [Block result] : stmt= qualConstraint ( T_COMMA ostmt= qualConstraint )* ;
+    public final Block qualConstraintList() throws RecognitionException {
+        Block result = null;
+
+
+        QualitativeConstraintStatement stmt =null;
+
+        QualitativeConstraintStatement ostmt =null;
+
+
+
+        		result = createSeqBlock(null);
+        		pushBlockToResolveStack(result);
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:430:2: (stmt= qualConstraint ( T_COMMA ostmt= qualConstraint )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:430:4: stmt= qualConstraint ( T_COMMA ostmt= qualConstraint )*
+            {
+            pushFollow(FOLLOW_qualConstraint_in_qualConstraintList1732);
+            stmt=qualConstraint();
+
+            state._fsp--;
+
+
+            addToBlockList(result,stmt);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:431:3: ( T_COMMA ostmt= qualConstraint )*
+            loop40:
+            do {
+                int alt40=2;
+                int LA40_0 = input.LA(1);
+
+                if ( (LA40_0==T_COMMA) ) {
+                    alt40=1;
+                }
+
+
+                switch (alt40) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:431:4: T_COMMA ostmt= qualConstraint
+            	    {
+            	    match(input,T_COMMA,FOLLOW_T_COMMA_in_qualConstraintList1739); 
+
+            	    pushFollow(FOLLOW_qualConstraint_in_qualConstraintList1743);
+            	    ostmt=qualConstraint();
+
+            	    state._fsp--;
+
+
+            	    addToBlockList(result,ostmt);
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop40;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popBlockFromResolveStack(result);
+        }
+        return result;
+    }
+    // $ANTLR end "qualConstraintList"
+
+
+
+    // $ANTLR start "qualConstraint"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:438:1: qualConstraint returns [QualitativeConstraintStatement result] : id1= T_IDENTIFIER T_EQUAL ( T_DERIV derivid= T_IDENTIFIER |id2= T_IDENTIFIER ( (op= T_SUM |op= T_DIFF |op= T_PROD ) id3= T_IDENTIFIER |) ) ;
+    public final QualitativeConstraintStatement qualConstraint() throws RecognitionException {
+        QualitativeConstraintStatement result = null;
+
+
+        Token id1=null;
+        Token derivid=null;
+        Token id2=null;
+        Token op=null;
+        Token id3=null;
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:440:2: (id1= T_IDENTIFIER T_EQUAL ( T_DERIV derivid= T_IDENTIFIER |id2= T_IDENTIFIER ( (op= T_SUM |op= T_DIFF |op= T_PROD ) id3= T_IDENTIFIER |) ) )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:440:4: id1= T_IDENTIFIER T_EQUAL ( T_DERIV derivid= T_IDENTIFIER |id2= T_IDENTIFIER ( (op= T_SUM |op= T_DIFF |op= T_PROD ) id3= T_IDENTIFIER |) )
+            {
+            id1=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_qualConstraint1774); 
+
+            match(input,T_EQUAL,FOLLOW_T_EQUAL_in_qualConstraint1776); 
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:441:3: ( T_DERIV derivid= T_IDENTIFIER |id2= T_IDENTIFIER ( (op= T_SUM |op= T_DIFF |op= T_PROD ) id3= T_IDENTIFIER |) )
+            int alt43=2;
+            int LA43_0 = input.LA(1);
+
+            if ( (LA43_0==T_DERIV) ) {
+                alt43=1;
+            }
+            else if ( (LA43_0==T_IDENTIFIER) ) {
+                alt43=2;
+            }
+            else {
+                NoViableAltException nvae =
+                    new NoViableAltException("", 43, 0, input);
+
+                throw nvae;
+
+            }
+            switch (alt43) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:441:5: T_DERIV derivid= T_IDENTIFIER
+                    {
+                    match(input,T_DERIV,FOLLOW_T_DERIV_in_qualConstraint1783); 
+
+                    derivid=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_qualConstraint1787); 
+
+                    result = createQualDerivConstraintStatement(id1,derivid);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:445:11: id2= T_IDENTIFIER ( (op= T_SUM |op= T_DIFF |op= T_PROD ) id3= T_IDENTIFIER |)
+                    {
+                    id2=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_qualConstraint1822); 
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:446:11: ( (op= T_SUM |op= T_DIFF |op= T_PROD ) id3= T_IDENTIFIER |)
+                    int alt42=2;
+                    int LA42_0 = input.LA(1);
+
+                    if ( (LA42_0==T_DIFF||LA42_0==T_PROD||LA42_0==T_SUM) ) {
+                        alt42=1;
+                    }
+                    else if ( (LA42_0==T_COMMA||LA42_0==T_END) ) {
+                        alt42=2;
+                    }
+                    else {
+                        NoViableAltException nvae =
+                            new NoViableAltException("", 42, 0, input);
+
+                        throw nvae;
+
+                    }
+                    switch (alt42) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:447:12: (op= T_SUM |op= T_DIFF |op= T_PROD ) id3= T_IDENTIFIER
+                            {
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:447:12: (op= T_SUM |op= T_DIFF |op= T_PROD )
+                            int alt41=3;
+                            switch ( input.LA(1) ) {
+                            case T_SUM:
+                                {
+                                alt41=1;
+                                }
+                                break;
+                            case T_DIFF:
+                                {
+                                alt41=2;
+                                }
+                                break;
+                            case T_PROD:
+                                {
+                                alt41=3;
+                                }
+                                break;
+                            default:
+                                NoViableAltException nvae =
+                                    new NoViableAltException("", 41, 0, input);
+
+                                throw nvae;
+
+                            }
+
+                            switch (alt41) {
+                                case 1 :
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:447:14: op= T_SUM
+                                    {
+                                    op=(Token)match(input,T_SUM,FOLLOW_T_SUM_in_qualConstraint1853); 
+
+                                    }
+                                    break;
+                                case 2 :
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:448:14: op= T_DIFF
+                                    {
+                                    op=(Token)match(input,T_DIFF,FOLLOW_T_DIFF_in_qualConstraint1870); 
+
+                                    }
+                                    break;
+                                case 3 :
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:449:14: op= T_PROD
+                                    {
+                                    op=(Token)match(input,T_PROD,FOLLOW_T_PROD_in_qualConstraint1887); 
+
+                                    }
+                                    break;
+
+                            }
+
+
+                            id3=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_qualConstraint1916); 
+
+                            result = createQualArithConstraintStatement(id1,id2,id3,op);
+
+                            }
+                            break;
+                        case 2 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:454:12: 
+                            {
+                            result = createQualEqualConstraintStatement(id1,id2);
+
+                            }
+                            break;
+
+                    }
+
+
+                    }
+                    break;
+
+            }
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "qualConstraint"
+
+
+
+    // $ANTLR start "discreteActionBody"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:462:1: discreteActionBody returns [GuardedCommand result] : T_REQUIRES expr= expression T_COLON bdy= actionBody[null] T_END ;
+    public final GuardedCommand discreteActionBody() throws RecognitionException {
+        GuardedCommand result = null;
+
+
+        Expression expr =null;
+
+        Block bdy =null;
+
+
+
+        		result = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:467:2: ( T_REQUIRES expr= expression T_COLON bdy= actionBody[null] T_END )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:468:3: T_REQUIRES expr= expression T_COLON bdy= actionBody[null] T_END
+            {
+            result = createGuardedCommandStatement(); pushBlockToResolveStack(result);
+
+            match(input,T_REQUIRES,FOLLOW_T_REQUIRES_in_discreteActionBody2010); 
+
+            pushFollow(FOLLOW_expression_in_discreteActionBody2014);
+            expr=expression();
+
+            state._fsp--;
+
+
+            match(input,T_COLON,FOLLOW_T_COLON_in_discreteActionBody2016); 
+
+            pushFollow(FOLLOW_actionBody_in_discreteActionBody2023);
+            bdy=actionBody(null);
+
+            state._fsp--;
+
+
+            match(input,T_END,FOLLOW_T_END_in_discreteActionBody2028); 
+
+            addExprAndBlockToGuardedCommand(result,expr,bdy);
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popBlockFromResolveStack(result);
+        }
+        return result;
+    }
+    // $ANTLR end "discreteActionBody"
+
+
+
+    // $ANTLR start "actionBlock"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:482:1: actionBlock[Block top] returns [Block prioList] : actionBlockParallel[prioList] ( T_PRIO actionBlockParallel[prioList] )* ;
+    public final Block actionBlock(Block top) throws RecognitionException {
+        Block prioList = null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:484:2: ( actionBlockParallel[prioList] ( T_PRIO actionBlockParallel[prioList] )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:484:6: actionBlockParallel[prioList] ( T_PRIO actionBlockParallel[prioList] )*
+            {
+            prioList = createPrioBlock(top);  pushBlockToResolveStack(prioList);
+
+            pushFollow(FOLLOW_actionBlockParallel_in_actionBlock2071);
+            actionBlockParallel(prioList);
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:485:34: ( T_PRIO actionBlockParallel[prioList] )*
+            loop44:
+            do {
+                int alt44=2;
+                int LA44_0 = input.LA(1);
+
+                if ( (LA44_0==T_PRIO) ) {
+                    alt44=1;
+                }
+
+
+                switch (alt44) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:485:35: T_PRIO actionBlockParallel[prioList]
+            	    {
+            	    match(input,T_PRIO,FOLLOW_T_PRIO_in_actionBlock2075); 
+
+            	    pushFollow(FOLLOW_actionBlockParallel_in_actionBlock2077);
+            	    actionBlockParallel(prioList);
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop44;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popBlockFromResolveStack(prioList);
+        }
+        return prioList;
+    }
+    // $ANTLR end "actionBlock"
+
+
+
+    // $ANTLR start "actionBlockParallel"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:490:1: actionBlockParallel[Block top] : actionBlockSequential[parList] ( T_NONDET actionBlockSequential[parList] )* ;
+    public final void actionBlockParallel(Block top) throws RecognitionException {
+        	Block parList = createNondetBlock(top); 
+        		 	pushBlockToResolveStack(parList);
+        		
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:494:2: ( actionBlockSequential[parList] ( T_NONDET actionBlockSequential[parList] )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:494:4: actionBlockSequential[parList] ( T_NONDET actionBlockSequential[parList] )*
+            {
+            pushFollow(FOLLOW_actionBlockSequential_in_actionBlockParallel2110);
+            actionBlockSequential(parList);
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:494:35: ( T_NONDET actionBlockSequential[parList] )*
+            loop45:
+            do {
+                int alt45=2;
+                int LA45_0 = input.LA(1);
+
+                if ( (LA45_0==T_NONDET) ) {
+                    alt45=1;
+                }
+
+
+                switch (alt45) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:494:36: T_NONDET actionBlockSequential[parList]
+            	    {
+            	    match(input,T_NONDET,FOLLOW_T_NONDET_in_actionBlockParallel2114); 
+
+            	    pushFollow(FOLLOW_actionBlockSequential_in_actionBlockParallel2116);
+            	    actionBlockSequential(parList);
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop45;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popBlockFromResolveStack(parList);
+        }
+        return ;
+    }
+    // $ANTLR end "actionBlockParallel"
+
+
+
+    // $ANTLR start "actionBlockSequential"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:499:1: actionBlockSequential[Block top] : ( T_VAR syms= blockvarlist[seqList] ( '&' sexpr= expression )? T_COLON )? actionBlockParen[seqList] ( T_SEMICOLON actionBlockParen[seqList] )* ;
+    public final void actionBlockSequential(Block top) throws RecognitionException {
+        Expression sexpr =null;
+
+
+
+        			Block seqList = createSeqBlock(top);
+        			pushBlockToResolveStack(seqList);
+        		
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:504:2: ( ( T_VAR syms= blockvarlist[seqList] ( '&' sexpr= expression )? T_COLON )? actionBlockParen[seqList] ( T_SEMICOLON actionBlockParen[seqList] )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:504:5: ( T_VAR syms= blockvarlist[seqList] ( '&' sexpr= expression )? T_COLON )? actionBlockParen[seqList] ( T_SEMICOLON actionBlockParen[seqList] )*
+            {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:504:5: ( T_VAR syms= blockvarlist[seqList] ( '&' sexpr= expression )? T_COLON )?
+            int alt47=2;
+            int LA47_0 = input.LA(1);
+
+            if ( (LA47_0==T_VAR) ) {
+                alt47=1;
+            }
+            switch (alt47) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:504:6: T_VAR syms= blockvarlist[seqList] ( '&' sexpr= expression )? T_COLON
+                    {
+                    match(input,T_VAR,FOLLOW_T_VAR_in_actionBlockSequential2150); 
+
+                    pushFollow(FOLLOW_blockvarlist_in_actionBlockSequential2154);
+                    blockvarlist(seqList);
+
+                    state._fsp--;
+
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:504:39: ( '&' sexpr= expression )?
+                    int alt46=2;
+                    int LA46_0 = input.LA(1);
+
+                    if ( (LA46_0==118) ) {
+                        alt46=1;
+                    }
+                    switch (alt46) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:504:40: '&' sexpr= expression
+                            {
+                            match(input,118,FOLLOW_118_in_actionBlockSequential2158); 
+
+                            pushFollow(FOLLOW_expression_in_actionBlockSequential2162);
+                            sexpr=expression();
+
+                            state._fsp--;
+
+
+                            addSeqBlockExpression(seqList,sexpr);
+
+                            }
+                            break;
+
+                    }
+
+
+                    match(input,T_COLON,FOLLOW_T_COLON_in_actionBlockSequential2169); 
+
+                    }
+                    break;
+
+            }
+
+
+            pushFollow(FOLLOW_actionBlockParen_in_actionBlockSequential2178);
+            actionBlockParen(seqList);
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:505:30: ( T_SEMICOLON actionBlockParen[seqList] )*
+            loop48:
+            do {
+                int alt48=2;
+                int LA48_0 = input.LA(1);
+
+                if ( (LA48_0==T_SEMICOLON) ) {
+                    alt48=1;
+                }
+
+
+                switch (alt48) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:505:31: T_SEMICOLON actionBlockParen[seqList]
+            	    {
+            	    match(input,T_SEMICOLON,FOLLOW_T_SEMICOLON_in_actionBlockSequential2182); 
+
+            	    pushFollow(FOLLOW_actionBlockParen_in_actionBlockSequential2184);
+            	    actionBlockParen(seqList);
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop48;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popBlockFromResolveStack(seqList);
+        }
+        return ;
+    }
+    // $ANTLR end "actionBlockSequential"
+
+
+
+    // $ANTLR start "actionBlockParen"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:510:1: actionBlockParen[Block top] : ( T_LPAREN actionBlock[top] T_RPAREN | anonymousOrNamedAction[top] );
+    public final void actionBlockParen(Block top) throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:511:2: ( T_LPAREN actionBlock[top] T_RPAREN | anonymousOrNamedAction[top] )
+            int alt49=2;
+            int LA49_0 = input.LA(1);
+
+            if ( (LA49_0==T_LPAREN) ) {
+                alt49=1;
+            }
+            else if ( (LA49_0==T_IDENTIFIER||LA49_0==T_REQUIRES||LA49_0==T_SKIP) ) {
+                alt49=2;
+            }
+            else {
+                NoViableAltException nvae =
+                    new NoViableAltException("", 49, 0, input);
+
+                throw nvae;
+
+            }
+            switch (alt49) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:511:4: T_LPAREN actionBlock[top] T_RPAREN
+                    {
+                    match(input,T_LPAREN,FOLLOW_T_LPAREN_in_actionBlockParen2208); 
+
+                    pushFollow(FOLLOW_actionBlock_in_actionBlockParen2210);
+                    actionBlock(top);
+
+                    state._fsp--;
+
+
+                    match(input,T_RPAREN,FOLLOW_T_RPAREN_in_actionBlockParen2213); 
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:512:4: anonymousOrNamedAction[top]
+                    {
+                    pushFollow(FOLLOW_anonymousOrNamedAction_in_actionBlockParen2218);
+                    anonymousOrNamedAction(top);
+
+                    state._fsp--;
+
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "actionBlockParen"
+
+
+
+    // $ANTLR start "anonymousOrNamedAction"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:515:1: anonymousOrNamedAction[Block top] : (gcmd= anonymousAction |aname= T_IDENTIFIER ( T_LPAREN m_params= methodCallParams T_RPAREN )? (amap= ( T_FOLDLR | T_FOLDRL ) '(' amapexpr= expression ')' )? | T_SKIP );
+    public final void anonymousOrNamedAction(Block top) throws RecognitionException {
+        Token aname=null;
+        Token amap=null;
+        GuardedCommand gcmd =null;
+
+        ArrayList<Expression> m_params =null;
+
+        Expression amapexpr =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:516:2: (gcmd= anonymousAction |aname= T_IDENTIFIER ( T_LPAREN m_params= methodCallParams T_RPAREN )? (amap= ( T_FOLDLR | T_FOLDRL ) '(' amapexpr= expression ')' )? | T_SKIP )
+            int alt52=3;
+            switch ( input.LA(1) ) {
+            case T_REQUIRES:
+                {
+                alt52=1;
+                }
+                break;
+            case T_IDENTIFIER:
+                {
+                alt52=2;
+                }
+                break;
+            case T_SKIP:
+                {
+                alt52=3;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 52, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt52) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:516:4: gcmd= anonymousAction
+                    {
+                    pushFollow(FOLLOW_anonymousAction_in_anonymousOrNamedAction2235);
+                    gcmd=anonymousAction();
+
+                    state._fsp--;
+
+
+                    addToBlockList(top,gcmd);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:517:4: aname= T_IDENTIFIER ( T_LPAREN m_params= methodCallParams T_RPAREN )? (amap= ( T_FOLDLR | T_FOLDRL ) '(' amapexpr= expression ')' )?
+                    {
+                    aname=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_anonymousOrNamedAction2244); 
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:518:11: ( T_LPAREN m_params= methodCallParams T_RPAREN )?
+                    int alt50=2;
+                    int LA50_0 = input.LA(1);
+
+                    if ( (LA50_0==T_LPAREN) ) {
+                        alt50=1;
+                    }
+                    switch (alt50) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:518:12: T_LPAREN m_params= methodCallParams T_RPAREN
+                            {
+                            match(input,T_LPAREN,FOLLOW_T_LPAREN_in_anonymousOrNamedAction2258); 
+
+                            pushFollow(FOLLOW_methodCallParams_in_anonymousOrNamedAction2263);
+                            m_params=methodCallParams();
+
+                            state._fsp--;
+
+
+                            match(input,T_RPAREN,FOLLOW_T_RPAREN_in_anonymousOrNamedAction2265); 
+
+                            }
+                            break;
+
+                    }
+
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:519:11: (amap= ( T_FOLDLR | T_FOLDRL ) '(' amapexpr= expression ')' )?
+                    int alt51=2;
+                    int LA51_0 = input.LA(1);
+
+                    if ( ((LA51_0 >= T_FOLDLR && LA51_0 <= T_FOLDRL)) ) {
+                        alt51=1;
+                    }
+                    switch (alt51) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:519:12: amap= ( T_FOLDLR | T_FOLDRL ) '(' amapexpr= expression ')'
+                            {
+                            amap=(Token)input.LT(1);
+
+                            if ( (input.LA(1) >= T_FOLDLR && input.LA(1) <= T_FOLDRL) ) {
+                                input.consume();
+                                state.errorRecovery=false;
+                            }
+                            else {
+                                MismatchedSetException mse = new MismatchedSetException(null,input);
+                                throw mse;
+                            }
+
+
+                            match(input,T_LPAREN,FOLLOW_T_LPAREN_in_anonymousOrNamedAction2289); 
+
+                            pushFollow(FOLLOW_expression_in_anonymousOrNamedAction2293);
+                            amapexpr=expression();
+
+                            state._fsp--;
+
+
+                            match(input,T_RPAREN,FOLLOW_T_RPAREN_in_anonymousOrNamedAction2295); 
+
+                            }
+                            break;
+
+                    }
+
+
+                    addNamedActionCallToBlockList(top,aname,m_params,amap,amapexpr);
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:521:4: T_SKIP
+                    {
+                    match(input,T_SKIP,FOLLOW_T_SKIP_in_anonymousOrNamedAction2306); 
+
+                    addSkipStatementToBlockList(top);
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "anonymousOrNamedAction"
+
+
+
+    // $ANTLR start "blockvarlist"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:525:1: blockvarlist[Block seqList] : blockvar[seqList] ( T_SEMICOLON blockvar[seqList] )* ;
+    public final void blockvarlist(Block seqList) throws RecognitionException {
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:526:2: ( blockvar[seqList] ( T_SEMICOLON blockvar[seqList] )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:526:4: blockvar[seqList] ( T_SEMICOLON blockvar[seqList] )*
+            {
+            pushFollow(FOLLOW_blockvar_in_blockvarlist2322);
+            blockvar(seqList);
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:526:23: ( T_SEMICOLON blockvar[seqList] )*
+            loop53:
+            do {
+                int alt53=2;
+                int LA53_0 = input.LA(1);
+
+                if ( (LA53_0==T_SEMICOLON) ) {
+                    alt53=1;
+                }
+
+
+                switch (alt53) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:526:24: T_SEMICOLON blockvar[seqList]
+            	    {
+            	    match(input,T_SEMICOLON,FOLLOW_T_SEMICOLON_in_blockvarlist2327); 
+
+            	    pushFollow(FOLLOW_blockvar_in_blockvarlist2329);
+            	    blockvar(seqList);
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop53;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "blockvarlist"
+
+
+
+    // $ANTLR start "blockvar"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:529:1: blockvar[Block seqList] : varname= T_IDENTIFIER T_COLON aType= complexType ;
+    public final void blockvar(Block seqList) throws RecognitionException {
+        Token varname=null;
+        UlyssesType aType =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:530:2: (varname= T_IDENTIFIER T_COLON aType= complexType )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:530:5: varname= T_IDENTIFIER T_COLON aType= complexType
+            {
+            varname=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_blockvar2349); 
+
+            match(input,T_COLON,FOLLOW_T_COLON_in_blockvar2352); 
+
+            pushFollow(FOLLOW_complexType_in_blockvar2356);
+            aType=complexType();
+
+            state._fsp--;
+
+
+            addBlockVariable(seqList,varname,aType);
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "blockvar"
+
+
+
+    // $ANTLR start "actionBody"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:540:1: actionBody[Block top] returns [Block result] : actionBodyParallel[result] ( T_PRIO actionBodyParallel[result] )? ;
+    public final Block actionBody(Block top) throws RecognitionException {
+        Block result = null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:542:2: ( actionBodyParallel[result] ( T_PRIO actionBodyParallel[result] )? )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:542:4: actionBodyParallel[result] ( T_PRIO actionBodyParallel[result] )?
+            {
+            result = createPrioBlock(top); pushBlockToResolveStack(result);
+
+            pushFollow(FOLLOW_actionBodyParallel_in_actionBody2391);
+            actionBodyParallel(result);
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:543:30: ( T_PRIO actionBodyParallel[result] )?
+            int alt54=2;
+            int LA54_0 = input.LA(1);
+
+            if ( (LA54_0==T_PRIO) ) {
+                alt54=1;
+            }
+            switch (alt54) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:543:31: T_PRIO actionBodyParallel[result]
+                    {
+                    match(input,T_PRIO,FOLLOW_T_PRIO_in_actionBody2395); 
+
+                    pushFollow(FOLLOW_actionBodyParallel_in_actionBody2397);
+                    actionBodyParallel(result);
+
+                    state._fsp--;
+
+
+                    }
+                    break;
+
+            }
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popBlockFromResolveStack(result);
+        }
+        return result;
+    }
+    // $ANTLR end "actionBody"
+
+
+
+    // $ANTLR start "actionBodyParallel"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:548:1: actionBodyParallel[Block top] returns [Block result] : actionBodySequential[result] ( T_NONDET olst= actionBodySequential[result] )* ;
+    public final Block actionBodyParallel(Block top) throws RecognitionException {
+        Block result = null;
+
+
+        SeqBlock olst =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:550:2: ( actionBodySequential[result] ( T_NONDET olst= actionBodySequential[result] )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:550:4: actionBodySequential[result] ( T_NONDET olst= actionBodySequential[result] )*
+            {
+            result = createNondetBlock(top); pushBlockToResolveStack(result);
+
+            pushFollow(FOLLOW_actionBodySequential_in_actionBodyParallel2432);
+            actionBodySequential(result);
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:552:3: ( T_NONDET olst= actionBodySequential[result] )*
+            loop55:
+            do {
+                int alt55=2;
+                int LA55_0 = input.LA(1);
+
+                if ( (LA55_0==T_NONDET) ) {
+                    alt55=1;
+                }
+
+
+                switch (alt55) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:552:4: T_NONDET olst= actionBodySequential[result]
+            	    {
+            	    match(input,T_NONDET,FOLLOW_T_NONDET_in_actionBodyParallel2438); 
+
+            	    pushFollow(FOLLOW_actionBodySequential_in_actionBodyParallel2442);
+            	    olst=actionBodySequential(result);
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop55;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popBlockFromResolveStack(result);
+        }
+        return result;
+    }
+    // $ANTLR end "actionBodyParallel"
+
+
+
+    // $ANTLR start "actionBodySequential"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:559:1: actionBodySequential[Block top] returns [SeqBlock result] : ( T_VAR syms= blockvarlist[result] ( '&' sexpr= expression )? T_COLON )? actionBodyParen[result] ( T_SEMICOLON actionBodyParen[result] )* ;
+    public final SeqBlock actionBodySequential(Block top) throws RecognitionException {
+        SeqBlock result = null;
+
+
+        Expression sexpr =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:561:2: ( ( T_VAR syms= blockvarlist[result] ( '&' sexpr= expression )? T_COLON )? actionBodyParen[result] ( T_SEMICOLON actionBodyParen[result] )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:561:4: ( T_VAR syms= blockvarlist[result] ( '&' sexpr= expression )? T_COLON )? actionBodyParen[result] ( T_SEMICOLON actionBodyParen[result] )*
+            {
+            result = createSeqBlock(top); pushBlockToResolveStack(result);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:562:3: ( T_VAR syms= blockvarlist[result] ( '&' sexpr= expression )? T_COLON )?
+            int alt57=2;
+            int LA57_0 = input.LA(1);
+
+            if ( (LA57_0==T_VAR) ) {
+                alt57=1;
+            }
+            switch (alt57) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:562:4: T_VAR syms= blockvarlist[result] ( '&' sexpr= expression )? T_COLON
+                    {
+                    match(input,T_VAR,FOLLOW_T_VAR_in_actionBodySequential2478); 
+
+                    pushFollow(FOLLOW_blockvarlist_in_actionBodySequential2482);
+                    blockvarlist(result);
+
+                    state._fsp--;
+
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:562:36: ( '&' sexpr= expression )?
+                    int alt56=2;
+                    int LA56_0 = input.LA(1);
+
+                    if ( (LA56_0==118) ) {
+                        alt56=1;
+                    }
+                    switch (alt56) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:562:37: '&' sexpr= expression
+                            {
+                            match(input,118,FOLLOW_118_in_actionBodySequential2486); 
+
+                            pushFollow(FOLLOW_expression_in_actionBodySequential2490);
+                            sexpr=expression();
+
+                            state._fsp--;
+
+
+                            addSeqBlockExpression(result,sexpr);
+
+                            }
+                            break;
+
+                    }
+
+
+                    match(input,T_COLON,FOLLOW_T_COLON_in_actionBodySequential2497); 
+
+                    }
+                    break;
+
+            }
+
+
+            pushFollow(FOLLOW_actionBodyParen_in_actionBodySequential2505);
+            actionBodyParen(result);
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:563:28: ( T_SEMICOLON actionBodyParen[result] )*
+            loop58:
+            do {
+                int alt58=2;
+                int LA58_0 = input.LA(1);
+
+                if ( (LA58_0==T_SEMICOLON) ) {
+                    alt58=1;
+                }
+
+
+                switch (alt58) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:563:29: T_SEMICOLON actionBodyParen[result]
+            	    {
+            	    match(input,T_SEMICOLON,FOLLOW_T_SEMICOLON_in_actionBodySequential2509); 
+
+            	    pushFollow(FOLLOW_actionBodyParen_in_actionBodySequential2511);
+            	    actionBodyParen(result);
+
+            	    state._fsp--;
+
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop58;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popBlockFromResolveStack(result);
+        }
+        return result;
+    }
+    // $ANTLR end "actionBodySequential"
+
+
+
+    // $ANTLR start "actionBodyParen"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:569:1: actionBodyParen[SeqBlock top] : ( T_LPAREN actionBody[top] T_RPAREN |stmt= statement );
+    public final void actionBodyParen(SeqBlock top) throws RecognitionException {
+        Statement stmt =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:570:2: ( T_LPAREN actionBody[top] T_RPAREN |stmt= statement )
+            int alt59=2;
+            int LA59_0 = input.LA(1);
+
+            if ( (LA59_0==T_LPAREN) ) {
+                alt59=1;
+            }
+            else if ( (LA59_0==T_ABORT||LA59_0==T_BREAK||LA59_0==T_IDENTIFIER||LA59_0==T_KILL||LA59_0==T_REQUIRES||LA59_0==T_SELF||LA59_0==T_SKIP) ) {
+                alt59=2;
+            }
+            else {
+                NoViableAltException nvae =
+                    new NoViableAltException("", 59, 0, input);
+
+                throw nvae;
+
+            }
+            switch (alt59) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:570:5: T_LPAREN actionBody[top] T_RPAREN
+                    {
+                    match(input,T_LPAREN,FOLLOW_T_LPAREN_in_actionBodyParen2539); 
+
+                    pushFollow(FOLLOW_actionBody_in_actionBodyParen2541);
+                    actionBody(top);
+
+                    state._fsp--;
+
+
+                    match(input,T_RPAREN,FOLLOW_T_RPAREN_in_actionBodyParen2545); 
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:571:4: stmt= statement
+                    {
+                    pushFollow(FOLLOW_statement_in_actionBodyParen2552);
+                    stmt=statement();
+
+                    state._fsp--;
+
+
+                    addToStatementList(top,stmt);
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "actionBodyParen"
+
+
+
+    // $ANTLR start "statement"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:576:1: statement returns [Statement result] : ( T_ABORT | T_SKIP | T_BREAK | T_KILL T_LPAREN aname= ( T_IDENTIFIER | T_SELF ) T_RPAREN |gc= discreteActionBody |aqname= reference ( T_ASSIGNMENT aexp= expression ( T_WITH ndexp= expression )? | ( T_COMMA malhs= reference )+ T_ASSIGNMENT mexp= expression ( T_COMMA mexp2= expression )+ ( T_WITH ndex2= expression )? |) );
+    public final Statement statement() throws RecognitionException {
+        Statement result = null;
+
+
+        Token aname=null;
+        GuardedCommand gc =null;
+
+        Expression aqname =null;
+
+        Expression aexp =null;
+
+        Expression ndexp =null;
+
+        Expression malhs =null;
+
+        Expression mexp =null;
+
+        Expression mexp2 =null;
+
+        Expression ndex2 =null;
+
+
+
+        		boolean popFromResolveStack = false;
+        		result = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:582:2: ( T_ABORT | T_SKIP | T_BREAK | T_KILL T_LPAREN aname= ( T_IDENTIFIER | T_SELF ) T_RPAREN |gc= discreteActionBody |aqname= reference ( T_ASSIGNMENT aexp= expression ( T_WITH ndexp= expression )? | ( T_COMMA malhs= reference )+ T_ASSIGNMENT mexp= expression ( T_COMMA mexp2= expression )+ ( T_WITH ndex2= expression )? |) )
+            int alt65=6;
+            switch ( input.LA(1) ) {
+            case T_ABORT:
+                {
+                alt65=1;
+                }
+                break;
+            case T_SKIP:
+                {
+                alt65=2;
+                }
+                break;
+            case T_BREAK:
+                {
+                alt65=3;
+                }
+                break;
+            case T_KILL:
+                {
+                alt65=4;
+                }
+                break;
+            case T_REQUIRES:
+                {
+                alt65=5;
+                }
+                break;
+            case T_IDENTIFIER:
+            case T_SELF:
+                {
+                alt65=6;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 65, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt65) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:582:4: T_ABORT
+                    {
+                    match(input,T_ABORT,FOLLOW_T_ABORT_in_statement2580); 
+
+                    result = createAbortStatement();
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:583:4: T_SKIP
+                    {
+                    match(input,T_SKIP,FOLLOW_T_SKIP_in_statement2587); 
+
+                    result = createSkipStatement();
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:584:4: T_BREAK
+                    {
+                    match(input,T_BREAK,FOLLOW_T_BREAK_in_statement2594); 
+
+                    result = createBreakStatement();
+
+                    }
+                    break;
+                case 4 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:585:4: T_KILL T_LPAREN aname= ( T_IDENTIFIER | T_SELF ) T_RPAREN
+                    {
+                    match(input,T_KILL,FOLLOW_T_KILL_in_statement2601); 
+
+                    match(input,T_LPAREN,FOLLOW_T_LPAREN_in_statement2603); 
+
+                    aname=(Token)input.LT(1);
+
+                    if ( input.LA(1)==T_IDENTIFIER||input.LA(1)==T_SELF ) {
+                        input.consume();
+                        state.errorRecovery=false;
+                    }
+                    else {
+                        MismatchedSetException mse = new MismatchedSetException(null,input);
+                        throw mse;
+                    }
+
+
+                    match(input,T_RPAREN,FOLLOW_T_RPAREN_in_statement2615); 
+
+                    result = createKillStatement(aname);
+
+                    }
+                    break;
+                case 5 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:586:5: gc= discreteActionBody
+                    {
+                    pushFollow(FOLLOW_discreteActionBody_in_statement2625);
+                    gc=discreteActionBody();
+
+                    state._fsp--;
+
+
+                    result = gc;
+
+                    }
+                    break;
+                case 6 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:587:4: aqname= reference ( T_ASSIGNMENT aexp= expression ( T_WITH ndexp= expression )? | ( T_COMMA malhs= reference )+ T_ASSIGNMENT mexp= expression ( T_COMMA mexp2= expression )+ ( T_WITH ndex2= expression )? |)
+                    {
+                    pushFollow(FOLLOW_reference_in_statement2634);
+                    aqname=reference();
+
+                    state._fsp--;
+
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:588:7: ( T_ASSIGNMENT aexp= expression ( T_WITH ndexp= expression )? | ( T_COMMA malhs= reference )+ T_ASSIGNMENT mexp= expression ( T_COMMA mexp2= expression )+ ( T_WITH ndex2= expression )? |)
+                    int alt64=3;
+                    switch ( input.LA(1) ) {
+                    case T_ASSIGNMENT:
+                        {
+                        alt64=1;
+                        }
+                        break;
+                    case T_COMMA:
+                        {
+                        alt64=2;
+                        }
+                        break;
+                    case T_END:
+                    case T_NONDET:
+                    case T_PRIO:
+                    case T_RPAREN:
+                    case T_SEMICOLON:
+                        {
+                        alt64=3;
+                        }
+                        break;
+                    default:
+                        NoViableAltException nvae =
+                            new NoViableAltException("", 64, 0, input);
+
+                        throw nvae;
+
+                    }
+
+                    switch (alt64) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:589:12: T_ASSIGNMENT aexp= expression ( T_WITH ndexp= expression )?
+                            {
+                            match(input,T_ASSIGNMENT,FOLLOW_T_ASSIGNMENT_in_statement2662); 
+
+                            pushFollow(FOLLOW_expression_in_statement2667);
+                            aexp=expression();
+
+                            state._fsp--;
+
+
+                            result = createSingleAssignmentStatement(aqname,aexp);
+
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:590:15: ( T_WITH ndexp= expression )?
+                            int alt60=2;
+                            int LA60_0 = input.LA(1);
+
+                            if ( (LA60_0==T_WITH) ) {
+                                alt60=1;
+                            }
+                            switch (alt60) {
+                                case 1 :
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:590:16: T_WITH ndexp= expression
+                                    {
+                                    match(input,T_WITH,FOLLOW_T_WITH_in_statement2687); 
+
+                                    pushFollow(FOLLOW_expression_in_statement2691);
+                                    ndexp=expression();
+
+                                    state._fsp--;
+
+
+                                    addConstraintToAssignment(result,ndexp);
+
+                                    }
+                                    break;
+
+                            }
+
+
+                            }
+                            break;
+                        case 2 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:593:8: ( T_COMMA malhs= reference )+ T_ASSIGNMENT mexp= expression ( T_COMMA mexp2= expression )+ ( T_WITH ndex2= expression )?
+                            {
+                            result = createMultipleAssignmentStatementLHS(aqname);
+
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:594:7: ( T_COMMA malhs= reference )+
+                            int cnt61=0;
+                            loop61:
+                            do {
+                                int alt61=2;
+                                int LA61_0 = input.LA(1);
+
+                                if ( (LA61_0==T_COMMA) ) {
+                                    alt61=1;
+                                }
+
+
+                                switch (alt61) {
+                            	case 1 :
+                            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:594:8: T_COMMA malhs= reference
+                            	    {
+                            	    match(input,T_COMMA,FOLLOW_T_COMMA_in_statement2744); 
+
+                            	    pushFollow(FOLLOW_reference_in_statement2748);
+                            	    malhs=reference();
+
+                            	    state._fsp--;
+
+
+                            	    addMultipleAssignmentStatementLHS(result,malhs);
+
+                            	    }
+                            	    break;
+
+                            	default :
+                            	    if ( cnt61 >= 1 ) break loop61;
+                                        EarlyExitException eee =
+                                            new EarlyExitException(61, input);
+                                        throw eee;
+                                }
+                                cnt61++;
+                            } while (true);
+
+
+                            match(input,T_ASSIGNMENT,FOLLOW_T_ASSIGNMENT_in_statement2763); 
+
+                            pushAssignmentOnResolveStack(result); popFromResolveStack = true;
+
+                            pushFollow(FOLLOW_expression_in_statement2785);
+                            mexp=expression();
+
+                            state._fsp--;
+
+
+                            addMutlipleAssignmentStatementRHS(result,mexp);
+
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:599:8: ( T_COMMA mexp2= expression )+
+                            int cnt62=0;
+                            loop62:
+                            do {
+                                int alt62=2;
+                                int LA62_0 = input.LA(1);
+
+                                if ( (LA62_0==T_COMMA) ) {
+                                    alt62=1;
+                                }
+
+
+                                switch (alt62) {
+                            	case 1 :
+                            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:599:9: T_COMMA mexp2= expression
+                            	    {
+                            	    match(input,T_COMMA,FOLLOW_T_COMMA_in_statement2804); 
+
+                            	    pushFollow(FOLLOW_expression_in_statement2808);
+                            	    mexp2=expression();
+
+                            	    state._fsp--;
+
+
+                            	    addMutlipleAssignmentStatementRHS(result,mexp2);
+
+                            	    }
+                            	    break;
+
+                            	default :
+                            	    if ( cnt62 >= 1 ) break loop62;
+                                        EarlyExitException eee =
+                                            new EarlyExitException(62, input);
+                                        throw eee;
+                                }
+                                cnt62++;
+                            } while (true);
+
+
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:600:8: ( T_WITH ndex2= expression )?
+                            int alt63=2;
+                            int LA63_0 = input.LA(1);
+
+                            if ( (LA63_0==T_WITH) ) {
+                                alt63=1;
+                            }
+                            switch (alt63) {
+                                case 1 :
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:600:9: T_WITH ndex2= expression
+                                    {
+                                    match(input,T_WITH,FOLLOW_T_WITH_in_statement2822); 
+
+                                    pushFollow(FOLLOW_expression_in_statement2826);
+                                    ndex2=expression();
+
+                                    state._fsp--;
+
+
+                                    addConstraintToAssignment(result,ndex2);
+
+                                    }
+                                    break;
+
+                            }
+
+
+                            }
+                            break;
+                        case 3 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:603:7: 
+                            {
+                            result = createCallStatement(aqname);
+
+                            }
+                            break;
+
+                    }
+
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+
+            	       if (popFromResolveStack == true)
+            	            popAssignmentOffResolveStack(result);
+            	
+        }
+        return result;
+    }
+    // $ANTLR end "statement"
+
+
+
+    // $ANTLR start "expression"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:614:1: expression returns [Expression expr] : left= atomExpression (op= binoperator right= atomExpression )* ;
+    public final Expression expression() throws RecognitionException {
+        Expression expr = null;
+
+
+        Expression left =null;
+
+        BinaryOperator op =null;
+
+        Expression right =null;
+
+
+
+        		ArrayList<BinaryOperator> operators = new ArrayList<BinaryOperator>();
+        		ArrayList<Expression> expressions = new ArrayList<Expression>();		
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:620:2: (left= atomExpression (op= binoperator right= atomExpression )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:620:4: left= atomExpression (op= binoperator right= atomExpression )*
+            {
+            pushFollow(FOLLOW_atomExpression_in_expression2901);
+            left=atomExpression();
+
+            state._fsp--;
+
+
+            expressions.add(left);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:622:3: (op= binoperator right= atomExpression )*
+            loop66:
+            do {
+                int alt66=2;
+                int LA66_0 = input.LA(1);
+
+                if ( (LA66_0==T_AND||LA66_0==T_BIIMPLIES||LA66_0==T_CONC||LA66_0==T_DIFF||LA66_0==T_DIV||(LA66_0 >= T_DOMRESBY && LA66_0 <= T_DOMRESTO)||LA66_0==T_EQUAL||(LA66_0 >= T_GREATER && LA66_0 <= T_GREATEREQUAL)||LA66_0==T_IDIV||(LA66_0 >= T_IMPLIES && LA66_0 <= T_IN)||LA66_0==T_INTER||(LA66_0 >= T_LESS && LA66_0 <= T_LESSEQUAL)||(LA66_0 >= T_MINUS && LA66_0 <= T_MUNION)||(LA66_0 >= T_NOT && LA66_0 <= T_NOTEQUAL)||LA66_0==T_OR||LA66_0==T_POW||LA66_0==T_PROD||(LA66_0 >= T_RNGRESBY && LA66_0 <= T_RNGRESTO)||LA66_0==T_SEQMOD_MAPOVERRIDE||(LA66_0 >= T_SUBSET && LA66_0 <= T_SUM)||LA66_0==T_UNION) ) {
+                    alt66=1;
+                }
+
+
+                switch (alt66) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:622:5: op= binoperator right= atomExpression
+            	    {
+            	    pushFollow(FOLLOW_binoperator_in_expression2914);
+            	    op=binoperator();
+
+            	    state._fsp--;
+
+
+            	    pushFollow(FOLLOW_atomExpression_in_expression2922);
+            	    right=atomExpression();
+
+            	    state._fsp--;
+
+
+
+            	    		  	if (op != null) {
+            	    		  		operators.add(op);
+            	    		  		expressions.add(right);
+            	    		  	}
+            	    		  
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop66;
+                }
+            } while (true);
+
+
+            expr = createPrecedenceTree(expressions,operators);
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return expr;
+    }
+    // $ANTLR end "expression"
+
+
+
+    // $ANTLR start "binoperator"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:635:1: binoperator returns [BinaryOperator binop] : ( T_BIIMPLIES | T_GREATER | T_GREATEREQUAL | T_LESS | T_LESSEQUAL | T_EQUAL | T_NOTEQUAL | T_IMPLIES | T_MINUS | T_SUM | T_IN ( T_SET )? | T_NOT T_IN ( T_SET )? | T_SUBSET | T_OR | T_DIV | T_PROD | T_IDIV | T_MOD | T_UNION | T_DIFF | T_INTER | T_AND | T_POW | T_CONC | T_DOMRESBY | T_DOMRESTO | T_RNGRESBY | T_RNGRESTO | T_MUNION | T_SEQMOD_MAPOVERRIDE );
+    public final BinaryOperator binoperator() throws RecognitionException {
+        BinaryOperator binop = null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:637:2: ( T_BIIMPLIES | T_GREATER | T_GREATEREQUAL | T_LESS | T_LESSEQUAL | T_EQUAL | T_NOTEQUAL | T_IMPLIES | T_MINUS | T_SUM | T_IN ( T_SET )? | T_NOT T_IN ( T_SET )? | T_SUBSET | T_OR | T_DIV | T_PROD | T_IDIV | T_MOD | T_UNION | T_DIFF | T_INTER | T_AND | T_POW | T_CONC | T_DOMRESBY | T_DOMRESTO | T_RNGRESBY | T_RNGRESTO | T_MUNION | T_SEQMOD_MAPOVERRIDE )
+            int alt69=30;
+            switch ( input.LA(1) ) {
+            case T_BIIMPLIES:
+                {
+                alt69=1;
+                }
+                break;
+            case T_GREATER:
+                {
+                alt69=2;
+                }
+                break;
+            case T_GREATEREQUAL:
+                {
+                alt69=3;
+                }
+                break;
+            case T_LESS:
+                {
+                alt69=4;
+                }
+                break;
+            case T_LESSEQUAL:
+                {
+                alt69=5;
+                }
+                break;
+            case T_EQUAL:
+                {
+                alt69=6;
+                }
+                break;
+            case T_NOTEQUAL:
+                {
+                alt69=7;
+                }
+                break;
+            case T_IMPLIES:
+                {
+                alt69=8;
+                }
+                break;
+            case T_MINUS:
+                {
+                alt69=9;
+                }
+                break;
+            case T_SUM:
+                {
+                alt69=10;
+                }
+                break;
+            case T_IN:
+                {
+                alt69=11;
+                }
+                break;
+            case T_NOT:
+                {
+                alt69=12;
+                }
+                break;
+            case T_SUBSET:
+                {
+                alt69=13;
+                }
+                break;
+            case T_OR:
+                {
+                alt69=14;
+                }
+                break;
+            case T_DIV:
+                {
+                alt69=15;
+                }
+                break;
+            case T_PROD:
+                {
+                alt69=16;
+                }
+                break;
+            case T_IDIV:
+                {
+                alt69=17;
+                }
+                break;
+            case T_MOD:
+                {
+                alt69=18;
+                }
+                break;
+            case T_UNION:
+                {
+                alt69=19;
+                }
+                break;
+            case T_DIFF:
+                {
+                alt69=20;
+                }
+                break;
+            case T_INTER:
+                {
+                alt69=21;
+                }
+                break;
+            case T_AND:
+                {
+                alt69=22;
+                }
+                break;
+            case T_POW:
+                {
+                alt69=23;
+                }
+                break;
+            case T_CONC:
+                {
+                alt69=24;
+                }
+                break;
+            case T_DOMRESBY:
+                {
+                alt69=25;
+                }
+                break;
+            case T_DOMRESTO:
+                {
+                alt69=26;
+                }
+                break;
+            case T_RNGRESBY:
+                {
+                alt69=27;
+                }
+                break;
+            case T_RNGRESTO:
+                {
+                alt69=28;
+                }
+                break;
+            case T_MUNION:
+                {
+                alt69=29;
+                }
+                break;
+            case T_SEQMOD_MAPOVERRIDE:
+                {
+                alt69=30;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 69, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt69) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:637:4: T_BIIMPLIES
+                    {
+                    match(input,T_BIIMPLIES,FOLLOW_T_BIIMPLIES_in_binoperator2955); 
+
+                    binop = createBinaryOperator(ExpressionKind.biimplies);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:639:4: T_GREATER
+                    {
+                    match(input,T_GREATER,FOLLOW_T_GREATER_in_binoperator2964); 
+
+                    binop = createBinaryOperator(ExpressionKind.greater);
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:641:4: T_GREATEREQUAL
+                    {
+                    match(input,T_GREATEREQUAL,FOLLOW_T_GREATEREQUAL_in_binoperator2974); 
+
+                    binop = createBinaryOperator(ExpressionKind.greaterequal);
+
+                    }
+                    break;
+                case 4 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:643:4: T_LESS
+                    {
+                    match(input,T_LESS,FOLLOW_T_LESS_in_binoperator2983); 
+
+                    binop = createBinaryOperator(ExpressionKind.less);
+
+                    }
+                    break;
+                case 5 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:645:4: T_LESSEQUAL
+                    {
+                    match(input,T_LESSEQUAL,FOLLOW_T_LESSEQUAL_in_binoperator2993); 
+
+                    binop = createBinaryOperator(ExpressionKind.lessequal);
+
+                    }
+                    break;
+                case 6 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:647:4: T_EQUAL
+                    {
+                    match(input,T_EQUAL,FOLLOW_T_EQUAL_in_binoperator3002); 
+
+                    binop = createBinaryOperator(ExpressionKind.equal);
+
+                    }
+                    break;
+                case 7 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:649:4: T_NOTEQUAL
+                    {
+                    match(input,T_NOTEQUAL,FOLLOW_T_NOTEQUAL_in_binoperator3014); 
+
+                    binop = createBinaryOperator(ExpressionKind.notequal);
+
+                    }
+                    break;
+                case 8 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:651:4: T_IMPLIES
+                    {
+                    match(input,T_IMPLIES,FOLLOW_T_IMPLIES_in_binoperator3025); 
+
+                    binop = createBinaryOperator(ExpressionKind.implies);
+
+                    }
+                    break;
+                case 9 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:653:4: T_MINUS
+                    {
+                    match(input,T_MINUS,FOLLOW_T_MINUS_in_binoperator3034); 
+
+                    binop = createBinaryOperator(ExpressionKind.minus);
+
+                    }
+                    break;
+                case 10 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:655:4: T_SUM
+                    {
+                    match(input,T_SUM,FOLLOW_T_SUM_in_binoperator3044); 
+
+                    binop = createBinaryOperator(ExpressionKind.sum);
+
+                    }
+                    break;
+                case 11 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:657:4: T_IN ( T_SET )?
+                    {
+                    match(input,T_IN,FOLLOW_T_IN_in_binoperator3054); 
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:657:9: ( T_SET )?
+                    int alt67=2;
+                    int LA67_0 = input.LA(1);
+
+                    if ( (LA67_0==T_SET) ) {
+                        alt67=1;
+                    }
+                    switch (alt67) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:657:9: T_SET
+                            {
+                            match(input,T_SET,FOLLOW_T_SET_in_binoperator3056); 
+
+                            }
+                            break;
+
+                    }
+
+
+                    binop = createBinaryOperator(ExpressionKind.elemin);
+
+                    }
+                    break;
+                case 12 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:659:4: T_NOT T_IN ( T_SET )?
+                    {
+                    match(input,T_NOT,FOLLOW_T_NOT_in_binoperator3067); 
+
+                    match(input,T_IN,FOLLOW_T_IN_in_binoperator3069); 
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:659:15: ( T_SET )?
+                    int alt68=2;
+                    int LA68_0 = input.LA(1);
+
+                    if ( (LA68_0==T_SET) ) {
+                        alt68=1;
+                    }
+                    switch (alt68) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:659:15: T_SET
+                            {
+                            match(input,T_SET,FOLLOW_T_SET_in_binoperator3071); 
+
+                            }
+                            break;
+
+                    }
+
+
+                    binop = createBinaryOperator(ExpressionKind.notelemin);
+
+                    }
+                    break;
+                case 13 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:661:4: T_SUBSET
+                    {
+                    match(input,T_SUBSET,FOLLOW_T_SUBSET_in_binoperator3082); 
+
+                    binop = createBinaryOperator(ExpressionKind.subset);
+
+                    }
+                    break;
+                case 14 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:663:4: T_OR
+                    {
+                    match(input,T_OR,FOLLOW_T_OR_in_binoperator3092); 
+
+                    binop = createBinaryOperator(ExpressionKind.or);
+
+                    }
+                    break;
+                case 15 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:665:4: T_DIV
+                    {
+                    match(input,T_DIV,FOLLOW_T_DIV_in_binoperator3101); 
+
+                    binop = createBinaryOperator(ExpressionKind.div);
+
+                    }
+                    break;
+                case 16 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:667:4: T_PROD
+                    {
+                    match(input,T_PROD,FOLLOW_T_PROD_in_binoperator3110); 
+
+                    binop = createBinaryOperator(ExpressionKind.prod);
+
+                    }
+                    break;
+                case 17 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:669:4: T_IDIV
+                    {
+                    match(input,T_IDIV,FOLLOW_T_IDIV_in_binoperator3120); 
+
+                    binop = createBinaryOperator(ExpressionKind.idiv);
+
+                    }
+                    break;
+                case 18 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:671:4: T_MOD
+                    {
+                    match(input,T_MOD,FOLLOW_T_MOD_in_binoperator3130); 
+
+                    binop = createBinaryOperator(ExpressionKind.mod);
+
+                    }
+                    break;
+                case 19 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:673:4: T_UNION
+                    {
+                    match(input,T_UNION,FOLLOW_T_UNION_in_binoperator3140); 
+
+                    binop = createBinaryOperator(ExpressionKind.union);
+
+                    }
+                    break;
+                case 20 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:675:4: T_DIFF
+                    {
+                    match(input,T_DIFF,FOLLOW_T_DIFF_in_binoperator3151); 
+
+                    binop = createBinaryOperator(ExpressionKind.diff);
+
+                    }
+                    break;
+                case 21 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:677:4: T_INTER
+                    {
+                    match(input,T_INTER,FOLLOW_T_INTER_in_binoperator3162); 
+
+                    binop = createBinaryOperator(ExpressionKind.inter);
+
+                    }
+                    break;
+                case 22 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:679:4: T_AND
+                    {
+                    match(input,T_AND,FOLLOW_T_AND_in_binoperator3173); 
+
+                    binop = createBinaryOperator(ExpressionKind.and);
+
+                    }
+                    break;
+                case 23 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:681:4: T_POW
+                    {
+                    match(input,T_POW,FOLLOW_T_POW_in_binoperator3188); 
+
+                    binop = createBinaryOperator(ExpressionKind.pow);
+
+                    }
+                    break;
+                case 24 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:683:4: T_CONC
+                    {
+                    match(input,T_CONC,FOLLOW_T_CONC_in_binoperator3203); 
+
+                    binop = createBinaryOperator(ExpressionKind.conc);
+
+                    }
+                    break;
+                case 25 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:685:4: T_DOMRESBY
+                    {
+                    match(input,T_DOMRESBY,FOLLOW_T_DOMRESBY_in_binoperator3216); 
+
+                    binop = createBinaryOperator(ExpressionKind.domresby);
+
+                    }
+                    break;
+                case 26 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:687:4: T_DOMRESTO
+                    {
+                    match(input,T_DOMRESTO,FOLLOW_T_DOMRESTO_in_binoperator3226); 
+
+                    binop = createBinaryOperator(ExpressionKind.domresto);
+
+                    }
+                    break;
+                case 27 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:689:4: T_RNGRESBY
+                    {
+                    match(input,T_RNGRESBY,FOLLOW_T_RNGRESBY_in_binoperator3236); 
+
+                    binop = createBinaryOperator(ExpressionKind.rngresby);
+
+                    }
+                    break;
+                case 28 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:691:4: T_RNGRESTO
+                    {
+                    match(input,T_RNGRESTO,FOLLOW_T_RNGRESTO_in_binoperator3246); 
+
+                    binop = createBinaryOperator(ExpressionKind.rngresto);
+
+                    }
+                    break;
+                case 29 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:693:4: T_MUNION
+                    {
+                    match(input,T_MUNION,FOLLOW_T_MUNION_in_binoperator3256); 
+
+                    binop = createBinaryOperator(ExpressionKind.munion);
+
+                    }
+                    break;
+                case 30 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:695:4: T_SEQMOD_MAPOVERRIDE
+                    {
+                    match(input,T_SEQMOD_MAPOVERRIDE,FOLLOW_T_SEQMOD_MAPOVERRIDE_in_binoperator3266); 
+
+                    binop = createBinaryOperator(ExpressionKind.seqmod_mapoverride);
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return binop;
+    }
+    // $ANTLR end "binoperator"
+
+
+
+    // $ANTLR start "atomExpression"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:701:1: atomExpression returns [Expression expr] : ( ( (unexpr= op_un )? (e= identifierExpression |e= qvalExpression |e= constant |e= initializedComplexType |e= quantifierExpression | T_LPAREN e= expression T_RPAREN ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[e] )? |e= accessExpression[e] )? ) ( 'as' cid= T_IDENTIFIER )? ) |ie= T_IF ce= expression T_THEN te= expression T_ELSE ee= expression T_END );
+    public final Expression atomExpression() throws RecognitionException {
+        Expression expr = null;
+
+
+        Token idn=null;
+        Token cid=null;
+        Token ie=null;
+        UnaryOperator unexpr =null;
+
+        Expression e =null;
+
+        Expression res =null;
+
+        Expression ce =null;
+
+        Expression te =null;
+
+        Expression ee =null;
+
+
+
+        		expr = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:706:2: ( ( (unexpr= op_un )? (e= identifierExpression |e= qvalExpression |e= constant |e= initializedComplexType |e= quantifierExpression | T_LPAREN e= expression T_RPAREN ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[e] )? |e= accessExpression[e] )? ) ( 'as' cid= T_IDENTIFIER )? ) |ie= T_IF ce= expression T_THEN te= expression T_ELSE ee= expression T_END )
+            int alt76=2;
+            int LA76_0 = input.LA(1);
+
+            if ( (LA76_0==T_ABS||(LA76_0 >= T_CARD && LA76_0 <= T_CBRL)||LA76_0==T_DCONC||LA76_0==T_DINTER||LA76_0==T_DOM||(LA76_0 >= T_DUNION && LA76_0 <= T_ELEMS)||(LA76_0 >= T_EXISTS && LA76_0 <= T_FALSE)||LA76_0==T_FLOATNUMBER||LA76_0==T_FORALL||(LA76_0 >= T_HEAD && LA76_0 <= T_IDENTIFIER)||LA76_0==T_INDS||LA76_0==T_INTNUMBER||LA76_0==T_LEN||(LA76_0 >= T_LPAREN && LA76_0 <= T_LSQPAREN)||LA76_0==T_MERGE||LA76_0==T_MINUS||(LA76_0 >= T_NEW && LA76_0 <= T_NIL)||LA76_0==T_NOT||LA76_0==T_RNG||LA76_0==T_SELF||LA76_0==T_STRINGLITERAL||LA76_0==T_TAIL||LA76_0==T_TRUE||LA76_0==125) ) {
+                alt76=1;
+            }
+            else if ( (LA76_0==T_IF) ) {
+                alt76=2;
+            }
+            else {
+                NoViableAltException nvae =
+                    new NoViableAltException("", 76, 0, input);
+
+                throw nvae;
+
+            }
+            switch (alt76) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:706:4: ( (unexpr= op_un )? (e= identifierExpression |e= qvalExpression |e= constant |e= initializedComplexType |e= quantifierExpression | T_LPAREN e= expression T_RPAREN ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[e] )? |e= accessExpression[e] )? ) ( 'as' cid= T_IDENTIFIER )? )
+                    {
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:706:4: ( (unexpr= op_un )? (e= identifierExpression |e= qvalExpression |e= constant |e= initializedComplexType |e= quantifierExpression | T_LPAREN e= expression T_RPAREN ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[e] )? |e= accessExpression[e] )? ) ( 'as' cid= T_IDENTIFIER )? )
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:706:5: (unexpr= op_un )? (e= identifierExpression |e= qvalExpression |e= constant |e= initializedComplexType |e= quantifierExpression | T_LPAREN e= expression T_RPAREN ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[e] )? |e= accessExpression[e] )? ) ( 'as' cid= T_IDENTIFIER )?
+                    {
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:706:11: (unexpr= op_un )?
+                    int alt70=2;
+                    int LA70_0 = input.LA(1);
+
+                    if ( (LA70_0==T_ABS||LA70_0==T_CARD||LA70_0==T_DCONC||LA70_0==T_DINTER||LA70_0==T_DOM||(LA70_0 >= T_DUNION && LA70_0 <= T_ELEMS)||LA70_0==T_HEAD||LA70_0==T_INDS||LA70_0==T_LEN||LA70_0==T_MERGE||LA70_0==T_MINUS||LA70_0==T_NOT||LA70_0==T_RNG||LA70_0==T_TAIL) ) {
+                        alt70=1;
+                    }
+                    switch (alt70) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:706:11: unexpr= op_un
+                            {
+                            pushFollow(FOLLOW_op_un_in_atomExpression3304);
+                            unexpr=op_un();
+
+                            state._fsp--;
+
+
+                            }
+                            break;
+
+                    }
+
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:706:19: (e= identifierExpression |e= qvalExpression |e= constant |e= initializedComplexType |e= quantifierExpression | T_LPAREN e= expression T_RPAREN ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[e] )? |e= accessExpression[e] )? )
+                    int alt74=6;
+                    alt74 = dfa74.predict(input);
+                    switch (alt74) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:707:8: e= identifierExpression
+                            {
+                            pushFollow(FOLLOW_identifierExpression_in_atomExpression3321);
+                            e=identifierExpression();
+
+                            state._fsp--;
+
+
+                            }
+                            break;
+                        case 2 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:708:8: e= qvalExpression
+                            {
+                            pushFollow(FOLLOW_qvalExpression_in_atomExpression3332);
+                            e=qvalExpression();
+
+                            state._fsp--;
+
+
+                            }
+                            break;
+                        case 3 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:709:8: e= constant
+                            {
+                            pushFollow(FOLLOW_constant_in_atomExpression3343);
+                            e=constant();
+
+                            state._fsp--;
+
+
+                            }
+                            break;
+                        case 4 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:710:8: e= initializedComplexType
+                            {
+                            pushFollow(FOLLOW_initializedComplexType_in_atomExpression3354);
+                            e=initializedComplexType();
+
+                            state._fsp--;
+
+
+                            }
+                            break;
+                        case 5 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:711:8: e= quantifierExpression
+                            {
+                            pushFollow(FOLLOW_quantifierExpression_in_atomExpression3366);
+                            e=quantifierExpression();
+
+                            state._fsp--;
+
+
+                            }
+                            break;
+                        case 6 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:712:8: T_LPAREN e= expression T_RPAREN ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[e] )? |e= accessExpression[e] )?
+                            {
+                            match(input,T_LPAREN,FOLLOW_T_LPAREN_in_atomExpression3375); 
+
+                            pushFollow(FOLLOW_expression_in_atomExpression3379);
+                            e=expression();
+
+                            state._fsp--;
+
+
+                            match(input,T_RPAREN,FOLLOW_T_RPAREN_in_atomExpression3381); 
+
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:713:8: ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[e] )? |e= accessExpression[e] )?
+                            int alt73=3;
+                            int LA73_0 = input.LA(1);
+
+                            if ( (LA73_0==T_POINT) ) {
+                                alt73=1;
+                            }
+                            else if ( ((LA73_0 >= T_LPAREN && LA73_0 <= T_LSQPAREN)) ) {
+                                alt73=2;
+                            }
+                            switch (alt73) {
+                                case 1 :
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:714:6: ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[e] )?
+                                    {
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:714:6: ( T_POINT idn= T_IDENTIFIER )+
+                                    int cnt71=0;
+                                    loop71:
+                                    do {
+                                        int alt71=2;
+                                        int LA71_0 = input.LA(1);
+
+                                        if ( (LA71_0==T_POINT) ) {
+                                            alt71=1;
+                                        }
+
+
+                                        switch (alt71) {
+                                    	case 1 :
+                                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:714:7: T_POINT idn= T_IDENTIFIER
+                                    	    {
+                                    	    match(input,T_POINT,FOLLOW_T_POINT_in_atomExpression3404); 
+
+                                    	    idn=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_atomExpression3416); 
+
+                                    	    e = addIdentifierAccessExpression(e,idn);
+
+                                    	    }
+                                    	    break;
+
+                                    	default :
+                                    	    if ( cnt71 >= 1 ) break loop71;
+                                                EarlyExitException eee =
+                                                    new EarlyExitException(71, input);
+                                                throw eee;
+                                        }
+                                        cnt71++;
+                                    } while (true);
+
+
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:717:8: (res= accessExpression[e] )?
+                                    int alt72=2;
+                                    int LA72_0 = input.LA(1);
+
+                                    if ( ((LA72_0 >= T_LPAREN && LA72_0 <= T_LSQPAREN)) ) {
+                                        alt72=1;
+                                    }
+                                    switch (alt72) {
+                                        case 1 :
+                                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:717:9: res= accessExpression[e]
+                                            {
+                                            pushFollow(FOLLOW_accessExpression_in_atomExpression3440);
+                                            res=accessExpression(e);
+
+                                            state._fsp--;
+
+
+                                            e=res;
+
+                                            }
+                                            break;
+
+                                    }
+
+
+                                    }
+                                    break;
+                                case 2 :
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:719:6: e= accessExpression[e]
+                                    {
+                                    pushFollow(FOLLOW_accessExpression_in_atomExpression3460);
+                                    e=accessExpression(e);
+
+                                    state._fsp--;
+
+
+                                    }
+                                    break;
+
+                            }
+
+
+                            }
+                            break;
+
+                    }
+
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:721:5: ( 'as' cid= T_IDENTIFIER )?
+                    int alt75=2;
+                    int LA75_0 = input.LA(1);
+
+                    if ( (LA75_0==121) ) {
+                        alt75=1;
+                    }
+                    switch (alt75) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:721:6: 'as' cid= T_IDENTIFIER
+                            {
+                            match(input,121,FOLLOW_121_in_atomExpression3479); 
+
+                            cid=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_atomExpression3483); 
+
+                            e=addCastExpression(e,cid);
+
+                            }
+                            break;
+
+                    }
+
+
+                    expr = addUnaryExpression(unexpr,e);
+
+                    }
+
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:724:6: ie= T_IF ce= expression T_THEN te= expression T_ELSE ee= expression T_END
+                    {
+                    ie=(Token)match(input,T_IF,FOLLOW_T_IF_in_atomExpression3504); 
+
+                    pushFollow(FOLLOW_expression_in_atomExpression3508);
+                    ce=expression();
+
+                    state._fsp--;
+
+
+                    match(input,T_THEN,FOLLOW_T_THEN_in_atomExpression3510); 
+
+                    pushFollow(FOLLOW_expression_in_atomExpression3514);
+                    te=expression();
+
+                    state._fsp--;
+
+
+                    match(input,T_ELSE,FOLLOW_T_ELSE_in_atomExpression3516); 
+
+                    pushFollow(FOLLOW_expression_in_atomExpression3520);
+                    ee=expression();
+
+                    state._fsp--;
+
+
+                    match(input,T_END,FOLLOW_T_END_in_atomExpression3522); 
+
+                    expr = createConditionalExpression(ce,te,ee,ie);
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return expr;
+    }
+    // $ANTLR end "atomExpression"
+
+
+
+    // $ANTLR start "quantifierExpression"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:729:1: quantifierExpression returns [Quantifier result] : t= ( T_FORALL | T_EXISTS ) (id= T_IDENTIFIER ( T_COLON id_type= simpleType ) ( T_COMMA id2= T_IDENTIFIER ( T_COLON id_type2= simpleType ) )* ) T_COLON T_LPAREN e= expression T_RPAREN ;
+    public final Quantifier quantifierExpression() throws RecognitionException {
+        Quantifier result = null;
+
+
+        Token t=null;
+        Token id=null;
+        Token id2=null;
+        UlyssesType id_type =null;
+
+        UlyssesType id_type2 =null;
+
+        Expression e =null;
+
+
+
+        		result = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:734:2: (t= ( T_FORALL | T_EXISTS ) (id= T_IDENTIFIER ( T_COLON id_type= simpleType ) ( T_COMMA id2= T_IDENTIFIER ( T_COLON id_type2= simpleType ) )* ) T_COLON T_LPAREN e= expression T_RPAREN )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:734:5: t= ( T_FORALL | T_EXISTS ) (id= T_IDENTIFIER ( T_COLON id_type= simpleType ) ( T_COMMA id2= T_IDENTIFIER ( T_COLON id_type2= simpleType ) )* ) T_COLON T_LPAREN e= expression T_RPAREN
+            {
+            t=(Token)input.LT(1);
+
+            if ( input.LA(1)==T_EXISTS||input.LA(1)==T_FORALL ) {
+                input.consume();
+                state.errorRecovery=false;
+            }
+            else {
+                MismatchedSetException mse = new MismatchedSetException(null,input);
+                throw mse;
+            }
+
+
+            result = createQuantifierExpression(t);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:736:3: (id= T_IDENTIFIER ( T_COLON id_type= simpleType ) ( T_COMMA id2= T_IDENTIFIER ( T_COLON id_type2= simpleType ) )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:736:4: id= T_IDENTIFIER ( T_COLON id_type= simpleType ) ( T_COMMA id2= T_IDENTIFIER ( T_COLON id_type2= simpleType ) )*
+            {
+            id=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_quantifierExpression3571); 
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:736:20: ( T_COLON id_type= simpleType )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:736:21: T_COLON id_type= simpleType
+            {
+            match(input,T_COLON,FOLLOW_T_COLON_in_quantifierExpression3574); 
+
+            pushFollow(FOLLOW_simpleType_in_quantifierExpression3578);
+            id_type=simpleType();
+
+            state._fsp--;
+
+
+            addBoundVarToQuantifierExpression(result,id,id_type);
+
+            }
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:737:5: ( T_COMMA id2= T_IDENTIFIER ( T_COLON id_type2= simpleType ) )*
+            loop77:
+            do {
+                int alt77=2;
+                int LA77_0 = input.LA(1);
+
+                if ( (LA77_0==T_COMMA) ) {
+                    alt77=1;
+                }
+
+
+                switch (alt77) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:737:6: T_COMMA id2= T_IDENTIFIER ( T_COLON id_type2= simpleType )
+            	    {
+            	    match(input,T_COMMA,FOLLOW_T_COMMA_in_quantifierExpression3589); 
+
+            	    id2=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_quantifierExpression3593); 
+
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:737:31: ( T_COLON id_type2= simpleType )
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:737:32: T_COLON id_type2= simpleType
+            	    {
+            	    match(input,T_COLON,FOLLOW_T_COLON_in_quantifierExpression3596); 
+
+            	    pushFollow(FOLLOW_simpleType_in_quantifierExpression3600);
+            	    id_type2=simpleType();
+
+            	    state._fsp--;
+
+
+            	    }
+
+
+            	    addBoundVarToQuantifierExpression(result,id2,id_type2);
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop77;
+                }
+            } while (true);
+
+
+            }
+
+
+            match(input,T_COLON,FOLLOW_T_COLON_in_quantifierExpression3610); 
+
+            match(input,T_LPAREN,FOLLOW_T_LPAREN_in_quantifierExpression3612); 
+
+            pushFollow(FOLLOW_expression_in_quantifierExpression3616);
+            e=expression();
+
+            state._fsp--;
+
+
+            match(input,T_RPAREN,FOLLOW_T_RPAREN_in_quantifierExpression3618); 
+
+            addExpressionToQuantifier(result,e);
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            removeBoundVarsFromResolveStack(result);
+        }
+        return result;
+    }
+    // $ANTLR end "quantifierExpression"
+
+
+
+    // $ANTLR start "constant"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:744:1: constant returns [LeafExpression result] : ( T_TRUE | T_FALSE | T_NIL | T_SELF |t_fl= T_FLOATNUMBER |t_in= T_INTNUMBER |t_l= T_STRINGLITERAL );
+    public final LeafExpression constant() throws RecognitionException {
+        LeafExpression result = null;
+
+
+        Token t_fl=null;
+        Token t_in=null;
+        Token t_l=null;
+
+
+        		result = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:749:2: ( T_TRUE | T_FALSE | T_NIL | T_SELF |t_fl= T_FLOATNUMBER |t_in= T_INTNUMBER |t_l= T_STRINGLITERAL )
+            int alt78=7;
+            switch ( input.LA(1) ) {
+            case T_TRUE:
+                {
+                alt78=1;
+                }
+                break;
+            case T_FALSE:
+                {
+                alt78=2;
+                }
+                break;
+            case T_NIL:
+                {
+                alt78=3;
+                }
+                break;
+            case T_SELF:
+                {
+                alt78=4;
+                }
+                break;
+            case T_FLOATNUMBER:
+                {
+                alt78=5;
+                }
+                break;
+            case T_INTNUMBER:
+                {
+                alt78=6;
+                }
+                break;
+            case T_STRINGLITERAL:
+                {
+                alt78=7;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 78, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt78) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:749:5: T_TRUE
+                    {
+                    match(input,T_TRUE,FOLLOW_T_TRUE_in_constant3652); 
+
+                    result = createBoolConstant(true);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:750:4: T_FALSE
+                    {
+                    match(input,T_FALSE,FOLLOW_T_FALSE_in_constant3660); 
+
+                    result = createBoolConstant(false);
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:751:4: T_NIL
+                    {
+                    match(input,T_NIL,FOLLOW_T_NIL_in_constant3667); 
+
+                    result = createNullPointerConstant();
+
+                    }
+                    break;
+                case 4 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:752:4: T_SELF
+                    {
+                    match(input,T_SELF,FOLLOW_T_SELF_in_constant3675); 
+
+                    result = createSelfPointer();
+
+                    }
+                    break;
+                case 5 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:753:5: t_fl= T_FLOATNUMBER
+                    {
+                    t_fl=(Token)match(input,T_FLOATNUMBER,FOLLOW_T_FLOATNUMBER_in_constant3686); 
+
+                    result = createFloatConstant(t_fl);
+
+                    }
+                    break;
+                case 6 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:754:4: t_in= T_INTNUMBER
+                    {
+                    t_in=(Token)match(input,T_INTNUMBER,FOLLOW_T_INTNUMBER_in_constant3695); 
+
+                    result = createIntConstant(t_in);
+
+                    }
+                    break;
+                case 7 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:755:4: t_l= T_STRINGLITERAL
+                    {
+                    t_l=(Token)match(input,T_STRINGLITERAL,FOLLOW_T_STRINGLITERAL_in_constant3704); 
+
+                    result = createStringConstant(t_l);
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "constant"
+
+
+
+    // $ANTLR start "initializedComplexType"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:758:1: initializedComplexType returns [Expression result] : (res= initializedListType |res= initializedSetType | T_NEW T_LPAREN anid= T_IDENTIFIER ( T_COMMA aname= T_STRINGLITERAL T_RPAREN | T_RPAREN ) );
+    public final Expression initializedComplexType() throws RecognitionException {
+        Expression result = null;
+
+
+        Token anid=null;
+        Token aname=null;
+        Expression res =null;
+
+
+
+        		result = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:763:2: (res= initializedListType |res= initializedSetType | T_NEW T_LPAREN anid= T_IDENTIFIER ( T_COMMA aname= T_STRINGLITERAL T_RPAREN | T_RPAREN ) )
+            int alt80=3;
+            switch ( input.LA(1) ) {
+            case T_LSQPAREN:
+                {
+                alt80=1;
+                }
+                break;
+            case T_CBRL:
+                {
+                alt80=2;
+                }
+                break;
+            case T_NEW:
+                {
+                alt80=3;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 80, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt80) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:763:4: res= initializedListType
+                    {
+                    pushFollow(FOLLOW_initializedListType_in_initializedComplexType3731);
+                    res=initializedListType();
+
+                    state._fsp--;
+
+
+                    result = res;
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:764:4: res= initializedSetType
+                    {
+                    pushFollow(FOLLOW_initializedSetType_in_initializedComplexType3740);
+                    res=initializedSetType();
+
+                    state._fsp--;
+
+
+                    result = res;
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:765:5: T_NEW T_LPAREN anid= T_IDENTIFIER ( T_COMMA aname= T_STRINGLITERAL T_RPAREN | T_RPAREN )
+                    {
+                    match(input,T_NEW,FOLLOW_T_NEW_in_initializedComplexType3748); 
+
+                    match(input,T_LPAREN,FOLLOW_T_LPAREN_in_initializedComplexType3750); 
+
+                    anid=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_initializedComplexType3754); 
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:766:4: ( T_COMMA aname= T_STRINGLITERAL T_RPAREN | T_RPAREN )
+                    int alt79=2;
+                    int LA79_0 = input.LA(1);
+
+                    if ( (LA79_0==T_COMMA) ) {
+                        alt79=1;
+                    }
+                    else if ( (LA79_0==T_RPAREN) ) {
+                        alt79=2;
+                    }
+                    else {
+                        NoViableAltException nvae =
+                            new NoViableAltException("", 79, 0, input);
+
+                        throw nvae;
+
+                    }
+                    switch (alt79) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:767:5: T_COMMA aname= T_STRINGLITERAL T_RPAREN
+                            {
+                            match(input,T_COMMA,FOLLOW_T_COMMA_in_initializedComplexType3766); 
+
+                            aname=(Token)match(input,T_STRINGLITERAL,FOLLOW_T_STRINGLITERAL_in_initializedComplexType3771); 
+
+                            match(input,T_RPAREN,FOLLOW_T_RPAREN_in_initializedComplexType3773); 
+
+                            result = createNamedObject(anid, aname);
+
+                            }
+                            break;
+                        case 2 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:768:6: T_RPAREN
+                            {
+                            match(input,T_RPAREN,FOLLOW_T_RPAREN_in_initializedComplexType3782); 
+
+                            result = createObject(anid);
+
+                            }
+                            break;
+
+                    }
+
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "initializedComplexType"
+
+
+
+    // $ANTLR start "initializedListType"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:772:1: initializedListType returns [ListConstructor result] : T_LSQPAREN e= expression ( ( T_COMMA e2= expression )+ | listComprehension[result] )? T_RSQPAREN ;
+    public final ListConstructor initializedListType() throws RecognitionException {
+        ListConstructor result = null;
+
+
+        Expression e =null;
+
+        Expression e2 =null;
+
+
+
+        		result = createInitializedList();
+        		pushListVarsOnResolveStack(result); // need this here for list comprehension
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:778:2: ( T_LSQPAREN e= expression ( ( T_COMMA e2= expression )+ | listComprehension[result] )? T_RSQPAREN )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:778:4: T_LSQPAREN e= expression ( ( T_COMMA e2= expression )+ | listComprehension[result] )? T_RSQPAREN
+            {
+            match(input,T_LSQPAREN,FOLLOW_T_LSQPAREN_in_initializedListType3813); 
+
+            pushFollow(FOLLOW_expression_in_initializedListType3817);
+            e=expression();
+
+            state._fsp--;
+
+
+            addListElement(result,e);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:778:56: ( ( T_COMMA e2= expression )+ | listComprehension[result] )?
+            int alt82=3;
+            int LA82_0 = input.LA(1);
+
+            if ( (LA82_0==T_COMMA) ) {
+                alt82=1;
+            }
+            else if ( (LA82_0==T_BAR) ) {
+                alt82=2;
+            }
+            switch (alt82) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:779:4: ( T_COMMA e2= expression )+
+                    {
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:779:4: ( T_COMMA e2= expression )+
+                    int cnt81=0;
+                    loop81:
+                    do {
+                        int alt81=2;
+                        int LA81_0 = input.LA(1);
+
+                        if ( (LA81_0==T_COMMA) ) {
+                            alt81=1;
+                        }
+
+
+                        switch (alt81) {
+                    	case 1 :
+                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:779:5: T_COMMA e2= expression
+                    	    {
+                    	    match(input,T_COMMA,FOLLOW_T_COMMA_in_initializedListType3828); 
+
+                    	    pushFollow(FOLLOW_expression_in_initializedListType3832);
+                    	    e2=expression();
+
+                    	    state._fsp--;
+
+
+                    	    addListElement(result,e2);
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    if ( cnt81 >= 1 ) break loop81;
+                                EarlyExitException eee =
+                                    new EarlyExitException(81, input);
+                                throw eee;
+                        }
+                        cnt81++;
+                    } while (true);
+
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:780:6: listComprehension[result]
+                    {
+                    pushFollow(FOLLOW_listComprehension_in_initializedListType3844);
+                    listComprehension(result);
+
+                    state._fsp--;
+
+
+                    }
+                    break;
+
+            }
+
+
+            match(input,T_RSQPAREN,FOLLOW_T_RSQPAREN_in_initializedListType3852); 
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popListVarsFromResolveStack(result);
+        }
+        return result;
+    }
+    // $ANTLR end "initializedListType"
+
+
+
+    // $ANTLR start "listComprehension"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:786:1: listComprehension[ListConstructor result] : T_BAR T_VAR id= T_IDENTIFIER T_COLON t1= complexType ( T_SEMICOLON id2= T_IDENTIFIER t2= complexType )* ( '&' e= expression )? ;
+    public final void listComprehension(ListConstructor result) throws RecognitionException {
+        Token id=null;
+        Token id2=null;
+        UlyssesType t1 =null;
+
+        UlyssesType t2 =null;
+
+        Expression e =null;
+
+
+        	
+        		result.SetHasComprehension(true);
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:790:2: ( T_BAR T_VAR id= T_IDENTIFIER T_COLON t1= complexType ( T_SEMICOLON id2= T_IDENTIFIER t2= complexType )* ( '&' e= expression )? )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:791:3: T_BAR T_VAR id= T_IDENTIFIER T_COLON t1= complexType ( T_SEMICOLON id2= T_IDENTIFIER t2= complexType )* ( '&' e= expression )?
+            {
+            match(input,T_BAR,FOLLOW_T_BAR_in_listComprehension3883); 
+
+            match(input,T_VAR,FOLLOW_T_VAR_in_listComprehension3885); 
+
+            id=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_listComprehension3891); 
+
+            match(input,T_COLON,FOLLOW_T_COLON_in_listComprehension3894); 
+
+            pushFollow(FOLLOW_complexType_in_listComprehension3898);
+            t1=complexType();
+
+            state._fsp--;
+
+
+            addListComprVar(result,id,t1);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:793:4: ( T_SEMICOLON id2= T_IDENTIFIER t2= complexType )*
+            loop83:
+            do {
+                int alt83=2;
+                int LA83_0 = input.LA(1);
+
+                if ( (LA83_0==T_SEMICOLON) ) {
+                    alt83=1;
+                }
+
+
+                switch (alt83) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:793:5: T_SEMICOLON id2= T_IDENTIFIER t2= complexType
+            	    {
+            	    match(input,T_SEMICOLON,FOLLOW_T_SEMICOLON_in_listComprehension3907); 
+
+            	    id2=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_listComprehension3911); 
+
+            	    pushFollow(FOLLOW_complexType_in_listComprehension3916);
+            	    t2=complexType();
+
+            	    state._fsp--;
+
+
+            	    addListComprVar(result,id2,t2);
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop83;
+                }
+            } while (true);
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:794:3: ( '&' e= expression )?
+            int alt84=2;
+            int LA84_0 = input.LA(1);
+
+            if ( (LA84_0==118) ) {
+                alt84=1;
+            }
+            switch (alt84) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:794:4: '&' e= expression
+                    {
+                    match(input,118,FOLLOW_118_in_listComprehension3926); 
+
+                    pushFollow(FOLLOW_expression_in_listComprehension3932);
+                    e=expression();
+
+                    state._fsp--;
+
+
+                    addListComprExpr(result,e);
+
+                    }
+                    break;
+
+            }
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "listComprehension"
+
+
+
+    // $ANTLR start "initializedSetType"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:798:1: initializedSetType returns [Expression result] : ( T_CBRL T_MAPS T_CBRR |res= initializedSet );
+    public final Expression initializedSetType() throws RecognitionException {
+        Expression result = null;
+
+
+        Expression res =null;
+
+
+
+        		result = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:803:2: ( T_CBRL T_MAPS T_CBRR |res= initializedSet )
+            int alt85=2;
+            int LA85_0 = input.LA(1);
+
+            if ( (LA85_0==T_CBRL) ) {
+                int LA85_1 = input.LA(2);
+
+                if ( (LA85_1==T_MAPS) ) {
+                    alt85=1;
+                }
+                else if ( (LA85_1==T_ABS||(LA85_1 >= T_CARD && LA85_1 <= T_CBRL)||LA85_1==T_DCONC||LA85_1==T_DINTER||LA85_1==T_DOM||(LA85_1 >= T_DUNION && LA85_1 <= T_ELEMS)||(LA85_1 >= T_EXISTS && LA85_1 <= T_FALSE)||LA85_1==T_FLOATNUMBER||LA85_1==T_FORALL||(LA85_1 >= T_HEAD && LA85_1 <= T_IDENTIFIER)||LA85_1==T_IF||LA85_1==T_INDS||LA85_1==T_INTNUMBER||LA85_1==T_LEN||(LA85_1 >= T_LPAREN && LA85_1 <= T_LSQPAREN)||LA85_1==T_MERGE||LA85_1==T_MINUS||(LA85_1 >= T_NEW && LA85_1 <= T_NIL)||LA85_1==T_NOT||LA85_1==T_RNG||LA85_1==T_SELF||LA85_1==T_STRINGLITERAL||LA85_1==T_TAIL||LA85_1==T_TRUE||LA85_1==125) ) {
+                    alt85=2;
+                }
+                else {
+                    NoViableAltException nvae =
+                        new NoViableAltException("", 85, 1, input);
+
+                    throw nvae;
+
+                }
+            }
+            else {
+                NoViableAltException nvae =
+                    new NoViableAltException("", 85, 0, input);
+
+                throw nvae;
+
+            }
+            switch (alt85) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:803:4: T_CBRL T_MAPS T_CBRR
+                    {
+                    match(input,T_CBRL,FOLLOW_T_CBRL_in_initializedSetType3958); 
+
+                    match(input,T_MAPS,FOLLOW_T_MAPS_in_initializedSetType3960); 
+
+                    match(input,T_CBRR,FOLLOW_T_CBRR_in_initializedSetType3962); 
+
+                    result = createEmptyMap();
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:804:4: res= initializedSet
+                    {
+                    pushFollow(FOLLOW_initializedSet_in_initializedSetType3973);
+                    res=initializedSet();
+
+                    state._fsp--;
+
+
+                    result = res;
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "initializedSetType"
+
+
+
+    // $ANTLR start "initializedSet"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:807:1: initializedSet returns [Expression result] : T_CBRL e1= expression ( ( T_COMMA e2= expression )* |m= map[result, e1] | setComprehension[(SetConstructor)result] ) T_CBRR ;
+    public final Expression initializedSet() throws RecognitionException {
+        Expression result = null;
+
+
+        Expression e1 =null;
+
+        Expression e2 =null;
+
+        Expression m =null;
+
+
+
+        		SetConstructor theset = createSet(); 
+        		pushSetVarsOnResolveStack(theset); // need this here for set comprehension
+        		result = theset;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:814:2: ( T_CBRL e1= expression ( ( T_COMMA e2= expression )* |m= map[result, e1] | setComprehension[(SetConstructor)result] ) T_CBRR )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:814:4: T_CBRL e1= expression ( ( T_COMMA e2= expression )* |m= map[result, e1] | setComprehension[(SetConstructor)result] ) T_CBRR
+            {
+            match(input,T_CBRL,FOLLOW_T_CBRL_in_initializedSet3999); 
+
+            pushFollow(FOLLOW_expression_in_initializedSet4003);
+            e1=expression();
+
+            state._fsp--;
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:815:10: ( ( T_COMMA e2= expression )* |m= map[result, e1] | setComprehension[(SetConstructor)result] )
+            int alt87=3;
+            switch ( input.LA(1) ) {
+            case T_CBRR:
+            case T_COMMA:
+                {
+                alt87=1;
+                }
+                break;
+            case T_MAPS:
+                {
+                alt87=2;
+                }
+                break;
+            case T_BAR:
+                {
+                alt87=3;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 87, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt87) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:816:4: ( T_COMMA e2= expression )*
+                    {
+                    addToSet(result,e1);
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:817:4: ( T_COMMA e2= expression )*
+                    loop86:
+                    do {
+                        int alt86=2;
+                        int LA86_0 = input.LA(1);
+
+                        if ( (LA86_0==T_COMMA) ) {
+                            alt86=1;
+                        }
+
+
+                        switch (alt86) {
+                    	case 1 :
+                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:817:5: T_COMMA e2= expression
+                    	    {
+                    	    match(input,T_COMMA,FOLLOW_T_COMMA_in_initializedSet4033); 
+
+                    	    pushFollow(FOLLOW_expression_in_initializedSet4037);
+                    	    e2=expression();
+
+                    	    state._fsp--;
+
+
+                    	    addToSet(result,e2);
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop86;
+                        }
+                    } while (true);
+
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:818:6: m= map[result, e1]
+                    {
+                    pushFollow(FOLLOW_map_in_initializedSet4055);
+                    m=map(result, e1);
+
+                    state._fsp--;
+
+
+                    result = m;
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:819:5: setComprehension[(SetConstructor)result]
+                    {
+                    addToSet(result,e1);
+
+                    pushFollow(FOLLOW_setComprehension_in_initializedSet4068);
+                    setComprehension((SetConstructor)result);
+
+                    state._fsp--;
+
+
+                    }
+                    break;
+
+            }
+
+
+            match(input,T_CBRR,FOLLOW_T_CBRR_in_initializedSet4078); 
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+            popSetVarsFromResolveStack(theset);
+        }
+        return result;
+    }
+    // $ANTLR end "initializedSet"
+
+
+
+    // $ANTLR start "map"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:825:1: map[Expression _map, Expression e1] returns [Expression result] : am= T_MAPS e2= expression ( T_COMMA e3= expression T_MAPS e4= expression )* ;
+    public final Expression map(Expression _map, Expression e1) throws RecognitionException {
+        Expression result = null;
+
+
+        Token am=null;
+        Expression e2 =null;
+
+        Expression e3 =null;
+
+        Expression e4 =null;
+
+
+
+        		result = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:830:2: (am= T_MAPS e2= expression ( T_COMMA e3= expression T_MAPS e4= expression )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:830:4: am= T_MAPS e2= expression ( T_COMMA e3= expression T_MAPS e4= expression )*
+            {
+            am=(Token)match(input,T_MAPS,FOLLOW_T_MAPS_in_map4114); 
+
+            pushFollow(FOLLOW_expression_in_map4118);
+            e2=expression();
+
+            state._fsp--;
+
+
+            result = createMap(e1,e2,am);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:830:63: ( T_COMMA e3= expression T_MAPS e4= expression )*
+            loop88:
+            do {
+                int alt88=2;
+                int LA88_0 = input.LA(1);
+
+                if ( (LA88_0==T_COMMA) ) {
+                    alt88=1;
+                }
+
+
+                switch (alt88) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:830:64: T_COMMA e3= expression T_MAPS e4= expression
+            	    {
+            	    match(input,T_COMMA,FOLLOW_T_COMMA_in_map4126); 
+
+            	    pushFollow(FOLLOW_expression_in_map4130);
+            	    e3=expression();
+
+            	    state._fsp--;
+
+
+            	    match(input,T_MAPS,FOLLOW_T_MAPS_in_map4132); 
+
+            	    pushFollow(FOLLOW_expression_in_map4136);
+            	    e4=expression();
+
+            	    state._fsp--;
+
+
+            	    addToMap(result,e3,e4);
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop88;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "map"
+
+
+
+    // $ANTLR start "setComprehension"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:833:1: setComprehension[SetConstructor _set] : T_BAR T_VAR id1= T_IDENTIFIER T_COLON t1= complexType ( T_SEMICOLON id2= T_IDENTIFIER T_COLON t2= complexType )* ( '&' epx= expression )? ;
+    public final void setComprehension(SetConstructor _set) throws RecognitionException {
+        Token id1=null;
+        Token id2=null;
+        UlyssesType t1 =null;
+
+        UlyssesType t2 =null;
+
+        Expression epx =null;
+
+
+
+        		_set.SetHasComprehension(true);
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:837:2: ( T_BAR T_VAR id1= T_IDENTIFIER T_COLON t1= complexType ( T_SEMICOLON id2= T_IDENTIFIER T_COLON t2= complexType )* ( '&' epx= expression )? )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:837:4: T_BAR T_VAR id1= T_IDENTIFIER T_COLON t1= complexType ( T_SEMICOLON id2= T_IDENTIFIER T_COLON t2= complexType )* ( '&' epx= expression )?
+            {
+            match(input,T_BAR,FOLLOW_T_BAR_in_setComprehension4158); 
+
+            match(input,T_VAR,FOLLOW_T_VAR_in_setComprehension4160); 
+
+            id1=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_setComprehension4164); 
+
+            match(input,T_COLON,FOLLOW_T_COLON_in_setComprehension4167); 
+
+            pushFollow(FOLLOW_complexType_in_setComprehension4171);
+            t1=complexType();
+
+            state._fsp--;
+
+
+             addSetComprVar(_set, id1, t1); 
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:839:3: ( T_SEMICOLON id2= T_IDENTIFIER T_COLON t2= complexType )*
+            loop89:
+            do {
+                int alt89=2;
+                int LA89_0 = input.LA(1);
+
+                if ( (LA89_0==T_SEMICOLON) ) {
+                    alt89=1;
+                }
+
+
+                switch (alt89) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:839:4: T_SEMICOLON id2= T_IDENTIFIER T_COLON t2= complexType
+            	    {
+            	    match(input,T_SEMICOLON,FOLLOW_T_SEMICOLON_in_setComprehension4181); 
+
+            	    id2=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_setComprehension4185); 
+
+            	    match(input,T_COLON,FOLLOW_T_COLON_in_setComprehension4187); 
+
+            	    pushFollow(FOLLOW_complexType_in_setComprehension4191);
+            	    t2=complexType();
+
+            	    state._fsp--;
+
+
+            	     addSetComprVar(_set, id2, t2); 
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop89;
+                }
+            } while (true);
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:841:3: ( '&' epx= expression )?
+            int alt90=2;
+            int LA90_0 = input.LA(1);
+
+            if ( (LA90_0==118) ) {
+                alt90=1;
+            }
+            switch (alt90) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:841:4: '&' epx= expression
+                    {
+                    match(input,118,FOLLOW_118_in_setComprehension4205); 
+
+                    pushFollow(FOLLOW_expression_in_setComprehension4211);
+                    epx=expression();
+
+                    state._fsp--;
+
+
+                     addSetComprExpr(_set,epx); 
+
+                    }
+                    break;
+
+            }
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return ;
+    }
+    // $ANTLR end "setComprehension"
+
+
+
+    // $ANTLR start "qvalExpression"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:847:1: qvalExpression returns [QValConstructor result] : aval= 'qval' T_LPAREN ( T_NIL | (expr= qualifiedIdentifier | ( '-' )? T_INFTY ) ( T_RANGETO (expr2= qualifiedIdentifier | T_INFTY ) )? ) T_COMMA ( T_NIL | ( 'steady' | 'inc' | 'dec' ) ) T_RPAREN ;
+    public final QValConstructor qvalExpression() throws RecognitionException {
+        QValConstructor result = null;
+
+
+        Token aval=null;
+        Expression expr =null;
+
+        Expression expr2 =null;
+
+
+
+        		boolean minus = false;
+        		result = null;		
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:853:2: (aval= 'qval' T_LPAREN ( T_NIL | (expr= qualifiedIdentifier | ( '-' )? T_INFTY ) ( T_RANGETO (expr2= qualifiedIdentifier | T_INFTY ) )? ) T_COMMA ( T_NIL | ( 'steady' | 'inc' | 'dec' ) ) T_RPAREN )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:854:3: aval= 'qval' T_LPAREN ( T_NIL | (expr= qualifiedIdentifier | ( '-' )? T_INFTY ) ( T_RANGETO (expr2= qualifiedIdentifier | T_INFTY ) )? ) T_COMMA ( T_NIL | ( 'steady' | 'inc' | 'dec' ) ) T_RPAREN
+            {
+            aval=(Token)match(input,125,FOLLOW_125_in_qvalExpression4246); 
+
+            match(input,T_LPAREN,FOLLOW_T_LPAREN_in_qvalExpression4248); 
+
+            result = createQualitativeValue(aval);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:856:3: ( T_NIL | (expr= qualifiedIdentifier | ( '-' )? T_INFTY ) ( T_RANGETO (expr2= qualifiedIdentifier | T_INFTY ) )? )
+            int alt95=2;
+            int LA95_0 = input.LA(1);
+
+            if ( (LA95_0==T_NIL) ) {
+                alt95=1;
+            }
+            else if ( (LA95_0==T_IDENTIFIER||LA95_0==T_INFTY||LA95_0==T_MINUS||LA95_0==T_SELF) ) {
+                alt95=2;
+            }
+            else {
+                NoViableAltException nvae =
+                    new NoViableAltException("", 95, 0, input);
+
+                throw nvae;
+
+            }
+            switch (alt95) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:857:4: T_NIL
+                    {
+                    match(input,T_NIL,FOLLOW_T_NIL_in_qvalExpression4262); 
+
+                    setQualitativeValueDontCare(result);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:860:4: (expr= qualifiedIdentifier | ( '-' )? T_INFTY ) ( T_RANGETO (expr2= qualifiedIdentifier | T_INFTY ) )?
+                    {
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:860:4: (expr= qualifiedIdentifier | ( '-' )? T_INFTY )
+                    int alt92=2;
+                    int LA92_0 = input.LA(1);
+
+                    if ( (LA92_0==T_IDENTIFIER||LA92_0==T_SELF) ) {
+                        alt92=1;
+                    }
+                    else if ( (LA92_0==T_INFTY||LA92_0==T_MINUS) ) {
+                        alt92=2;
+                    }
+                    else {
+                        NoViableAltException nvae =
+                            new NoViableAltException("", 92, 0, input);
+
+                        throw nvae;
+
+                    }
+                    switch (alt92) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:860:6: expr= qualifiedIdentifier
+                            {
+                            pushFollow(FOLLOW_qualifiedIdentifier_in_qvalExpression4283);
+                            expr=qualifiedIdentifier();
+
+                            state._fsp--;
+
+
+                            setQualitativeValueLandmark(result,expr);
+
+                            }
+                            break;
+                        case 2 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:863:5: ( '-' )? T_INFTY
+                            {
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:863:5: ( '-' )?
+                            int alt91=2;
+                            int LA91_0 = input.LA(1);
+
+                            if ( (LA91_0==T_MINUS) ) {
+                                alt91=1;
+                            }
+                            switch (alt91) {
+                                case 1 :
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:863:6: '-'
+                                    {
+                                    match(input,T_MINUS,FOLLOW_T_MINUS_in_qvalExpression4302); 
+
+                                    minus = true;
+
+                                    }
+                                    break;
+
+                            }
+
+
+                            match(input,T_INFTY,FOLLOW_T_INFTY_in_qvalExpression4308); 
+
+                            setQualitativeValueInfinity(result,minus);
+
+                            }
+                            break;
+
+                    }
+
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:866:4: ( T_RANGETO (expr2= qualifiedIdentifier | T_INFTY ) )?
+                    int alt94=2;
+                    int LA94_0 = input.LA(1);
+
+                    if ( (LA94_0==T_RANGETO) ) {
+                        alt94=1;
+                    }
+                    switch (alt94) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:866:5: T_RANGETO (expr2= qualifiedIdentifier | T_INFTY )
+                            {
+                            match(input,T_RANGETO,FOLLOW_T_RANGETO_in_qvalExpression4326); 
+
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:867:4: (expr2= qualifiedIdentifier | T_INFTY )
+                            int alt93=2;
+                            int LA93_0 = input.LA(1);
+
+                            if ( (LA93_0==T_IDENTIFIER||LA93_0==T_SELF) ) {
+                                alt93=1;
+                            }
+                            else if ( (LA93_0==T_INFTY) ) {
+                                alt93=2;
+                            }
+                            else {
+                                NoViableAltException nvae =
+                                    new NoViableAltException("", 93, 0, input);
+
+                                throw nvae;
+
+                            }
+                            switch (alt93) {
+                                case 1 :
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:867:6: expr2= qualifiedIdentifier
+                                    {
+                                    pushFollow(FOLLOW_qualifiedIdentifier_in_qvalExpression4336);
+                                    expr2=qualifiedIdentifier();
+
+                                    state._fsp--;
+
+
+                                    setQualitativeValueRange(result,expr2);
+
+                                    }
+                                    break;
+                                case 2 :
+                                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:870:5: T_INFTY
+                                    {
+                                    match(input,T_INFTY,FOLLOW_T_INFTY_in_qvalExpression4354); 
+
+                                    setQualitativeValueRangeInfinity(result,false);
+
+                                    }
+                                    break;
+
+                            }
+
+
+                            }
+                            break;
+
+                    }
+
+
+                    }
+                    break;
+
+            }
+
+
+            match(input,T_COMMA,FOLLOW_T_COMMA_in_qvalExpression4378); 
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:875:3: ( T_NIL | ( 'steady' | 'inc' | 'dec' ) )
+            int alt97=2;
+            int LA97_0 = input.LA(1);
+
+            if ( (LA97_0==T_NIL) ) {
+                alt97=1;
+            }
+            else if ( ((LA97_0 >= 123 && LA97_0 <= 124)||LA97_0==126) ) {
+                alt97=2;
+            }
+            else {
+                NoViableAltException nvae =
+                    new NoViableAltException("", 97, 0, input);
+
+                throw nvae;
+
+            }
+            switch (alt97) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:876:4: T_NIL
+                    {
+                    match(input,T_NIL,FOLLOW_T_NIL_in_qvalExpression4388); 
+
+                    setQualitativeDerivDontCare(result);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:879:4: ( 'steady' | 'inc' | 'dec' )
+                    {
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:879:4: ( 'steady' | 'inc' | 'dec' )
+                    int alt96=3;
+                    switch ( input.LA(1) ) {
+                    case 126:
+                        {
+                        alt96=1;
+                        }
+                        break;
+                    case 124:
+                        {
+                        alt96=2;
+                        }
+                        break;
+                    case 123:
+                        {
+                        alt96=3;
+                        }
+                        break;
+                    default:
+                        NoViableAltException nvae =
+                            new NoViableAltException("", 96, 0, input);
+
+                        throw nvae;
+
+                    }
+
+                    switch (alt96) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:879:6: 'steady'
+                            {
+                            match(input,126,FOLLOW_126_in_qvalExpression4404); 
+
+                            setQualitativeDerivSteady(result);
+
+                            }
+                            break;
+                        case 2 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:881:6: 'inc'
+                            {
+                            match(input,124,FOLLOW_124_in_qvalExpression4417); 
+
+                            setQualitativeDerivInc(result);
+
+                            }
+                            break;
+                        case 3 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:883:6: 'dec'
+                            {
+                            match(input,123,FOLLOW_123_in_qvalExpression4430); 
+
+                            setQualitativeDerivDec(result);
+
+                            }
+                            break;
+
+                    }
+
+
+                    }
+                    break;
+
+            }
+
+
+            match(input,T_RPAREN,FOLLOW_T_RPAREN_in_qvalExpression4452); 
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "qvalExpression"
+
+
+
+    // $ANTLR start "identifierExpression"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:891:1: identifierExpression returns [Expression result] : ({...}?aName= T_IDENTIFIER T_LPAREN m_params= methodCallParams T_RPAREN |res= reference );
+    public final Expression identifierExpression() throws RecognitionException {
+        Expression result = null;
+
+
+        Token aName=null;
+        ArrayList<Expression> m_params =null;
+
+        Expression res =null;
+
+
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:893:2: ({...}?aName= T_IDENTIFIER T_LPAREN m_params= methodCallParams T_RPAREN |res= reference )
+            int alt98=2;
+            alt98 = dfa98.predict(input);
+            switch (alt98) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:894:3: {...}?aName= T_IDENTIFIER T_LPAREN m_params= methodCallParams T_RPAREN
+                    {
+                    if ( !((isTuple(input.LT(1).getText()))) ) {
+                        throw new FailedPredicateException(input, "identifierExpression", "isTuple(input.LT(1).getText())");
+                    }
+
+                    aName=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_identifierExpression4485); 
+
+                    match(input,T_LPAREN,FOLLOW_T_LPAREN_in_identifierExpression4487); 
+
+                    pushFollow(FOLLOW_methodCallParams_in_identifierExpression4491);
+                    m_params=methodCallParams();
+
+                    state._fsp--;
+
+
+                    match(input,T_RPAREN,FOLLOW_T_RPAREN_in_identifierExpression4493); 
+
+                    result = createInitializedTuple(aName,m_params);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:898:3: res= reference
+                    {
+                    pushFollow(FOLLOW_reference_in_identifierExpression4508);
+                    res=reference();
+
+                    state._fsp--;
+
+
+                    result = res;
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "identifierExpression"
+
+
+
+    // $ANTLR start "reference"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:903:1: reference returns [Expression result] :{...}?aName= qualifiedIdentifier (output= accessExpression[result] |) (pr= T_PRIMED | ( '::' T_LPAREN init= expression T_RPAREN )? afold= ( T_FOLDLR | T_FOLDRL ) T_LPAREN anexpr= expression T_RPAREN )? ;
+    public final Expression reference() throws RecognitionException {
+        Expression result = null;
+
+
+        Token pr=null;
+        Token afold=null;
+        Expression aName =null;
+
+        Expression output =null;
+
+        Expression init =null;
+
+        Expression anexpr =null;
+
+
+
+        		result = null;
+        		init = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:909:2: ({...}?aName= qualifiedIdentifier (output= accessExpression[result] |) (pr= T_PRIMED | ( '::' T_LPAREN init= expression T_RPAREN )? afold= ( T_FOLDLR | T_FOLDRL ) T_LPAREN anexpr= expression T_RPAREN )? )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:909:4: {...}?aName= qualifiedIdentifier (output= accessExpression[result] |) (pr= T_PRIMED | ( '::' T_LPAREN init= expression T_RPAREN )? afold= ( T_FOLDLR | T_FOLDRL ) T_LPAREN anexpr= expression T_RPAREN )?
+            {
+            if ( !((!isTuple(input.LT(1).getText()))) ) {
+                throw new FailedPredicateException(input, "reference", "!isTuple(input.LT(1).getText())");
+            }
+
+            pushFollow(FOLLOW_qualifiedIdentifier_in_reference4546);
+            aName=qualifiedIdentifier();
+
+            state._fsp--;
+
+
+            result = aName;
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:911:3: (output= accessExpression[result] |)
+            int alt99=2;
+            int LA99_0 = input.LA(1);
+
+            if ( ((LA99_0 >= T_LPAREN && LA99_0 <= T_LSQPAREN)) ) {
+                alt99=1;
+            }
+            else if ( ((LA99_0 >= T_ACTIONS && LA99_0 <= T_ASSIGNMENT)||(LA99_0 >= T_BAR && LA99_0 <= T_BIIMPLIES)||LA99_0==T_CBRR||(LA99_0 >= T_COLON && LA99_0 <= T_COMMA)||LA99_0==T_CONC||LA99_0==T_DIFF||(LA99_0 >= T_DIV && LA99_0 <= T_DO)||(LA99_0 >= T_DOMRESBY && LA99_0 <= T_DOMRESTO)||(LA99_0 >= T_ELSE && LA99_0 <= T_EQUAL)||(LA99_0 >= T_FOLDLR && LA99_0 <= T_FOLDRL)||(LA99_0 >= T_GREATER && LA99_0 <= T_GREATEREQUAL)||LA99_0==T_IDIV||(LA99_0 >= T_IMPLIES && LA99_0 <= T_IN)||LA99_0==T_INTER||(LA99_0 >= T_LESS && LA99_0 <= T_LESSEQUAL)||LA99_0==T_MAPS||(LA99_0 >= T_METHODS && LA99_0 <= T_MUNION)||(LA99_0 >= T_NONDET && LA99_0 <= T_NOTEQUAL)||LA99_0==T_OR||(LA99_0 >= T_POW && LA99_0 <= T_PROD)||(LA99_0 >= T_RNGRESBY && LA99_0 <= T_RSQPAREN)||(LA99_0 >= T_SEMICOLON && LA99_0 <= T_SEQMOD_MAPOVERRIDE)||(LA99_0 >= T_SUBSET && LA99_0 <= T_SUM)||LA99_0==T_THEN||(LA99_0 >= T_TYPES && LA99_0 <= T_UNION)||LA99_0==T_WITH||(LA99_0 >= 119 && LA99_0 <= 121)) ) {
+                alt99=2;
+            }
+            else {
+                NoViableAltException nvae =
+                    new NoViableAltException("", 99, 0, input);
+
+                throw nvae;
+
+            }
+            switch (alt99) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:911:5: output= accessExpression[result]
+                    {
+                    pushFollow(FOLLOW_accessExpression_in_reference4558);
+                    output=accessExpression(result);
+
+                    state._fsp--;
+
+
+                    result = output;
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:914:3: 
+                    {
+                    }
+                    break;
+
+            }
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:915:3: (pr= T_PRIMED | ( '::' T_LPAREN init= expression T_RPAREN )? afold= ( T_FOLDLR | T_FOLDRL ) T_LPAREN anexpr= expression T_RPAREN )?
+            int alt101=3;
+            int LA101_0 = input.LA(1);
+
+            if ( (LA101_0==T_PRIMED) ) {
+                alt101=1;
+            }
+            else if ( ((LA101_0 >= T_FOLDLR && LA101_0 <= T_FOLDRL)||LA101_0==119) ) {
+                alt101=2;
+            }
+            switch (alt101) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:915:6: pr= T_PRIMED
+                    {
+                    pr=(Token)match(input,T_PRIMED,FOLLOW_T_PRIMED_in_reference4583); 
+
+                    result = setIdentifierExpressionPrimed(result,pr);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:917:5: ( '::' T_LPAREN init= expression T_RPAREN )? afold= ( T_FOLDLR | T_FOLDRL ) T_LPAREN anexpr= expression T_RPAREN
+                    {
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:917:5: ( '::' T_LPAREN init= expression T_RPAREN )?
+                    int alt100=2;
+                    int LA100_0 = input.LA(1);
+
+                    if ( (LA100_0==119) ) {
+                        alt100=1;
+                    }
+                    switch (alt100) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:917:6: '::' T_LPAREN init= expression T_RPAREN
+                            {
+                            match(input,119,FOLLOW_119_in_reference4599); 
+
+                            match(input,T_LPAREN,FOLLOW_T_LPAREN_in_reference4601); 
+
+                            pushFollow(FOLLOW_expression_in_reference4605);
+                            init=expression();
+
+                            state._fsp--;
+
+
+                            match(input,T_RPAREN,FOLLOW_T_RPAREN_in_reference4607); 
+
+                            }
+                            break;
+
+                    }
+
+
+                    afold=(Token)input.LT(1);
+
+                    if ( (input.LA(1) >= T_FOLDLR && input.LA(1) <= T_FOLDRL) ) {
+                        input.consume();
+                        state.errorRecovery=false;
+                    }
+                    else {
+                        MismatchedSetException mse = new MismatchedSetException(null,input);
+                        throw mse;
+                    }
+
+
+                    match(input,T_LPAREN,FOLLOW_T_LPAREN_in_reference4619); 
+
+                    pushFollow(FOLLOW_expression_in_reference4623);
+                    anexpr=expression();
+
+                    state._fsp--;
+
+
+                    match(input,T_RPAREN,FOLLOW_T_RPAREN_in_reference4625); 
+
+                    result = createFoldExpression(result,afold,init,anexpr);
+
+                    }
+                    break;
+
+            }
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "reference"
+
+
+
+    // $ANTLR start "accessExpression"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:922:1: accessExpression[Expression subexpr] returns [Expression result] : (tcall= T_LSQPAREN ac= expression T_RSQPAREN |bcall= T_LPAREN m_params= methodCallParams T_RPAREN )+ ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[result] )? )? ;
+    public final Expression accessExpression(Expression subexpr) throws RecognitionException {
+        Expression result = null;
+
+
+        Token tcall=null;
+        Token bcall=null;
+        Token idn=null;
+        Expression ac =null;
+
+        ArrayList<Expression> m_params =null;
+
+        Expression res =null;
+
+
+
+        		UnaryOperator newExpr = null;
+        		result = subexpr;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:928:2: ( (tcall= T_LSQPAREN ac= expression T_RSQPAREN |bcall= T_LPAREN m_params= methodCallParams T_RPAREN )+ ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[result] )? )? )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:929:7: (tcall= T_LSQPAREN ac= expression T_RSQPAREN |bcall= T_LPAREN m_params= methodCallParams T_RPAREN )+ ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[result] )? )?
+            {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:929:7: (tcall= T_LSQPAREN ac= expression T_RSQPAREN |bcall= T_LPAREN m_params= methodCallParams T_RPAREN )+
+            int cnt102=0;
+            loop102:
+            do {
+                int alt102=3;
+                int LA102_0 = input.LA(1);
+
+                if ( (LA102_0==T_LSQPAREN) ) {
+                    alt102=1;
+                }
+                else if ( (LA102_0==T_LPAREN) ) {
+                    alt102=2;
+                }
+
+
+                switch (alt102) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:929:9: tcall= T_LSQPAREN ac= expression T_RSQPAREN
+            	    {
+            	    tcall=(Token)match(input,T_LSQPAREN,FOLLOW_T_LSQPAREN_in_accessExpression4670); 
+
+            	    pushFollow(FOLLOW_expression_in_accessExpression4674);
+            	    ac=expression();
+
+            	    state._fsp--;
+
+
+            	    match(input,T_RSQPAREN,FOLLOW_T_RSQPAREN_in_accessExpression4676); 
+
+            	     result = createTupleMapAccessExpression(result,ac,tcall); 
+
+            	    }
+            	    break;
+            	case 2 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:931:10: bcall= T_LPAREN m_params= methodCallParams T_RPAREN
+            	    {
+            	    bcall=(Token)match(input,T_LPAREN,FOLLOW_T_LPAREN_in_accessExpression4703); 
+
+            	    pushFollow(FOLLOW_methodCallParams_in_accessExpression4707);
+            	    m_params=methodCallParams();
+
+            	    state._fsp--;
+
+
+            	    match(input,T_RPAREN,FOLLOW_T_RPAREN_in_accessExpression4709); 
+
+            	     result = createMethodAccessExpression(result,m_params,bcall); 
+
+            	    }
+            	    break;
+
+            	default :
+            	    if ( cnt102 >= 1 ) break loop102;
+                        EarlyExitException eee =
+                            new EarlyExitException(102, input);
+                        throw eee;
+                }
+                cnt102++;
+            } while (true);
+
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:934:3: ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[result] )? )?
+            int alt105=2;
+            int LA105_0 = input.LA(1);
+
+            if ( (LA105_0==T_POINT) ) {
+                alt105=1;
+            }
+            switch (alt105) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:935:4: ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[result] )?
+                    {
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:935:4: ( T_POINT idn= T_IDENTIFIER )+
+                    int cnt103=0;
+                    loop103:
+                    do {
+                        int alt103=2;
+                        int LA103_0 = input.LA(1);
+
+                        if ( (LA103_0==T_POINT) ) {
+                            alt103=1;
+                        }
+
+
+                        switch (alt103) {
+                    	case 1 :
+                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:935:5: T_POINT idn= T_IDENTIFIER
+                    	    {
+                    	    match(input,T_POINT,FOLLOW_T_POINT_in_accessExpression4731); 
+
+                    	    idn=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_accessExpression4739); 
+
+                    	    result = addIdentifierAccessExpression(result,idn);
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    if ( cnt103 >= 1 ) break loop103;
+                                EarlyExitException eee =
+                                    new EarlyExitException(103, input);
+                                throw eee;
+                        }
+                        cnt103++;
+                    } while (true);
+
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:938:4: (res= accessExpression[result] )?
+                    int alt104=2;
+                    int LA104_0 = input.LA(1);
+
+                    if ( ((LA104_0 >= T_LPAREN && LA104_0 <= T_LSQPAREN)) ) {
+                        alt104=1;
+                    }
+                    switch (alt104) {
+                        case 1 :
+                            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:938:5: res= accessExpression[result]
+                            {
+                            pushFollow(FOLLOW_accessExpression_in_accessExpression4755);
+                            res=accessExpression(result);
+
+                            state._fsp--;
+
+
+                            result=res;
+
+                            }
+                            break;
+
+                    }
+
+
+                    }
+                    break;
+
+            }
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "accessExpression"
+
+
+
+    // $ANTLR start "qualifiedIdentifier"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:942:1: qualifiedIdentifier returns [Expression top] : (self= T_SELF T_POINT )? idb= T_IDENTIFIER ( T_POINT idd= T_IDENTIFIER )* ;
+    public final Expression qualifiedIdentifier() throws RecognitionException {
+        Expression top = null;
+
+
+        Token self=null;
+        Token idb=null;
+        Token idd=null;
+
+
+        		IdentifierExpression selfexpr = null;
+        		top = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:948:2: ( (self= T_SELF T_POINT )? idb= T_IDENTIFIER ( T_POINT idd= T_IDENTIFIER )* )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:949:3: (self= T_SELF T_POINT )? idb= T_IDENTIFIER ( T_POINT idd= T_IDENTIFIER )*
+            {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:949:3: (self= T_SELF T_POINT )?
+            int alt106=2;
+            int LA106_0 = input.LA(1);
+
+            if ( (LA106_0==T_SELF) ) {
+                alt106=1;
+            }
+            switch (alt106) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:949:4: self= T_SELF T_POINT
+                    {
+                    self=(Token)match(input,T_SELF,FOLLOW_T_SELF_in_qualifiedIdentifier4794); 
+
+                    match(input,T_POINT,FOLLOW_T_POINT_in_qualifiedIdentifier4796); 
+
+                    selfexpr = createSelfIdentifierExpression(self);
+
+                    }
+                    break;
+
+            }
+
+
+            idb=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_qualifiedIdentifier4808); 
+
+            top = createIdentifierAccessExpression(selfexpr,idb);
+
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:951:3: ( T_POINT idd= T_IDENTIFIER )*
+            loop107:
+            do {
+                int alt107=2;
+                int LA107_0 = input.LA(1);
+
+                if ( (LA107_0==T_POINT) ) {
+                    alt107=1;
+                }
+
+
+                switch (alt107) {
+            	case 1 :
+            	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:951:4: T_POINT idd= T_IDENTIFIER
+            	    {
+            	    match(input,T_POINT,FOLLOW_T_POINT_in_qualifiedIdentifier4817); 
+
+            	    idd=(Token)match(input,T_IDENTIFIER,FOLLOW_T_IDENTIFIER_in_qualifiedIdentifier4821); 
+
+            	    top = addIdentifierAccessExpression(top,idd);
+
+            	    }
+            	    break;
+
+            	default :
+            	    break loop107;
+                }
+            } while (true);
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return top;
+    }
+    // $ANTLR end "qualifiedIdentifier"
+
+
+
+    // $ANTLR start "methodCallParams"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:955:1: methodCallParams returns [ArrayList<Expression> result] : (expa= expression ( T_COMMA expb= expression )* )? ;
+    public final ArrayList<Expression> methodCallParams() throws RecognitionException {
+        ArrayList<Expression> result = null;
+
+
+        Expression expa =null;
+
+        Expression expb =null;
+
+
+
+        		result = new ArrayList<Expression>();
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:960:2: ( (expa= expression ( T_COMMA expb= expression )* )? )
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:960:4: (expa= expression ( T_COMMA expb= expression )* )?
+            {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:960:4: (expa= expression ( T_COMMA expb= expression )* )?
+            int alt109=2;
+            int LA109_0 = input.LA(1);
+
+            if ( (LA109_0==T_ABS||(LA109_0 >= T_CARD && LA109_0 <= T_CBRL)||LA109_0==T_DCONC||LA109_0==T_DINTER||LA109_0==T_DOM||(LA109_0 >= T_DUNION && LA109_0 <= T_ELEMS)||(LA109_0 >= T_EXISTS && LA109_0 <= T_FALSE)||LA109_0==T_FLOATNUMBER||LA109_0==T_FORALL||(LA109_0 >= T_HEAD && LA109_0 <= T_IDENTIFIER)||LA109_0==T_IF||LA109_0==T_INDS||LA109_0==T_INTNUMBER||LA109_0==T_LEN||(LA109_0 >= T_LPAREN && LA109_0 <= T_LSQPAREN)||LA109_0==T_MERGE||LA109_0==T_MINUS||(LA109_0 >= T_NEW && LA109_0 <= T_NIL)||LA109_0==T_NOT||LA109_0==T_RNG||LA109_0==T_SELF||LA109_0==T_STRINGLITERAL||LA109_0==T_TAIL||LA109_0==T_TRUE||LA109_0==125) ) {
+                alt109=1;
+            }
+            switch (alt109) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:960:5: expa= expression ( T_COMMA expb= expression )*
+                    {
+                    pushFollow(FOLLOW_expression_in_methodCallParams4854);
+                    expa=expression();
+
+                    state._fsp--;
+
+
+                    result.add(expa);
+
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:960:41: ( T_COMMA expb= expression )*
+                    loop108:
+                    do {
+                        int alt108=2;
+                        int LA108_0 = input.LA(1);
+
+                        if ( (LA108_0==T_COMMA) ) {
+                            alt108=1;
+                        }
+
+
+                        switch (alt108) {
+                    	case 1 :
+                    	    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:960:42: T_COMMA expb= expression
+                    	    {
+                    	    match(input,T_COMMA,FOLLOW_T_COMMA_in_methodCallParams4859); 
+
+                    	    pushFollow(FOLLOW_expression_in_methodCallParams4863);
+                    	    expb=expression();
+
+                    	    state._fsp--;
+
+
+                    	    result.add(expb);
+
+                    	    }
+                    	    break;
+
+                    	default :
+                    	    break loop108;
+                        }
+                    } while (true);
+
+
+                    }
+                    break;
+
+            }
+
+
+            }
+
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return result;
+    }
+    // $ANTLR end "methodCallParams"
+
+
+
+    // $ANTLR start "op_un"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:970:1: op_un returns [UnaryOperator expr] : (r= op_un_set_list |r2= op_un_map | T_MINUS | T_NOT | T_ABS );
+    public final UnaryOperator op_un() throws RecognitionException {
+        UnaryOperator expr = null;
+
+
+        UnaryOperator r =null;
+
+        UnaryOperator r2 =null;
+
+
+
+        		expr = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:975:2: (r= op_un_set_list |r2= op_un_map | T_MINUS | T_NOT | T_ABS )
+            int alt110=5;
+            switch ( input.LA(1) ) {
+            case T_CARD:
+            case T_DCONC:
+            case T_DINTER:
+            case T_DUNION:
+            case T_ELEMS:
+            case T_HEAD:
+            case T_INDS:
+            case T_LEN:
+            case T_TAIL:
+                {
+                alt110=1;
+                }
+                break;
+            case T_DOM:
+            case T_MERGE:
+            case T_RNG:
+                {
+                alt110=2;
+                }
+                break;
+            case T_MINUS:
+                {
+                alt110=3;
+                }
+                break;
+            case T_NOT:
+                {
+                alt110=4;
+                }
+                break;
+            case T_ABS:
+                {
+                alt110=5;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 110, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt110) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:975:4: r= op_un_set_list
+                    {
+                    pushFollow(FOLLOW_op_un_set_list_in_op_un4902);
+                    r=op_un_set_list();
+
+                    state._fsp--;
+
+
+                    expr = r;
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:976:4: r2= op_un_map
+                    {
+                    pushFollow(FOLLOW_op_un_map_in_op_un4911);
+                    r2=op_un_map();
+
+                    state._fsp--;
+
+
+                    expr = r2;
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:977:4: T_MINUS
+                    {
+                    match(input,T_MINUS,FOLLOW_T_MINUS_in_op_un4919); 
+
+                    expr = createUnaryOperator(ExpressionKind.unminus);
+
+                    }
+                    break;
+                case 4 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:978:4: T_NOT
+                    {
+                    match(input,T_NOT,FOLLOW_T_NOT_in_op_un4927); 
+
+                    expr = createUnaryOperator(ExpressionKind.not);
+
+                    }
+                    break;
+                case 5 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:979:4: T_ABS
+                    {
+                    match(input,T_ABS,FOLLOW_T_ABS_in_op_un4935); 
+
+                    expr = createUnaryOperator(ExpressionKind.abs);
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return expr;
+    }
+    // $ANTLR end "op_un"
+
+
+
+    // $ANTLR start "op_un_set_list"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:983:1: op_un_set_list returns [UnaryOperator expr] : ( T_CARD | T_DCONC | T_DINTER | T_DUNION | T_ELEMS | T_HEAD | T_INDS | T_LEN | T_TAIL );
+    public final UnaryOperator op_un_set_list() throws RecognitionException {
+        UnaryOperator expr = null;
+
+
+
+        		expr = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:988:2: ( T_CARD | T_DCONC | T_DINTER | T_DUNION | T_ELEMS | T_HEAD | T_INDS | T_LEN | T_TAIL )
+            int alt111=9;
+            switch ( input.LA(1) ) {
+            case T_CARD:
+                {
+                alt111=1;
+                }
+                break;
+            case T_DCONC:
+                {
+                alt111=2;
+                }
+                break;
+            case T_DINTER:
+                {
+                alt111=3;
+                }
+                break;
+            case T_DUNION:
+                {
+                alt111=4;
+                }
+                break;
+            case T_ELEMS:
+                {
+                alt111=5;
+                }
+                break;
+            case T_HEAD:
+                {
+                alt111=6;
+                }
+                break;
+            case T_INDS:
+                {
+                alt111=7;
+                }
+                break;
+            case T_LEN:
+                {
+                alt111=8;
+                }
+                break;
+            case T_TAIL:
+                {
+                alt111=9;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 111, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt111) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:988:4: T_CARD
+                    {
+                    match(input,T_CARD,FOLLOW_T_CARD_in_op_un_set_list4962); 
+
+                    expr = createUnaryOperator(ExpressionKind.card);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:990:4: T_DCONC
+                    {
+                    match(input,T_DCONC,FOLLOW_T_DCONC_in_op_un_set_list4973); 
+
+                    expr = createUnaryOperator(ExpressionKind.dconc);
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:992:4: T_DINTER
+                    {
+                    match(input,T_DINTER,FOLLOW_T_DINTER_in_op_un_set_list4984); 
+
+                    expr = createUnaryOperator(ExpressionKind.dinter);
+
+                    }
+                    break;
+                case 4 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:994:4: T_DUNION
+                    {
+                    match(input,T_DUNION,FOLLOW_T_DUNION_in_op_un_set_list4994); 
+
+                    expr = createUnaryOperator(ExpressionKind.dunion);
+
+                    }
+                    break;
+                case 5 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:996:4: T_ELEMS
+                    {
+                    match(input,T_ELEMS,FOLLOW_T_ELEMS_in_op_un_set_list5004); 
+
+                    expr = createUnaryOperator(ExpressionKind.elems);
+
+                    }
+                    break;
+                case 6 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:998:4: T_HEAD
+                    {
+                    match(input,T_HEAD,FOLLOW_T_HEAD_in_op_un_set_list5015); 
+
+                    expr = createUnaryOperator(ExpressionKind.head);
+
+                    }
+                    break;
+                case 7 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1000:4: T_INDS
+                    {
+                    match(input,T_INDS,FOLLOW_T_INDS_in_op_un_set_list5026); 
+
+                    expr = createUnaryOperator(ExpressionKind.inds);
+
+                    }
+                    break;
+                case 8 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1002:4: T_LEN
+                    {
+                    match(input,T_LEN,FOLLOW_T_LEN_in_op_un_set_list5037); 
+
+                    expr = createUnaryOperator(ExpressionKind.len);
+
+                    }
+                    break;
+                case 9 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1004:4: T_TAIL
+                    {
+                    match(input,T_TAIL,FOLLOW_T_TAIL_in_op_un_set_list5048); 
+
+                    expr = createUnaryOperator(ExpressionKind.tail);
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return expr;
+    }
+    // $ANTLR end "op_un_set_list"
+
+
+
+    // $ANTLR start "op_un_map"
+    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1009:1: op_un_map returns [UnaryOperator expr] : ( T_DOM | T_RNG | T_MERGE );
+    public final UnaryOperator op_un_map() throws RecognitionException {
+        UnaryOperator expr = null;
+
+
+
+        		expr = null;
+        	
+        try {
+            // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1014:2: ( T_DOM | T_RNG | T_MERGE )
+            int alt112=3;
+            switch ( input.LA(1) ) {
+            case T_DOM:
+                {
+                alt112=1;
+                }
+                break;
+            case T_RNG:
+                {
+                alt112=2;
+                }
+                break;
+            case T_MERGE:
+                {
+                alt112=3;
+                }
+                break;
+            default:
+                NoViableAltException nvae =
+                    new NoViableAltException("", 112, 0, input);
+
+                throw nvae;
+
+            }
+
+            switch (alt112) {
+                case 1 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1014:4: T_DOM
+                    {
+                    match(input,T_DOM,FOLLOW_T_DOM_in_op_un_map5077); 
+
+                    expr = createUnaryOperator(ExpressionKind.dom);
+
+                    }
+                    break;
+                case 2 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1016:4: T_RNG
+                    {
+                    match(input,T_RNG,FOLLOW_T_RNG_in_op_un_map5088); 
+
+                    expr = createUnaryOperator(ExpressionKind.range);
+
+                    }
+                    break;
+                case 3 :
+                    // C:\\Users\\KrennW\\Documents\\svn\\public\\tug_ist\\trunk\\momut\\uml_ooas\\ooas_compiler\\java\\src\\org\\momut\\ooas\\parser\\ooa.g:1018:4: T_MERGE
+                    {
+                    match(input,T_MERGE,FOLLOW_T_MERGE_in_op_un_map5099); 
+
+                    expr = createUnaryOperator(ExpressionKind.merge);
+
+                    }
+                    break;
+
+            }
+        }
+        catch (RecognitionException re) {
+            reportError(re);
+            recover(input,re);
+        }
+
+        finally {
+        	// do for sure before leaving
+        }
+        return expr;
+    }
+    // $ANTLR end "op_un_map"
+
+    // Delegated rules
+
+
+    protected DFA74 dfa74 = new DFA74(this);
+    protected DFA98 dfa98 = new DFA98(this);
+    static final String DFA74_eotS =
+        "\102\uffff";
+    static final String DFA74_eofS =
+        "\102\uffff";
+    static final String DFA74_minS =
+        "\1\21\1\uffff\1\10\77\uffff";
+    static final String DFA74_maxS =
+        "\1\175\1\uffff\1\171\77\uffff";
+    static final String DFA74_acceptS =
+        "\1\uffff\1\1\1\uffff\1\2\1\3\5\uffff\1\4\2\uffff\1\5\1\6\63\uffff";
+    static final String DFA74_specialS =
+        "\102\uffff}>";
+    static final String[] DFA74_transitionS = {
+            "\1\12\30\uffff\1\15\1\4\1\uffff\1\4\2\uffff\1\15\3\uffff\1\1"+
+            "\10\uffff\1\4\6\uffff\1\16\1\12\7\uffff\1\12\1\4\24\uffff\1"+
+            "\2\5\uffff\1\4\6\uffff\1\4\14\uffff\1\3",
+            "",
+            "\2\4\2\uffff\2\4\4\uffff\1\4\1\uffff\2\4\1\uffff\1\4\5\uffff"+
+            "\1\4\2\uffff\2\4\1\uffff\2\4\2\uffff\3\4\7\uffff\2\4\2\uffff"+
+            "\1\4\1\uffff\2\4\3\uffff\1\4\3\uffff\2\4\5\uffff\1\4\1\uffff"+
+            "\4\4\2\uffff\3\4\3\uffff\1\4\1\1\1\4\1\uffff\2\4\4\uffff\4\4"+
+            "\1\uffff\2\4\4\uffff\2\4\2\uffff\1\4\2\uffff\2\4\1\uffff\1\4"+
+            "\3\uffff\2\4",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            ""
+    };
+
+    static final short[] DFA74_eot = DFA.unpackEncodedString(DFA74_eotS);
+    static final short[] DFA74_eof = DFA.unpackEncodedString(DFA74_eofS);
+    static final char[] DFA74_min = DFA.unpackEncodedStringToUnsignedChars(DFA74_minS);
+    static final char[] DFA74_max = DFA.unpackEncodedStringToUnsignedChars(DFA74_maxS);
+    static final short[] DFA74_accept = DFA.unpackEncodedString(DFA74_acceptS);
+    static final short[] DFA74_special = DFA.unpackEncodedString(DFA74_specialS);
+    static final short[][] DFA74_transition;
+
+    static {
+        int numStates = DFA74_transitionS.length;
+        DFA74_transition = new short[numStates][];
+        for (int i=0; i<numStates; i++) {
+            DFA74_transition[i] = DFA.unpackEncodedString(DFA74_transitionS[i]);
+        }
+    }
+
+    class DFA74 extends DFA {
+
+        public DFA74(BaseRecognizer recognizer) {
+            this.recognizer = recognizer;
+            this.decisionNumber = 74;
+            this.eot = DFA74_eot;
+            this.eof = DFA74_eof;
+            this.min = DFA74_min;
+            this.max = DFA74_max;
+            this.accept = DFA74_accept;
+            this.special = DFA74_special;
+            this.transition = DFA74_transition;
+        }
+        public String getDescription() {
+            return "706:19: (e= identifierExpression |e= qvalExpression |e= constant |e= initializedComplexType |e= quantifierExpression | T_LPAREN e= expression T_RPAREN ( ( T_POINT idn= T_IDENTIFIER )+ (res= accessExpression[e] )? |e= accessExpression[e] )? )";
+        }
+    }
+    static final String DFA98_eotS =
+        "\74\uffff";
+    static final String DFA98_eofS =
+        "\74\uffff";
+    static final String DFA98_minS =
+        "\1\64\1\10\1\uffff\1\0\70\uffff";
+    static final String DFA98_maxS =
+        "\1\143\1\171\1\uffff\1\0\70\uffff";
+    static final String DFA98_acceptS =
+        "\2\uffff\1\2\70\uffff\1\1";
+    static final String DFA98_specialS =
+        "\3\uffff\1\0\70\uffff}>";
+    static final String[] DFA98_transitionS = {
+            "\1\1\56\uffff\1\2",
+            "\2\2\2\uffff\2\2\4\uffff\1\2\1\uffff\2\2\1\uffff\1\2\5\uffff"+
+            "\1\2\2\uffff\2\2\1\uffff\2\2\2\uffff\3\2\4\uffff\2\2\1\uffff"+
+            "\2\2\2\uffff\1\2\1\uffff\2\2\3\uffff\1\2\3\uffff\2\2\2\uffff"+
+            "\1\3\1\2\1\uffff\1\2\1\uffff\4\2\2\uffff\3\2\3\uffff\6\2\4\uffff"+
+            "\4\2\1\uffff\2\2\4\uffff\2\2\2\uffff\1\2\2\uffff\2\2\1\uffff"+
+            "\1\2\2\uffff\3\2",
+            "",
+            "\1\uffff",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            "",
+            ""
+    };
+
+    static final short[] DFA98_eot = DFA.unpackEncodedString(DFA98_eotS);
+    static final short[] DFA98_eof = DFA.unpackEncodedString(DFA98_eofS);
+    static final char[] DFA98_min = DFA.unpackEncodedStringToUnsignedChars(DFA98_minS);
+    static final char[] DFA98_max = DFA.unpackEncodedStringToUnsignedChars(DFA98_maxS);
+    static final short[] DFA98_accept = DFA.unpackEncodedString(DFA98_acceptS);
+    static final short[] DFA98_special = DFA.unpackEncodedString(DFA98_specialS);
+    static final short[][] DFA98_transition;
+
+    static {
+        int numStates = DFA98_transitionS.length;
+        DFA98_transition = new short[numStates][];
+        for (int i=0; i<numStates; i++) {
+            DFA98_transition[i] = DFA.unpackEncodedString(DFA98_transitionS[i]);
+        }
+    }
+
+    class DFA98 extends DFA {
+
+        public DFA98(BaseRecognizer recognizer) {
+            this.recognizer = recognizer;
+            this.decisionNumber = 98;
+            this.eot = DFA98_eot;
+            this.eof = DFA98_eof;
+            this.min = DFA98_min;
+            this.max = DFA98_max;
+            this.accept = DFA98_accept;
+            this.special = DFA98_special;
+            this.transition = DFA98_transition;
+        }
+        public String getDescription() {
+            return "891:1: identifierExpression returns [Expression result] : ({...}?aName= T_IDENTIFIER T_LPAREN m_params= methodCallParams T_RPAREN |res= reference );";
+        }
+        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
+            TokenStream input = (TokenStream)_input;
+        	int _s = s;
+            switch ( s ) {
+                    case 0 : 
+                        int LA98_3 = input.LA(1);
+
+                         
+                        int index98_3 = input.index();
+                        input.rewind();
+
+                        s = -1;
+                        if ( ((isTuple(input.LT(1).getText()))) ) {s = 59;}
+
+                        else if ( ((!isTuple(input.LT(1).getText()))) ) {s = 2;}
+
+                         
+                        input.seek(index98_3);
+
+                        if ( s>=0 ) return s;
+                        break;
+            }
+            NoViableAltException nvae =
+                new NoViableAltException(getDescription(), 98, _s, input);
+            error(nvae);
+            throw nvae;
+        }
+
+    }
+ 
+
+    public static final BitSet FOLLOW_T_CONSTS_in_ooActionSystems74 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_namedConstList_in_ooActionSystems76 = new BitSet(new long[]{0x0000000000000000L,0x0002000000000000L});
+    public static final BitSet FOLLOW_T_TYPES_in_ooActionSystems86 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_namedTypeList_in_ooActionSystems94 = new BitSet(new long[]{0x0000000000000000L,0x0000100000000000L});
+    public static final BitSet FOLLOW_T_SYSTEM_in_ooActionSystems99 = new BitSet(new long[]{0x0010000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_asTypeComposition_in_ooActionSystems106 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_namedConst_in_namedConstList129 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_SEMICOLON_in_namedConstList132 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_namedConst_in_namedConstList134 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_namedConst150 = new BitSet(new long[]{0x0000020000000000L});
+    public static final BitSet FOLLOW_T_EQUAL_in_namedConst154 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_namedConst160 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_namedType_in_namedTypeList180 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_SEMICOLON_in_namedTypeList183 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_namedType_in_namedTypeList185 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_namedType201 = new BitSet(new long[]{0x0000020000000000L});
+    public static final BitSet FOLLOW_T_EQUAL_in_namedType206 = new BitSet(new long[]{0x08101000000A4800L,0x0000100008000078L});
+    public static final BitSet FOLLOW_complexType_in_namedType218 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_ooActionSystem_in_namedType230 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_asTypeCompositionParallel_in_asTypeComposition266 = new BitSet(new long[]{0x0000000000000002L,0x0000000002000000L});
+    public static final BitSet FOLLOW_T_PRIO_in_asTypeComposition271 = new BitSet(new long[]{0x0010000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_asTypeCompositionParallel_in_asTypeComposition273 = new BitSet(new long[]{0x0000000000000002L,0x0000000002000000L});
+    public static final BitSet FOLLOW_asTypeCompositionSequential_in_asTypeCompositionParallel296 = new BitSet(new long[]{0x0000000000000002L,0x0000000000008000L});
+    public static final BitSet FOLLOW_T_NONDET_in_asTypeCompositionParallel300 = new BitSet(new long[]{0x0010000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_asTypeCompositionSequential_in_asTypeCompositionParallel302 = new BitSet(new long[]{0x0000000000000002L,0x0000000000008000L});
+    public static final BitSet FOLLOW_asTypeCompositionBlockParen_in_asTypeCompositionSequential324 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_LPAREN_in_asTypeCompositionBlockParen339 = new BitSet(new long[]{0x0010000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_asTypeComposition_in_asTypeCompositionBlockParen341 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_asTypeCompositionBlockParen344 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_asTypeCompositionBlockParen351 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_LIST_in_complexType382 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
+    public static final BitSet FOLLOW_T_LSQPAREN_in_complexType385 = new BitSet(new long[]{0x2010000000000000L});
+    public static final BitSet FOLLOW_set_in_complexType389 = new BitSet(new long[]{0x0000000000000000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_RSQPAREN_in_complexType395 = new BitSet(new long[]{0x0000000000000000L,0x0000000000100000L});
+    public static final BitSet FOLLOW_T_OF_in_complexType397 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_complexType402 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_LSQPAREN_in_complexType417 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_complexType421 = new BitSet(new long[]{0x0000000000200000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_COMMA_in_complexType430 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_complexType434 = new BitSet(new long[]{0x0000000000200000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_RSQPAREN_in_complexType440 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_MAP_in_complexType450 = new BitSet(new long[]{0x08101000000A4000L,0x0000000000000020L});
+    public static final BitSet FOLLOW_T_LSQPAREN_in_complexType455 = new BitSet(new long[]{0x2010000000000000L});
+    public static final BitSet FOLLOW_set_in_complexType459 = new BitSet(new long[]{0x0000000000000000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_RSQPAREN_in_complexType465 = new BitSet(new long[]{0x08101000000A4000L});
+    public static final BitSet FOLLOW_simpleType_in_complexType471 = new BitSet(new long[]{0x0000000000000000L,0x0000800000000000L});
+    public static final BitSet FOLLOW_T_TO_in_complexType473 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_complexType477 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_QUANTITY_in_complexType491 = new BitSet(new long[]{0x0000000000000000L,0x0000000000100000L});
+    public static final BitSet FOLLOW_T_OF_in_complexType493 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
+    public static final BitSet FOLLOW_T_LSQPAREN_in_complexType495 = new BitSet(new long[]{0x0010000000000000L,0x0000000000000400L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_complexType500 = new BitSet(new long[]{0x0000000000200000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_MINUS_in_complexType505 = new BitSet(new long[]{0x0400000000000000L});
+    public static final BitSet FOLLOW_T_INFTY_in_complexType507 = new BitSet(new long[]{0x0000000000200000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_COMMA_in_complexType517 = new BitSet(new long[]{0x0410000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_complexType522 = new BitSet(new long[]{0x0000000000200000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_INFTY_in_complexType526 = new BitSet(new long[]{0x0000000000200000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_RSQPAREN_in_complexType533 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_LPAREN_in_complexType543 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_complexType547 = new BitSet(new long[]{0x0000000000200000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_COMMA_in_complexType556 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_complexType560 = new BitSet(new long[]{0x0000000000200000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_complexType567 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_simpleType_in_complexType580 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_BOOL_in_simpleType613 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_INT_in_simpleType626 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
+    public static final BitSet FOLLOW_T_LSQPAREN_in_simpleType628 = new BitSet(new long[]{0x2410000000000000L});
+    public static final BitSet FOLLOW_set_in_simpleType632 = new BitSet(new long[]{0x0000000000000000L,0x0000000010000000L});
+    public static final BitSet FOLLOW_T_RANGETO_in_simpleType640 = new BitSet(new long[]{0x2410000000000000L});
+    public static final BitSet FOLLOW_set_in_simpleType644 = new BitSet(new long[]{0x0000000000000000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_RSQPAREN_in_simpleType652 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_FLOAT_in_simpleType671 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
+    public static final BitSet FOLLOW_T_LSQPAREN_in_simpleType674 = new BitSet(new long[]{0x0410200000000000L});
+    public static final BitSet FOLLOW_set_in_simpleType678 = new BitSet(new long[]{0x0000000000000000L,0x0000000010000000L});
+    public static final BitSet FOLLOW_T_RANGETO_in_simpleType686 = new BitSet(new long[]{0x0410200000000000L});
+    public static final BitSet FOLLOW_set_in_simpleType690 = new BitSet(new long[]{0x0000000000000000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_RSQPAREN_in_simpleType698 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_CHAR_in_simpleType716 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_CBRL_in_simpleType732 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_simpleType736 = new BitSet(new long[]{0x0000020000240000L});
+    public static final BitSet FOLLOW_T_EQUAL_in_simpleType739 = new BitSet(new long[]{0x2000000000000000L});
+    public static final BitSet FOLLOW_T_INTNUMBER_in_simpleType743 = new BitSet(new long[]{0x0000000000240000L});
+    public static final BitSet FOLLOW_T_COMMA_in_simpleType754 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_simpleType758 = new BitSet(new long[]{0x0000020000240000L});
+    public static final BitSet FOLLOW_T_EQUAL_in_simpleType761 = new BitSet(new long[]{0x2000000000000000L});
+    public static final BitSet FOLLOW_T_INTNUMBER_in_simpleType765 = new BitSet(new long[]{0x0000000000240000L});
+    public static final BitSet FOLLOW_T_CBRR_in_simpleType773 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_simpleType784 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_AUTOCONS_in_ooActionSystem827 = new BitSet(new long[]{0x0000000000000000L,0x0000100000000000L});
+    public static final BitSet FOLLOW_T_SYSTEM_in_ooActionSystem836 = new BitSet(new long[]{0x0000000000000000L,0x8000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_ooActionSystem839 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_ooActionSystem843 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_ooActionSystem845 = new BitSet(new long[]{0x0000000000000000L,0x8000000000000000L});
+    public static final BitSet FOLLOW_127_in_ooActionSystem858 = new BitSet(new long[]{0x0000000200000100L,0x0108000000000200L});
+    public static final BitSet FOLLOW_T_VAR_in_ooActionSystem864 = new BitSet(new long[]{0x0010000004000000L,0x0000010000040000L});
+    public static final BitSet FOLLOW_attrList_in_ooActionSystem866 = new BitSet(new long[]{0x0000000200000100L,0x0100000000000200L});
+    public static final BitSet FOLLOW_T_METHODS_in_ooActionSystem874 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_methodList_in_ooActionSystem876 = new BitSet(new long[]{0x0000000200000100L,0x0100000000000000L});
+    public static final BitSet FOLLOW_T_ACTIONS_in_ooActionSystem884 = new BitSet(new long[]{0x0010000004000000L,0x0000000000040000L});
+    public static final BitSet FOLLOW_namedActionList_in_ooActionSystem886 = new BitSet(new long[]{0x0000000200000000L,0x0100000000000000L});
+    public static final BitSet FOLLOW_T_DO_in_ooActionSystem894 = new BitSet(new long[]{0x0010000000000000L,0x0008008020080010L});
+    public static final BitSet FOLLOW_actionBlock_in_ooActionSystem899 = new BitSet(new long[]{0x0000000000000000L,0x0000000000080000L});
+    public static final BitSet FOLLOW_T_OD_in_ooActionSystem906 = new BitSet(new long[]{0x0000000000000000L,0x0100000000000000L});
+    public static final BitSet FOLLOW_120_in_ooActionSystem912 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_attr_in_attrList943 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_SEMICOLON_in_attrList946 = new BitSet(new long[]{0x0010000004000000L,0x0000010000040000L});
+    public static final BitSet FOLLOW_attr_in_attrList948 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_STATIC_in_attr973 = new BitSet(new long[]{0x0010000004000000L,0x0000000000040000L});
+    public static final BitSet FOLLOW_T_OBS_in_attr980 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_CTRL_in_attr986 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_attr997 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_attr1000 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_attr1004 = new BitSet(new long[]{0x0000020000000002L});
+    public static final BitSet FOLLOW_T_EQUAL_in_attr1007 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_attr1011 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_method_in_methodList1033 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_SEMICOLON_in_methodList1036 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_method_in_methodList1038 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_method1060 = new BitSet(new long[]{0x0000020000100000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_method1068 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_methodParameterList_in_method1070 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_method1074 = new BitSet(new long[]{0x0000020000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_method1082 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_method1086 = new BitSet(new long[]{0x0000020000000000L});
+    public static final BitSet FOLLOW_T_EQUAL_in_method1096 = new BitSet(new long[]{0x4010000000008040L,0x0008008820000010L});
+    public static final BitSet FOLLOW_T_VAR_in_method1104 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_localActionVars_in_method1106 = new BitSet(new long[]{0x0000000000000000L,0x0400000000000000L});
+    public static final BitSet FOLLOW_122_in_method1109 = new BitSet(new long[]{0x4010000000008040L,0x0008008820000010L});
+    public static final BitSet FOLLOW_actionBody_in_method1384 = new BitSet(new long[]{0x0000010000000000L});
+    public static final BitSet FOLLOW_T_END_in_method1392 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_methodParameterList1416 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_methodParameterList1418 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_methodParameterList1422 = new BitSet(new long[]{0x0000000000200002L});
+    public static final BitSet FOLLOW_T_COMMA_in_methodParameterList1430 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_methodParameterList1434 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_methodParameterList1436 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_methodParameterList1440 = new BitSet(new long[]{0x0000000000200002L});
+    public static final BitSet FOLLOW_namedAction_in_namedActionList1467 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_SEMICOLON_in_namedActionList1470 = new BitSet(new long[]{0x0010000004000000L,0x0000000000040000L});
+    public static final BitSet FOLLOW_namedAction_in_namedActionList1472 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_CTRL_in_namedAction1510 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_OBS_in_namedAction1515 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_namedAction1527 = new BitSet(new long[]{0x0000020000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_namedAction1535 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_methodParameterList_in_namedAction1537 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_namedAction1541 = new BitSet(new long[]{0x0000020000000000L});
+    public static final BitSet FOLLOW_T_EQUAL_in_namedAction1548 = new BitSet(new long[]{0x0000000000000000L,0x0008000020000000L});
+    public static final BitSet FOLLOW_T_VAR_in_namedAction1554 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_localActionVars_in_namedAction1556 = new BitSet(new long[]{0x0000000000000000L,0x0000000020000000L});
+    public static final BitSet FOLLOW_discreteActionBody_in_namedAction1567 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_localActionVars1599 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_localActionVars1601 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_localActionVars1605 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_SEMICOLON_in_localActionVars1614 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_localActionVars1618 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_localActionVars1620 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_localActionVars1624 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_discreteActionBody_in_anonymousAction1659 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_CONT_in_continuousActionBody1684 = new BitSet(new long[]{0x0000000000000000L,0x0000000020000000L});
+    public static final BitSet FOLLOW_T_REQUIRES_in_continuousActionBody1686 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_continuousActionBody1690 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_continuousActionBody1692 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_qualConstraintList_in_continuousActionBody1699 = new BitSet(new long[]{0x0000010000000000L});
+    public static final BitSet FOLLOW_T_END_in_continuousActionBody1704 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_qualConstraint_in_qualConstraintList1732 = new BitSet(new long[]{0x0000000000200002L});
+    public static final BitSet FOLLOW_T_COMMA_in_qualConstraintList1739 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_qualConstraint_in_qualConstraintList1743 = new BitSet(new long[]{0x0000000000200002L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_qualConstraint1774 = new BitSet(new long[]{0x0000020000000000L});
+    public static final BitSet FOLLOW_T_EQUAL_in_qualConstraint1776 = new BitSet(new long[]{0x0010000010000000L});
+    public static final BitSet FOLLOW_T_DERIV_in_qualConstraint1783 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_qualConstraint1787 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_qualConstraint1822 = new BitSet(new long[]{0x0000000020000002L,0x0000080004000000L});
+    public static final BitSet FOLLOW_T_SUM_in_qualConstraint1853 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_DIFF_in_qualConstraint1870 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_PROD_in_qualConstraint1887 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_qualConstraint1916 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_REQUIRES_in_discreteActionBody2010 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_discreteActionBody2014 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_discreteActionBody2016 = new BitSet(new long[]{0x4010000000008040L,0x0008008820000010L});
+    public static final BitSet FOLLOW_actionBody_in_discreteActionBody2023 = new BitSet(new long[]{0x0000010000000000L});
+    public static final BitSet FOLLOW_T_END_in_discreteActionBody2028 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_actionBlockParallel_in_actionBlock2071 = new BitSet(new long[]{0x0000000000000002L,0x0000000002000000L});
+    public static final BitSet FOLLOW_T_PRIO_in_actionBlock2075 = new BitSet(new long[]{0x0010000000000000L,0x0008008020000010L});
+    public static final BitSet FOLLOW_actionBlockParallel_in_actionBlock2077 = new BitSet(new long[]{0x0000000000000002L,0x0000000002000000L});
+    public static final BitSet FOLLOW_actionBlockSequential_in_actionBlockParallel2110 = new BitSet(new long[]{0x0000000000000002L,0x0000000000008000L});
+    public static final BitSet FOLLOW_T_NONDET_in_actionBlockParallel2114 = new BitSet(new long[]{0x0010000000000000L,0x0008008020000010L});
+    public static final BitSet FOLLOW_actionBlockSequential_in_actionBlockParallel2116 = new BitSet(new long[]{0x0000000000000002L,0x0000000000008000L});
+    public static final BitSet FOLLOW_T_VAR_in_actionBlockSequential2150 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_blockvarlist_in_actionBlockSequential2154 = new BitSet(new long[]{0x0000000000100000L,0x0040000000000000L});
+    public static final BitSet FOLLOW_118_in_actionBlockSequential2158 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_actionBlockSequential2162 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_actionBlockSequential2169 = new BitSet(new long[]{0x0010000000000000L,0x0000008020000010L});
+    public static final BitSet FOLLOW_actionBlockParen_in_actionBlockSequential2178 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_SEMICOLON_in_actionBlockSequential2182 = new BitSet(new long[]{0x0010000000000000L,0x0000008020000010L});
+    public static final BitSet FOLLOW_actionBlockParen_in_actionBlockSequential2184 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_LPAREN_in_actionBlockParen2208 = new BitSet(new long[]{0x0010000000000000L,0x0008008020000010L});
+    public static final BitSet FOLLOW_actionBlock_in_actionBlockParen2210 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_actionBlockParen2213 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_anonymousOrNamedAction_in_actionBlockParen2218 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_anonymousAction_in_anonymousOrNamedAction2235 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_anonymousOrNamedAction2244 = new BitSet(new long[]{0x0000C00000000002L,0x0000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_anonymousOrNamedAction2258 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220A40016530L});
+    public static final BitSet FOLLOW_methodCallParams_in_anonymousOrNamedAction2263 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_anonymousOrNamedAction2265 = new BitSet(new long[]{0x0000C00000000002L});
+    public static final BitSet FOLLOW_set_in_anonymousOrNamedAction2283 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_anonymousOrNamedAction2289 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_anonymousOrNamedAction2293 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_anonymousOrNamedAction2295 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_SKIP_in_anonymousOrNamedAction2306 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_blockvar_in_blockvarlist2322 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_SEMICOLON_in_blockvarlist2327 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_blockvar_in_blockvarlist2329 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_blockvar2349 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_blockvar2352 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_blockvar2356 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_actionBodyParallel_in_actionBody2391 = new BitSet(new long[]{0x0000000000000002L,0x0000000002000000L});
+    public static final BitSet FOLLOW_T_PRIO_in_actionBody2395 = new BitSet(new long[]{0x4010000000008040L,0x0008008820000010L});
+    public static final BitSet FOLLOW_actionBodyParallel_in_actionBody2397 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_actionBodySequential_in_actionBodyParallel2432 = new BitSet(new long[]{0x0000000000000002L,0x0000000000008000L});
+    public static final BitSet FOLLOW_T_NONDET_in_actionBodyParallel2438 = new BitSet(new long[]{0x4010000000008040L,0x0008008820000010L});
+    public static final BitSet FOLLOW_actionBodySequential_in_actionBodyParallel2442 = new BitSet(new long[]{0x0000000000000002L,0x0000000000008000L});
+    public static final BitSet FOLLOW_T_VAR_in_actionBodySequential2478 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_blockvarlist_in_actionBodySequential2482 = new BitSet(new long[]{0x0000000000100000L,0x0040000000000000L});
+    public static final BitSet FOLLOW_118_in_actionBodySequential2486 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_actionBodySequential2490 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_actionBodySequential2497 = new BitSet(new long[]{0x4010000000008040L,0x0000008820000010L});
+    public static final BitSet FOLLOW_actionBodyParen_in_actionBodySequential2505 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_SEMICOLON_in_actionBodySequential2509 = new BitSet(new long[]{0x4010000000008040L,0x0000008820000010L});
+    public static final BitSet FOLLOW_actionBodyParen_in_actionBodySequential2511 = new BitSet(new long[]{0x0000000000000002L,0x0000001000000000L});
+    public static final BitSet FOLLOW_T_LPAREN_in_actionBodyParen2539 = new BitSet(new long[]{0x4010000000008040L,0x0008008820000010L});
+    public static final BitSet FOLLOW_actionBody_in_actionBodyParen2541 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_actionBodyParen2545 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_statement_in_actionBodyParen2552 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_ABORT_in_statement2580 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_SKIP_in_statement2587 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_BREAK_in_statement2594 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_KILL_in_statement2601 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_statement2603 = new BitSet(new long[]{0x0010000000000000L,0x0000000800000000L});
+    public static final BitSet FOLLOW_set_in_statement2607 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_statement2615 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_discreteActionBody_in_statement2625 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_reference_in_statement2634 = new BitSet(new long[]{0x0000000000200402L});
+    public static final BitSet FOLLOW_T_ASSIGNMENT_in_statement2662 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_statement2667 = new BitSet(new long[]{0x0000000000000002L,0x0010000000000000L});
+    public static final BitSet FOLLOW_T_WITH_in_statement2687 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_statement2691 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_COMMA_in_statement2744 = new BitSet(new long[]{0x0010000000000000L,0x0000000800000000L});
+    public static final BitSet FOLLOW_reference_in_statement2748 = new BitSet(new long[]{0x0000000000200400L});
+    public static final BitSet FOLLOW_T_ASSIGNMENT_in_statement2763 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_statement2785 = new BitSet(new long[]{0x0000000000200000L});
+    public static final BitSet FOLLOW_T_COMMA_in_statement2804 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_statement2808 = new BitSet(new long[]{0x0000000000200002L,0x0010000000000000L});
+    public static final BitSet FOLLOW_T_WITH_in_statement2822 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_statement2826 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_atomExpression_in_expression2901 = new BitSet(new long[]{0x11A6021920802202L,0x00040C2184A31C03L});
+    public static final BitSet FOLLOW_binoperator_in_expression2914 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_atomExpression_in_expression2922 = new BitSet(new long[]{0x11A6021920802202L,0x00040C2184A31C03L});
+    public static final BitSet FOLLOW_T_BIIMPLIES_in_binoperator2955 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_GREATER_in_binoperator2964 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_GREATEREQUAL_in_binoperator2974 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_LESS_in_binoperator2983 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_LESSEQUAL_in_binoperator2993 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_EQUAL_in_binoperator3002 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_NOTEQUAL_in_binoperator3014 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_IMPLIES_in_binoperator3025 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_MINUS_in_binoperator3034 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_SUM_in_binoperator3044 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_IN_in_binoperator3054 = new BitSet(new long[]{0x0000000000000002L,0x0000004000000000L});
+    public static final BitSet FOLLOW_T_SET_in_binoperator3056 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_NOT_in_binoperator3067 = new BitSet(new long[]{0x0100000000000000L});
+    public static final BitSet FOLLOW_T_IN_in_binoperator3069 = new BitSet(new long[]{0x0000000000000002L,0x0000004000000000L});
+    public static final BitSet FOLLOW_T_SET_in_binoperator3071 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_SUBSET_in_binoperator3082 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_OR_in_binoperator3092 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_DIV_in_binoperator3101 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_PROD_in_binoperator3110 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_IDIV_in_binoperator3120 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_MOD_in_binoperator3130 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_UNION_in_binoperator3140 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_DIFF_in_binoperator3151 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_INTER_in_binoperator3162 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_AND_in_binoperator3173 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_POW_in_binoperator3188 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_CONC_in_binoperator3203 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_DOMRESBY_in_binoperator3216 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_DOMRESTO_in_binoperator3226 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_RNGRESBY_in_binoperator3236 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_RNGRESTO_in_binoperator3246 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_MUNION_in_binoperator3256 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_SEQMOD_MAPOVERRIDE_in_binoperator3266 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_op_un_in_atomExpression3304 = new BitSet(new long[]{0x20112C0000020000L,0x2001020800006030L});
+    public static final BitSet FOLLOW_identifierExpression_in_atomExpression3321 = new BitSet(new long[]{0x0000000000000002L,0x0200000000000000L});
+    public static final BitSet FOLLOW_qvalExpression_in_atomExpression3332 = new BitSet(new long[]{0x0000000000000002L,0x0200000000000000L});
+    public static final BitSet FOLLOW_constant_in_atomExpression3343 = new BitSet(new long[]{0x0000000000000002L,0x0200000000000000L});
+    public static final BitSet FOLLOW_initializedComplexType_in_atomExpression3354 = new BitSet(new long[]{0x0000000000000002L,0x0200000000000000L});
+    public static final BitSet FOLLOW_quantifierExpression_in_atomExpression3366 = new BitSet(new long[]{0x0000000000000002L,0x0200000000000000L});
+    public static final BitSet FOLLOW_T_LPAREN_in_atomExpression3375 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_atomExpression3379 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_atomExpression3381 = new BitSet(new long[]{0x0000000000000002L,0x0200000000400030L});
+    public static final BitSet FOLLOW_T_POINT_in_atomExpression3404 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_atomExpression3416 = new BitSet(new long[]{0x0000000000000002L,0x0200000000400030L});
+    public static final BitSet FOLLOW_accessExpression_in_atomExpression3440 = new BitSet(new long[]{0x0000000000000002L,0x0200000000000000L});
+    public static final BitSet FOLLOW_accessExpression_in_atomExpression3460 = new BitSet(new long[]{0x0000000000000002L,0x0200000000000000L});
+    public static final BitSet FOLLOW_121_in_atomExpression3479 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_atomExpression3483 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_IF_in_atomExpression3504 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_atomExpression3508 = new BitSet(new long[]{0x0000000000000000L,0x0000400000000000L});
+    public static final BitSet FOLLOW_T_THEN_in_atomExpression3510 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_atomExpression3514 = new BitSet(new long[]{0x0000008000000000L});
+    public static final BitSet FOLLOW_T_ELSE_in_atomExpression3516 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_atomExpression3520 = new BitSet(new long[]{0x0000010000000000L});
+    public static final BitSet FOLLOW_T_END_in_atomExpression3522 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_set_in_quantifierExpression3554 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_quantifierExpression3571 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_quantifierExpression3574 = new BitSet(new long[]{0x08101000000A4000L});
+    public static final BitSet FOLLOW_simpleType_in_quantifierExpression3578 = new BitSet(new long[]{0x0000000000300000L});
+    public static final BitSet FOLLOW_T_COMMA_in_quantifierExpression3589 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_quantifierExpression3593 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_quantifierExpression3596 = new BitSet(new long[]{0x08101000000A4000L});
+    public static final BitSet FOLLOW_simpleType_in_quantifierExpression3600 = new BitSet(new long[]{0x0000000000300000L});
+    public static final BitSet FOLLOW_T_COLON_in_quantifierExpression3610 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_quantifierExpression3612 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_quantifierExpression3616 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_quantifierExpression3618 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_TRUE_in_constant3652 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_FALSE_in_constant3660 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_NIL_in_constant3667 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_SELF_in_constant3675 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_FLOATNUMBER_in_constant3686 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_INTNUMBER_in_constant3695 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_STRINGLITERAL_in_constant3704 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_initializedListType_in_initializedComplexType3731 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_initializedSetType_in_initializedComplexType3740 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_NEW_in_initializedComplexType3748 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_initializedComplexType3750 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_initializedComplexType3754 = new BitSet(new long[]{0x0000000000200000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_COMMA_in_initializedComplexType3766 = new BitSet(new long[]{0x0000000000000000L,0x0000020000000000L});
+    public static final BitSet FOLLOW_T_STRINGLITERAL_in_initializedComplexType3771 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_initializedComplexType3773 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_RPAREN_in_initializedComplexType3782 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_LSQPAREN_in_initializedListType3813 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_initializedListType3817 = new BitSet(new long[]{0x0000000000201000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_COMMA_in_initializedListType3828 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_initializedListType3832 = new BitSet(new long[]{0x0000000000200000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_listComprehension_in_initializedListType3844 = new BitSet(new long[]{0x0000000000000000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_RSQPAREN_in_initializedListType3852 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_BAR_in_listComprehension3883 = new BitSet(new long[]{0x0000000000000000L,0x0008000000000000L});
+    public static final BitSet FOLLOW_T_VAR_in_listComprehension3885 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_listComprehension3891 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_listComprehension3894 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_listComprehension3898 = new BitSet(new long[]{0x0000000000000002L,0x0040001000000000L});
+    public static final BitSet FOLLOW_T_SEMICOLON_in_listComprehension3907 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_listComprehension3911 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_listComprehension3916 = new BitSet(new long[]{0x0000000000000002L,0x0040001000000000L});
+    public static final BitSet FOLLOW_118_in_listComprehension3926 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_listComprehension3932 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_CBRL_in_initializedSetType3958 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000080L});
+    public static final BitSet FOLLOW_T_MAPS_in_initializedSetType3960 = new BitSet(new long[]{0x0000000000040000L});
+    public static final BitSet FOLLOW_T_CBRR_in_initializedSetType3962 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_initializedSet_in_initializedSetType3973 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_CBRL_in_initializedSet3999 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_initializedSet4003 = new BitSet(new long[]{0x0000000000241000L,0x0000000000000080L});
+    public static final BitSet FOLLOW_T_COMMA_in_initializedSet4033 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_initializedSet4037 = new BitSet(new long[]{0x0000000000240000L});
+    public static final BitSet FOLLOW_map_in_initializedSet4055 = new BitSet(new long[]{0x0000000000040000L});
+    public static final BitSet FOLLOW_setComprehension_in_initializedSet4068 = new BitSet(new long[]{0x0000000000040000L});
+    public static final BitSet FOLLOW_T_CBRR_in_initializedSet4078 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_MAPS_in_map4114 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_map4118 = new BitSet(new long[]{0x0000000000200002L});
+    public static final BitSet FOLLOW_T_COMMA_in_map4126 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_map4130 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000080L});
+    public static final BitSet FOLLOW_T_MAPS_in_map4132 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_map4136 = new BitSet(new long[]{0x0000000000200002L});
+    public static final BitSet FOLLOW_T_BAR_in_setComprehension4158 = new BitSet(new long[]{0x0000000000000000L,0x0008000000000000L});
+    public static final BitSet FOLLOW_T_VAR_in_setComprehension4160 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_setComprehension4164 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_setComprehension4167 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_setComprehension4171 = new BitSet(new long[]{0x0000000000000002L,0x0040001000000000L});
+    public static final BitSet FOLLOW_T_SEMICOLON_in_setComprehension4181 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_setComprehension4185 = new BitSet(new long[]{0x0000000000100000L});
+    public static final BitSet FOLLOW_T_COLON_in_setComprehension4187 = new BitSet(new long[]{0x08101000000A4000L,0x0000000008000078L});
+    public static final BitSet FOLLOW_complexType_in_setComprehension4191 = new BitSet(new long[]{0x0000000000000002L,0x0040001000000000L});
+    public static final BitSet FOLLOW_118_in_setComprehension4205 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_setComprehension4211 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_125_in_qvalExpression4246 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_qvalExpression4248 = new BitSet(new long[]{0x0410000000000000L,0x0000000800004400L});
+    public static final BitSet FOLLOW_T_NIL_in_qvalExpression4262 = new BitSet(new long[]{0x0000000000200000L});
+    public static final BitSet FOLLOW_qualifiedIdentifier_in_qvalExpression4283 = new BitSet(new long[]{0x0000000000200000L,0x0000000010000000L});
+    public static final BitSet FOLLOW_T_MINUS_in_qvalExpression4302 = new BitSet(new long[]{0x0400000000000000L});
+    public static final BitSet FOLLOW_T_INFTY_in_qvalExpression4308 = new BitSet(new long[]{0x0000000000200000L,0x0000000010000000L});
+    public static final BitSet FOLLOW_T_RANGETO_in_qvalExpression4326 = new BitSet(new long[]{0x0410000000000000L,0x0000000800000000L});
+    public static final BitSet FOLLOW_qualifiedIdentifier_in_qvalExpression4336 = new BitSet(new long[]{0x0000000000200000L});
+    public static final BitSet FOLLOW_T_INFTY_in_qvalExpression4354 = new BitSet(new long[]{0x0000000000200000L});
+    public static final BitSet FOLLOW_T_COMMA_in_qvalExpression4378 = new BitSet(new long[]{0x0000000000000000L,0x5800000000004000L});
+    public static final BitSet FOLLOW_T_NIL_in_qvalExpression4388 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_126_in_qvalExpression4404 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_124_in_qvalExpression4417 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_123_in_qvalExpression4430 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_qvalExpression4452 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_identifierExpression4485 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_identifierExpression4487 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220A40016530L});
+    public static final BitSet FOLLOW_methodCallParams_in_identifierExpression4491 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_identifierExpression4493 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_reference_in_identifierExpression4508 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_qualifiedIdentifier_in_reference4546 = new BitSet(new long[]{0x0000C00000000002L,0x0080000001000030L});
+    public static final BitSet FOLLOW_accessExpression_in_reference4558 = new BitSet(new long[]{0x0000C00000000002L,0x0080000001000000L});
+    public static final BitSet FOLLOW_T_PRIMED_in_reference4583 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_119_in_reference4599 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_reference4601 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_reference4605 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_reference4607 = new BitSet(new long[]{0x0000C00000000000L});
+    public static final BitSet FOLLOW_set_in_reference4613 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
+    public static final BitSet FOLLOW_T_LPAREN_in_reference4619 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_reference4623 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_reference4625 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_LSQPAREN_in_accessExpression4670 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_accessExpression4674 = new BitSet(new long[]{0x0000000000000000L,0x0000000400000000L});
+    public static final BitSet FOLLOW_T_RSQPAREN_in_accessExpression4676 = new BitSet(new long[]{0x0000000000000002L,0x0000000000400030L});
+    public static final BitSet FOLLOW_T_LPAREN_in_accessExpression4703 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220A40016530L});
+    public static final BitSet FOLLOW_methodCallParams_in_accessExpression4707 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
+    public static final BitSet FOLLOW_T_RPAREN_in_accessExpression4709 = new BitSet(new long[]{0x0000000000000002L,0x0000000000400030L});
+    public static final BitSet FOLLOW_T_POINT_in_accessExpression4731 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_accessExpression4739 = new BitSet(new long[]{0x0000000000000002L,0x0000000000400030L});
+    public static final BitSet FOLLOW_accessExpression_in_accessExpression4755 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_SELF_in_qualifiedIdentifier4794 = new BitSet(new long[]{0x0000000000000000L,0x0000000000400000L});
+    public static final BitSet FOLLOW_T_POINT_in_qualifiedIdentifier4796 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_qualifiedIdentifier4808 = new BitSet(new long[]{0x0000000000000002L,0x0000000000400000L});
+    public static final BitSet FOLLOW_T_POINT_in_qualifiedIdentifier4817 = new BitSet(new long[]{0x0010000000000000L});
+    public static final BitSet FOLLOW_T_IDENTIFIER_in_qualifiedIdentifier4821 = new BitSet(new long[]{0x0000000000000002L,0x0000000000400000L});
+    public static final BitSet FOLLOW_expression_in_methodCallParams4854 = new BitSet(new long[]{0x0000000000200002L});
+    public static final BitSet FOLLOW_T_COMMA_in_methodCallParams4859 = new BitSet(new long[]{0xA2592C6488030080L,0x2001220840016530L});
+    public static final BitSet FOLLOW_expression_in_methodCallParams4863 = new BitSet(new long[]{0x0000000000200002L});
+    public static final BitSet FOLLOW_op_un_set_list_in_op_un4902 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_op_un_map_in_op_un4911 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_MINUS_in_op_un4919 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_NOT_in_op_un4927 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_ABS_in_op_un4935 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_CARD_in_op_un_set_list4962 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_DCONC_in_op_un_set_list4973 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_DINTER_in_op_un_set_list4984 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_DUNION_in_op_un_set_list4994 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_ELEMS_in_op_un_set_list5004 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_HEAD_in_op_un_set_list5015 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_INDS_in_op_un_set_list5026 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_LEN_in_op_un_set_list5037 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_TAIL_in_op_un_set_list5048 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_DOM_in_op_un_map5077 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_RNG_in_op_un_map5088 = new BitSet(new long[]{0x0000000000000002L});
+    public static final BitSet FOLLOW_T_MERGE_in_op_un_map5099 = new BitSet(new long[]{0x0000000000000002L});
+
+}
\ No newline at end of file
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/InternalCompilerException.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/InternalCompilerException.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/InternalCompilerException.java	(revision 2)
@@ -0,0 +1,41 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+
+package org.momut.ooas.utils.exceptions;
+
+public class InternalCompilerException extends OoasCompilerRuntimeException {
+	private static final long serialVersionUID = 1L;
+
+	public InternalCompilerException(String msg, Object...args) {
+		super(String.format(msg,args));
+	}
+
+	public InternalCompilerException(Throwable t) {
+		super(t);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/OoasCompilerRuntimeException.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/OoasCompilerRuntimeException.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/OoasCompilerRuntimeException.java	(revision 2)
@@ -0,0 +1,49 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.utils.exceptions;
+
+public class OoasCompilerRuntimeException extends RuntimeException {
+
+	private static final long serialVersionUID = 1L;
+
+	public OoasCompilerRuntimeException() {
+		super();
+	}
+
+	public OoasCompilerRuntimeException(String s) {
+		super(s);
+	}
+
+	public OoasCompilerRuntimeException(Throwable t) {
+		super(t);
+	}
+
+	public OoasCompilerRuntimeException(String s, Object... objects) {
+		super(String.format(s,objects));
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaCompleteAstTraversalVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaCompleteAstTraversalVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaCompleteAstTraversalVisitor.java	(revision 2)
@@ -0,0 +1,601 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import java.util.HashSet;
+
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.ExistsQuantifier;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.ForallQuantifier;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.ListConstructor;
+import org.momut.ooas.ast.expressions.MapConstructor;
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+import org.momut.ooas.ast.expressions.QValConstructor;
+import org.momut.ooas.ast.expressions.SetConstructor;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.TypeExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.UnresolvedIdentifierExpression;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.expressions.MapConstructor.MapItem;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.ConstantIdentifier;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.identifiers.LocalVariableIdentifier;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.Module;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.NondetIdentifierList;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.identifiers.PrioIdentifierList;
+import org.momut.ooas.ast.identifiers.SelfTypeIdentifier;
+import org.momut.ooas.ast.identifiers.SeqIdentifierList;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.identifiers.UnspecIdentifierList;
+import org.momut.ooas.ast.statements.AbortStatement;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.BreakStatement;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.KillStatement;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.QualitativeConstraintStatement;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.SkipStatement;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.types.AnyType;
+import org.momut.ooas.ast.types.BoolType;
+import org.momut.ooas.ast.types.CharType;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.NullType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.parser.ParserState;
+
+public abstract class OoaCompleteAstTraversalVisitor implements IAstVisitor
+{
+	protected HashSet<Object> m_visited = new HashSet<Object>();
+	protected ParserState m_ParserState;
+	protected boolean m_DuplicateVisit;
+
+	protected void VisitSub(IAst subElement, IAst parent)
+	{
+		if (subElement == null)
+			return;
+		if (m_visited.contains(subElement))
+			return;
+		if (!(subElement instanceof OpaqueType) && !m_DuplicateVisit)
+			m_visited.add(subElement);
+		VisitAstElement(subElement, parent);
+	}
+
+	/// <summary>
+	///  Is called once per Ast element. Makes sense to override it in a
+	///  subclass..
+	/// </summary>
+	/// <param name="element">to be visited</param>
+	/// <param name="parent">parent of the element in the ast</param>
+	protected /*virtual*/ void VisitAstElement(IAst element, IAst parent)
+	{
+		element.Accept(this);
+	}
+
+	public OoaCompleteAstTraversalVisitor(ParserState aState)
+	{
+		m_ParserState = aState;
+	}
+
+	public OoaCompleteAstTraversalVisitor(ParserState aState, boolean completeTraversal)
+	{
+		this(aState);
+		m_DuplicateVisit = completeTraversal;
+	}
+
+	@Override
+	public String returnVisitorName()
+	{
+		return this.getClass().getSimpleName();
+	}
+
+	@Override
+	public void done() {
+	}
+
+	@Override
+	public /*override*/ String toString()
+	{
+		return returnVisitorName();
+	}
+
+	@Override
+	public /*virtual*/ void visit(EnumIdentifier enumIdentifier)
+	{
+		VisitSub(enumIdentifier.type(), enumIdentifier);
+	}
+
+	@Override
+	public /*virtual*/ void visit(ConstantIdentifier constantIdentifier)
+	{
+		if (constantIdentifier.type() != null)
+			VisitSub(constantIdentifier.type(), constantIdentifier);
+		VisitSub(constantIdentifier.Value(), constantIdentifier);
+	}
+
+
+	@Override
+	public /*virtual*/ void visit(LandmarkIdentifier landmarkIdentifier)
+	{
+		VisitSub(landmarkIdentifier.type(), landmarkIdentifier);
+	}
+
+	@Override
+	public /*virtual*/ void visit(AttributeIdentifier attributeIdentifier)
+	{
+		VisitSub(attributeIdentifier.type(), attributeIdentifier);
+		VisitSub(attributeIdentifier.initializer(), attributeIdentifier);
+	}
+
+	@Override
+	public /*virtual*/ void visit(ExpressionVariableIdentifier expressionVariableIdentifier)
+	{
+		VisitSub(expressionVariableIdentifier.type(), expressionVariableIdentifier);
+	}
+
+	@Override
+	public /*virtual*/ void visit(ParameterIdentifier parameterIdentifier)
+	{
+		VisitSub(parameterIdentifier.type(), parameterIdentifier);
+	}
+
+	@Override
+	public /*virtual*/ void visit(LocalVariableIdentifier localVariableIdentifier)
+	{
+		VisitSub(localVariableIdentifier.type(), localVariableIdentifier);
+	}
+
+	@Override
+	public /*virtual*/ void visit(TypeIdentifier typeIdentifier)
+	{
+		VisitSub(typeIdentifier.type(), typeIdentifier);
+	}
+
+	@Override
+	public /*virtual*/ void visit(SelfTypeIdentifier aself)
+	{
+		visit((TypeIdentifier)aself);
+	}
+
+	@Override
+	public /*virtual*/ void visit(MethodIdentifier methodIdentifier)
+	{
+		VisitSub(methodIdentifier.type(), methodIdentifier);
+		for (final Identifier sym: methodIdentifier.symbolTable().symbolList())
+			VisitSub(sym, methodIdentifier);
+		for (final ParameterIdentifier par: methodIdentifier.parameter())
+			VisitSub(par, methodIdentifier);
+		VisitSub(methodIdentifier.body(), methodIdentifier);
+	}
+
+	@Override
+	public /*virtual*/ void visit(NamedActionIdentifier namedActionIdentifier)
+	{
+		VisitSub(namedActionIdentifier.type(), namedActionIdentifier);
+		for (final Identifier sym : namedActionIdentifier.symbolTable().symbolList())
+			VisitSub(sym, namedActionIdentifier);
+		for (final ParameterIdentifier par: namedActionIdentifier.parameter())
+			VisitSub(par, namedActionIdentifier);
+		VisitSub(namedActionIdentifier.body(), namedActionIdentifier);
+	}
+
+	@Override
+	public /*virtual*/ void visit(MainModule mainModule)
+	{
+		for (final Identifier sym: mainModule.symbolTable().symbolList())
+			VisitSub(sym, mainModule);
+		final boolean haveInstance = mainModule.instance() != null;
+		if (haveInstance)
+			VisitSub(mainModule.instance(), mainModule);
+		else
+			VisitSub(mainModule.systemDescription(), mainModule);
+	}
+
+	@Override
+	public /*virtual*/ void visit(Module module)
+	{
+		for (final Identifier sym: module.symbolTable().symbolList())
+			VisitSub(sym, module);
+	}
+
+	@Override
+	public /*virtual*/ void visit(NondetIdentifierList nondetIdentifierList)
+	{
+		for (final Identifier id: nondetIdentifierList.identifiers())
+			VisitSub(id, nondetIdentifierList);
+	}
+
+	@Override
+	public /*virtual*/ void visit(SeqIdentifierList seqIdentifierList)
+	{
+		for (final Identifier id: seqIdentifierList.identifiers())
+			VisitSub(id, seqIdentifierList);
+	}
+
+	@Override
+	public /*virtual*/ void visit(PrioIdentifierList prioIdentifierList)
+	{
+		for (final Identifier id: prioIdentifierList.identifiers())
+			VisitSub(id, prioIdentifierList);
+	}
+
+	@Override
+	public /*virtual*/ void visit(UnspecIdentifierList unspecIdentifierList)
+	{
+		for (final Identifier id: unspecIdentifierList.identifiers())
+			VisitSub(id, unspecIdentifierList);
+	}
+
+	@Override
+	public /*virtual*/ void visit(NondetBlock nondetBlock)
+	{
+		for (final Identifier id: nondetBlock.symbols().symbolList())
+			VisitSub(id, nondetBlock);
+
+		for (final Statement stmnt: nondetBlock.statements())
+			VisitSub(stmnt, nondetBlock);
+	}
+
+	@Override
+	public /*virtual*/ void visit(SeqBlock seqBlock)
+	{
+		for (final Identifier id: seqBlock.symbols().symbolList())
+			VisitSub(id, seqBlock);
+
+		if (seqBlock.filter() != null)
+			VisitSub(seqBlock.filter(), seqBlock);
+
+		for (final Statement stmnt: seqBlock.statements())
+			VisitSub(stmnt, seqBlock);
+	}
+
+	@Override
+	public /*virtual*/ void visit(PrioBlock prioBlock)
+	{
+		for (final Identifier id: prioBlock.symbols().symbolList())
+			VisitSub(id, prioBlock);
+
+		for (final Statement stmnt: prioBlock.statements())
+			VisitSub(stmnt, prioBlock);
+	}
+
+	@Override
+	public /*virtual*/ void visit(GuardedCommand guardedCommand)
+	{
+		VisitSub(guardedCommand.guard(), guardedCommand);
+		VisitSub(guardedCommand.body(), guardedCommand);
+	}
+
+	@Override
+	public /*virtual*/ void visit(Assignment assignment)
+	{
+		for (final Expression vexp: assignment.places())
+			VisitSub(vexp, assignment);
+		for (final Expression expr: assignment.values())
+			VisitSub(expr, assignment);
+
+		VisitSub(assignment.nondetExpression(), assignment);
+	}
+
+	@Override
+	public /*virtual*/ void visit(Call call)
+	{
+		VisitSub(call.callExpression(), call);
+	}
+
+	@Override
+	public /*virtual*/ void visit(SkipStatement skipStatement)
+	{ }
+
+	@Override
+	public void visit(BreakStatement breakStatement)
+	{ }
+
+	@Override
+	public /*virtual*/ void visit(AbortStatement abortStatement)
+	{ }
+
+	@Override
+	public /*virtual*/ void visit(KillStatement killStatement)
+	{
+		VisitSub(killStatement.someOne, killStatement);
+	}
+
+	@Override
+	public /*virtual*/ <T>void visit(ValueExpression<T> valueExpression)
+	{ }
+
+	@Override
+	public /*virtual*/ void visit(UnresolvedIdentifierExpression unresolvedIdentifierExpression)
+	{
+		VisitSub(unresolvedIdentifierExpression.type(), unresolvedIdentifierExpression);
+	}
+
+	@Override
+	public /*virtual*/ void visit(IdentifierExpression identifierExpression)
+	{
+		VisitSub(identifierExpression.type(), identifierExpression);
+		VisitSub(identifierExpression.identifier(), identifierExpression);
+	}
+
+	@Override
+	public /*virtual*/ void visit(TypeExpression typeExpression)
+	{
+		VisitSub(typeExpression.type(), typeExpression);
+	}
+
+	@Override
+	public /*virtual*/ void visit(ListConstructor listConstructor)
+	{
+		for (final Identifier lvar: listConstructor.comprehensionVariables().symbolList())
+			VisitSub(lvar, listConstructor);
+
+		for (final Expression elems: listConstructor.elements())
+			VisitSub(elems, listConstructor);
+
+		if (listConstructor.comprehension() != null)
+			VisitSub(listConstructor.comprehension(), listConstructor);
+	}
+
+	@Override
+	public /*virtual*/ void visit(SetConstructor setConstructor)
+	{
+		for (final Identifier svar: setConstructor.comprehensionVariables().symbolList())
+			VisitSub(svar, setConstructor);
+
+		for (final Expression elems: setConstructor.items())
+			VisitSub(elems, setConstructor);
+
+		VisitSub(setConstructor.comprehension(), setConstructor);
+	}
+
+	@Override
+	public /*virtual*/ void visit(MapConstructor mapConstructor)
+	{
+		/*foreach (var lvar in mapConstructor.localVariables.symbolList)
+			VisitSub(lvar, mapConstructor);*/
+
+		for (final MapItem elem: mapConstructor.items())
+		{
+			VisitSub(elem.key, mapConstructor);
+			VisitSub(elem.value, mapConstructor);
+		}
+	}
+
+	@Override
+	public /*virtual*/ void visit(TupleConstructor tupleConstructor)
+	{
+		/*foreach (var lvar in tupleConstructor.localVariables.symbolList)
+			VisitSub(lvar, tupleConstructor);*/
+
+		for (final Expression elem: tupleConstructor.values())
+			VisitSub(elem, tupleConstructor);
+	}
+
+	@Override
+	public /*virtual*/ void visit(AccessExpression accessExpression)
+	{
+		VisitSub(accessExpression.left(), accessExpression);
+		VisitSub(accessExpression.right(), accessExpression);
+	}
+
+	@Override
+	public /*virtual*/ void visit(BinaryOperator binaryOperator)
+	{
+		VisitSub(binaryOperator.left(), binaryOperator);
+		VisitSub(binaryOperator.right(), binaryOperator);
+	}
+
+	@Override
+	public /*virtual*/ void visit(TernaryOperator ternaryOperator)
+	{
+		VisitSub(ternaryOperator.left(), ternaryOperator);
+		VisitSub(ternaryOperator.mid(), ternaryOperator);
+		VisitSub(ternaryOperator.right(), ternaryOperator);
+	}
+
+	@Override
+	public /*virtual*/ void visit(TupleMapAccessExpression tupleMapAccessExpression)
+	{
+		VisitSub(tupleMapAccessExpression.argument(), tupleMapAccessExpression);
+		VisitSub(tupleMapAccessExpression.child(), tupleMapAccessExpression);
+	}
+
+	@Override
+	public /*virtual*/ void visit(CallExpression callExpression)
+	{
+		if (callExpression.arguments() != null)
+			for (final Expression arg: callExpression.arguments())
+				VisitSub(arg, callExpression);
+		VisitSub(callExpression.child(), callExpression);
+	}
+
+	@Override
+	public /*virtual*/ void visit(ForallQuantifier quantifier)
+	{
+		for (final Identifier lvar: quantifier.symbols().symbolList())
+			VisitSub(lvar, quantifier);
+
+		VisitSub(quantifier.child(), quantifier);
+	}
+
+	@Override
+	public /*virtual*/ void visit(ExistsQuantifier quantifier)
+	{
+		for (final Identifier lvar: quantifier.symbols().symbolList())
+			VisitSub(lvar, quantifier);
+
+		VisitSub(quantifier.child(), quantifier);
+	}
+
+	@Override
+	public /*virtual*/ void visit(UnaryOperator unaryOperator)
+	{
+		VisitSub(unaryOperator.child(), unaryOperator);
+		if (unaryOperator.kind() == ExpressionKind.Cast)
+			VisitSub(unaryOperator.type(), unaryOperator);
+	}
+
+
+
+	@Override
+	public /*virtual*/ void visit(CharType charType)
+	{
+	}
+
+	@Override
+	public /*virtual*/ void visit(IntType intType)
+	{
+	}
+
+	@Override
+	public /*virtual*/ void visit(BoolType boolType)
+	{
+	}
+
+	@Override
+	public /*virtual*/ void visit(FloatType floatType)
+	{
+	}
+
+	@Override
+	public /*virtual*/ void visit(EnumType enumType)
+	{
+		for (final Identifier sym: enumType.listOfEnumSymbols())
+			VisitSub(sym, enumType);
+	}
+
+	@Override
+	public /*virtual*/ void visit(ListType listType)
+	{
+		VisitSub(listType.innerType(), listType);
+	}
+
+	@Override
+	public /*virtual*/ void visit(MapType mapType)
+	{
+		VisitSub(mapType.fromType(), mapType);
+		VisitSub(mapType.toType(), mapType);
+	}
+
+	@Override
+	public /*virtual*/ void visit(QrType qrType)
+	{
+		for (final Identifier m: qrType.landmarks())
+			VisitSub(m, qrType);
+	}
+
+	@Override
+	public /*virtual*/ void visit(TupleType tupleType)
+	{
+		for (final UlyssesType t: tupleType.innerTypes())
+			VisitSub(t, tupleType);
+	}
+
+	@Override
+	public /*virtual*/ void visit(FunctionType functionType)
+	{
+		for (final UlyssesType a: functionType.parameter())
+			VisitSub(a, functionType);
+		VisitSub(functionType.returnType(), functionType);
+	}
+
+	@Override
+	public /*virtual*/ void visit(OoActionSystemType ooActionSystemType)
+	{
+		for (final Identifier s: ooActionSystemType.symbols().symbolList())
+			VisitSub(s, ooActionSystemType);
+
+		VisitSub(ooActionSystemType.doOdBlock(), ooActionSystemType);
+	}
+
+	public /*virtual*/ @Override
+	void visit(OpaqueType opaqueType)
+	{
+		VisitSub(opaqueType.resolvedType(), opaqueType);
+	}
+
+	@Override
+	public /*virtual*/ void visit(NullType nullType)
+	{ }
+
+	@Override
+	public /*virtual*/ void visit(AnyType anyType)
+	{ }
+
+	@Override
+	public /*virtual*/ void visit(ObjectConstructor objectConstructor)
+	{
+		VisitSub(objectConstructor.type(), objectConstructor);
+	}
+
+	@Override
+	public /*virtual*/ void visit(QValConstructor qValConstructor)
+	{
+	}
+
+	@Override
+	public /*virtual*/ void visit(QualitativeConstraintStatement qalitativeConstraintStatement)
+	{
+		VisitSub(qalitativeConstraintStatement.variable0(), qalitativeConstraintStatement);
+		VisitSub(qalitativeConstraintStatement.variable1(), qalitativeConstraintStatement);
+		if (qalitativeConstraintStatement.variable2() != null)
+			VisitSub(qalitativeConstraintStatement.variable2(), qalitativeConstraintStatement);
+	}
+}
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ExpressionVariableIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ExpressionVariableIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ExpressionVariableIdentifier.java	(revision 2)
@@ -0,0 +1,83 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.UlyssesType;
+
+public final class ExpressionVariableIdentifier extends LocalVariableIdentifier
+{
+	private boolean m_isInitialized;
+
+	public boolean initialized() { return m_isInitialized; }
+
+	public ExpressionVariableIdentifier(Token aToken,
+			UlyssesType aType,
+			IScope aDefiningScope)
+	{
+		super (aToken, aType, aDefiningScope);
+		m_identifierKind = IdentifierKind.ExpressionVariableIdentifier;
+	}
+
+	public ExpressionVariableIdentifier(String name, int line, int col)
+	{
+		super (name, null, IdentifierKind.ExpressionVariableIdentifier, null);
+		m_line = line;
+		m_column = col;
+		m_isInitialized = false;
+	}
+
+	public ExpressionVariableIdentifier(ExpressionVariableIdentifier toCopy)
+	{
+		super (toCopy);
+		m_line = toCopy.m_line;
+		m_column = toCopy.m_column;
+		m_isInitialized = toCopy.m_isInitialized;
+	}
+
+	@Override
+	public /*override*/ Identifier Clone()
+	{
+		return new ExpressionVariableIdentifier(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public final void SetInitialized(boolean newValue)
+	{
+		m_isInitialized = newValue;
+	}
+
+}
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/IdentifierList.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/IdentifierList.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/IdentifierList.java	(revision 2)
@@ -0,0 +1,67 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import java.util.LinkedList;
+
+///////////////////////////////////////////////
+///  Identifier List
+///
+public abstract class IdentifierList extends Identifier
+{
+	public enum IdentifierListType {
+		normal(0),
+		nondeterministic(1),
+		seqential(2),
+		prioritized(3);
+
+		public final int integerValue; // do not change, this is needed by the backends! i.e. public API
+
+		private IdentifierListType(int val) {
+			integerValue = val;
+		}
+	}
+
+	private final LinkedList<Identifier> m_list;
+	private final IdentifierListType m_type;
+
+	public LinkedList<Identifier> identifiers() { return m_list; }
+	public IdentifierListType listType() { return m_type; }
+
+	public IdentifierList(IdentifierListType aConcatType)
+	{
+		super ("list", null, IdentifierKind.List, null);
+		m_list = new LinkedList<Identifier>();
+		m_type = aConcatType;
+	}
+
+	public void AddElement(Identifier toAdd)
+	{
+		m_list.addLast(toAdd);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/SymbolAlreadyDefinedException.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/SymbolAlreadyDefinedException.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/SymbolAlreadyDefinedException.java	(revision 2)
@@ -0,0 +1,35 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.utils.exceptions;
+
+
+public class SymbolAlreadyDefinedException extends OoasCompilerRuntimeException {
+	private static final long serialVersionUID = 1L;
+	public SymbolAlreadyDefinedException(String s) {super(s);}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaIdentifierCompressVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaIdentifierCompressVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaIdentifierCompressVisitor.java	(revision 2)
@@ -0,0 +1,186 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import java.util.ArrayList;
+import java.util.EnumMap;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.momut.ooas.CompilerConfiguration.LabelCompression;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.OoActionSystemInstance;
+import org.momut.ooas.ast.types.FunctionType.FunctionTypeEnum;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+
+public class OoaIdentifierCompressVisitor extends OoaCompleteAstTraversalVisitor {
+
+	public static final String s_methodPrefix    = "m_";
+	public static final String s_actionPrefix    = "a_";
+	public static final String s_attributePrefix = "at_";
+	public static final String s_objectPrefix    = "o_";
+	public static final String s_typePrefix      = "t_";
+
+	private final EnumMap<IdentifierKind, TreeMap<String, String> > m_identifierMappings = new EnumMap<>(IdentifierKind.class);
+	private final TreeMap<String, String> m_objectMappings = new TreeMap<>();
+	private final LabelCompression m_compression;
+
+	private void putMapping(String label, Identifier identifier) {
+		TreeMap<String, String> map = m_identifierMappings.get(identifier.kind());
+		if (map == null) {
+			map = new TreeMap<>();
+			m_identifierMappings.put(identifier.kind(), map);
+		}
+		map.put(label, identifier.tokenText());
+	}
+
+	public String mappingFor(Identifier identifier)	{
+		final IdentifierKind kind = identifier.kind();
+		final TreeMap<String, String> map = m_identifierMappings.get(kind);
+		return map.get(identifier.tokenText());
+	}
+
+	@Override
+	public /*override*/ void visit(AttributeIdentifier attributeIdentifier)	{
+		if (m_compression != LabelCompression.All)
+			return;
+		final String attributeName = labelFor(attributeIdentifier);
+		attributeIdentifier.SetTokenText(attributeName);
+	}
+
+	@Override
+	public /*override*/ void visit(MethodIdentifier methodIdentifier)	{
+		final String renamedName = labelFor(methodIdentifier);
+		methodIdentifier.SetTokenText(renamedName);
+	}
+
+	@Override
+	public /*override*/ void visit(NamedActionIdentifier namedActionIdentifier)	{
+		final FunctionType functionType = (FunctionType) namedActionIdentifier.type();
+		if (functionType.functionType() == FunctionTypeEnum.Internal) {
+				final String renamedName = labelFor(namedActionIdentifier);
+				namedActionIdentifier.SetTokenText(renamedName);
+		}
+	}
+
+	public String labelFor(Identifier identifier) {
+		String label = identifier.tokenText();
+
+		switch(identifier.kind()) {
+			case MethodIdentifier:
+				label = s_methodPrefix + convert(methodCount++);
+				break;
+			case NamedActionIdentifier:
+				label = s_actionPrefix + convert(actionCount++);
+				break;
+			case AttributeIdentifier:
+				label = s_attributePrefix + convert(attributeCount++);
+				break;
+			default:
+				throw new NotImplementedException();
+		}
+		putMapping(label, identifier);
+		return label;
+	}
+
+	public String labelFor(OoActionSystemInstance instance) {
+		final String label = s_objectPrefix + convert(objectCount++);
+		m_objectMappings.put(label, instance.Name);
+		return label;
+	}
+
+	public String originalName(String key) {
+		if(m_objectMappings.get(key) != null) {
+			return m_objectMappings.get(key);
+		}
+		return key;
+	}
+
+	public List<String> mappingInformation() {
+		final List<String> lines = new ArrayList<>();
+		final Set<IdentifierKind> kinds = m_identifierMappings.keySet();
+
+		for (final IdentifierKind kind: kinds) {
+			final TreeMap<String, String> map = m_identifierMappings.get(kind);
+			final Set<String> keys = map.keySet();
+			lines.add(String.format("[ Mappings for '%s' ]", kind.name()));
+			for(final String key: keys) {
+				lines.add(String.format("'%s' => '%s'", key, map.get(key)));
+			}
+			lines.add("");
+		}
+
+		if (m_objectMappings.isEmpty())
+			return lines;
+
+		lines.add(String.format("[ Object mappings ]"));
+		final Set<String> keys = m_objectMappings.keySet();
+		for (final String key: keys) {
+			lines.add(String.format("'%s' => '%s'", key, originalName(key)));
+		}
+		lines.add("");
+		return lines;
+	}
+
+	public LabelCompression compression() {
+		return m_compression;
+	}
+
+	static final String CHARS = "abcdefghijklmnopqrstuvwxyz"; /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
+	static final int CHARS_LENGTH = CHARS.length();
+
+	int actionCount = 0;
+	int methodCount = 0;
+	int attributeCount = 0;
+	int objectCount = 0;
+
+	private String convert(int id) {
+		final StringBuilder sb = new StringBuilder();
+		do {
+			sb.append(CHARS.charAt(id % CHARS_LENGTH));
+			id = id / CHARS_LENGTH;
+		} while(id != 0);
+		return sb.toString();
+	}
+
+	public OoaIdentifierCompressVisitor(ParserState aState, LabelCompression compression)
+	{
+		super (aState);
+		if (aState == null || compression == null)
+			throw new ArgumentException();
+		m_compression = compression;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/MethodIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/MethodIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/MethodIdentifier.java	(revision 2)
@@ -0,0 +1,59 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.UlyssesType;
+
+public final class MethodIdentifier extends FunctionIdentifier
+{
+	public MethodIdentifier(Token aToken,
+			UlyssesType aType,
+			IScope aDefiningScope)
+	{
+		super (aToken, aType, IdentifierKind.MethodIdentifier, aDefiningScope);
+	}
+
+	public MethodIdentifier(MethodIdentifier toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Identifier Clone()
+	{
+		return new MethodIdentifier(this);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaMethodPureClassifierVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaMethodPureClassifierVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaMethodPureClassifierVisitor.java	(revision 2)
@@ -0,0 +1,116 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import java.util.Stack;
+
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.parser.ParserMessage;
+import org.momut.ooas.parser.ParserState;
+
+/// <summary>
+/// This visitor scans all methods and decides whether they are pure, i.e. there is no state-update.
+/// </summary>
+public final class OoaMethodPureClassifierVisitor extends OoaCompleteAstTraversalVisitor
+{
+
+	Stack<MethodIdentifier> currentMethod = new Stack<MethodIdentifier>();
+
+	@Override
+	public void visit(MethodIdentifier methodIdentifier)
+	{
+		currentMethod.push(methodIdentifier);
+		((FunctionType)currentMethod.peek().type()).SetIsPureFunction(true); // assume is true..
+
+		super.visit(currentMethod.peek());
+
+		if (((FunctionType)currentMethod.peek().type()).isPureFunction())
+		{
+			m_ParserState.AddMessage(
+					new ParserMessage(m_ParserState.filename, methodIdentifier.line(),
+							methodIdentifier.column(), String.format("Found pure method: %s",
+									methodIdentifier.tokenText())));
+		} else
+			m_ParserState.AddMessage(
+					new ParserMessage(m_ParserState.filename, methodIdentifier.line(),
+							methodIdentifier.column(), String.format("Found extended method: %s",
+									methodIdentifier.tokenText())));
+
+		currentMethod.pop();
+	}
+
+	@Override
+	public void visit(OoActionSystemType systemType)
+	{
+		boolean functionPure = false; //introduce variable with save value
+		if (currentMethod.size() > 0 && currentMethod.peek() != null) //if we are determining the pureness...
+		{
+			functionPure = ((FunctionType)currentMethod.peek().type()).isPureFunction(); //...save the current value
+		}
+		super.visit(systemType); // go down in recursion
+		if ( currentMethod.size() > 0 && currentMethod.peek() != null) //but restore old pureness!
+		{
+			((FunctionType)currentMethod.peek().type()).SetIsPureFunction(functionPure);
+		}
+	}
+
+
+	@Override
+	public void visit(Assignment assignment)
+	{
+
+		boolean assignmentPure = true;
+		if (currentMethod.size() > 0 && currentMethod.peek() != null)
+		{
+			for (Expression x: assignment.places())
+			{
+				if (x.kind() != ExpressionKind.Identifier)
+					assignmentPure = false;
+				else if (((IdentifierExpression)x).identifier().kind() == IdentifierKind.AttributeIdentifier)
+					assignmentPure = false;
+			}
+			boolean functionPure = assignmentPure && ((FunctionType)currentMethod.peek().type()).isPureFunction();
+			((FunctionType)currentMethod.peek().type()).SetIsPureFunction(functionPure);
+		}
+		super.visit(assignment);
+	}
+
+
+
+	public OoaMethodPureClassifierVisitor(ParserState aState)
+	{
+		super (aState);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaPrintVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaPrintVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaPrintVisitor.java	(revision 2)
@@ -0,0 +1,1162 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import java.util.ArrayList;
+
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.ListConstructor;
+import org.momut.ooas.ast.expressions.MapConstructor;
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+import org.momut.ooas.ast.expressions.QValConstructor;
+import org.momut.ooas.ast.expressions.SetConstructor;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.TypeExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.UnresolvedIdentifierExpression;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.expressions.MapConstructor.MapItem;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.NondetIdentifierList;
+import org.momut.ooas.ast.identifiers.PrioIdentifierList;
+import org.momut.ooas.ast.identifiers.SeqIdentifierList;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.statements.AbortStatement;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.KillStatement;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.SkipStatement;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.types.BoolType;
+import org.momut.ooas.ast.types.CharType;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.NullType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+
+public class OoaPrintVisitor extends OoaCompleteAstTraversalVisitor
+{
+	private interface Action {
+		void doIt();
+	}
+
+	protected boolean writeTypes;
+	protected Identifier currentTypeDef;
+	protected final OoasCodeEmitter output;
+
+
+
+	private void PrintSubElementOrNull(IAst anElem)
+	{
+		if (anElem == null)
+			output.Append("<null>");
+		else
+			anElem.Accept(this);
+	}
+
+	private void PrintEnumeration(Iterable<?> iarg)
+	{
+		int i = 0;
+		@SuppressWarnings("unchecked")
+		final
+		Iterable<IAst> arg = (Iterable<IAst>) iarg;
+		for (final IAst sym: arg)
+		{
+			if (i != 0)
+				output.Append(", ");
+			i++;
+			PrintSubElementOrNull(sym);
+		}
+	}
+
+	/*print the type identifier, or the type definition by calling the anAction delegate.*/
+	private void PrintType(UlyssesType atype, Action anAction)
+	{
+		if (   (atype.identifier() != null)
+				&& (!atype.isAnonymousType())
+				&& (currentTypeDef != atype.identifier() || !writeTypes)) // ref equ.
+		{
+			final boolean write = writeTypes;
+			writeTypes = false;
+			atype.identifier().Accept(this);
+			writeTypes = write;
+		}
+		else
+			anAction.doIt();
+	}
+
+
+
+	@Override
+	public void visit(MainModule mainModule)
+	{
+		int i = 0;
+		final boolean haveInstance = mainModule.instance() != null;
+		/*print all types*/
+		writeTypes = true;
+		output.IncIndent();
+		output.AppendLine("types");
+		for (final Identifier type: mainModule.symbolTable().symbolList())
+		{
+			if (type.kind() != IdentifierKind.TypeIdentifier)
+				continue;
+
+			if (i != 0)
+				output.AppendLine(";");
+			i++;
+			if (!haveInstance || ((TypeIdentifier)type).type().kind() != TypeKind.OoActionSystemType)
+				type.Accept(this);
+		}
+
+		if (haveInstance)
+			mainModule.instance().Accept(this);
+
+		output.DecIndent();
+		output.AppendLine("");
+		output.IncIndent();
+		output.IncIndent();
+		output.AppendLine("system");
+		writeTypes = false;
+		if (!haveInstance)
+			mainModule.systemDescription().Accept(this);
+		else
+			output.Append(mainModule.instance().identifier().tokenText());
+	}
+
+	@Override
+	public void visit(TypeIdentifier typeIdentifier)
+	{
+		output.Append(typeIdentifier.tokenText());
+		if (writeTypes)
+		{
+			currentTypeDef = typeIdentifier;
+			output.Append(" = ");
+			PrintSubElementOrNull(typeIdentifier.type());
+		}
+	}
+
+	/*write out type definitions*/
+	@Override
+	public void visit(BoolType boolType)
+	{
+		output.Append("bool");
+	}
+
+	@Override
+	public void visit(CharType charType)
+	{
+		output.Append("char");
+	}
+
+	@Override
+	public void visit(final IntType intType)
+	{
+		PrintType(intType, new Action(){
+			@Override
+			public void doIt() {
+				output.Append("int [");
+				output.Append(Integer.toString(intType.rangeLow()));
+				output.Append(" .. ");
+				output.Append(Integer.toString(intType.rangeHigh()));
+				output.Append("]");
+			}});
+	}
+
+	@Override
+	public void visit(final FloatType floatType)
+	{
+		PrintType(floatType,  new Action(){
+			@Override
+			public void doIt() {
+				output.Append("float [");
+				output.Append(Double.toString(floatType.low()));
+				output.Append(" .. ");
+				output.Append(Double.toString(floatType.high()));
+				output.Append("] /*");
+				output.Append(Double.toString(floatType.precision()));
+				output.Append("*/");
+		}});
+	}
+
+
+	@Override
+	public void visit(EnumIdentifier enumIdentifier)
+	{
+		output.Append(enumIdentifier.tokenText());
+		if (enumIdentifier.HaveValue())
+			output.Append(String.format(" = %s", enumIdentifier.Value()));
+	}
+
+	@Override
+	public void visit(final EnumType enumType)
+	{
+		PrintType(enumType, new Action(){
+			@Override
+			public void doIt() {
+				output.Append("{");
+				PrintEnumeration(enumType.listOfEnumSymbols());
+				output.Append("}");
+			}});
+	}
+
+
+	@Override
+	public void visit(final ListType listType)
+	{
+		PrintType(listType, new Action(){
+			@Override
+			public void doIt() {
+				output.Append("list [");
+				output.Append(listType.maxNumberOfElements());
+				output.Append("] of ");
+				PrintSubElementOrNull(listType.innerType());
+			}});
+	}
+
+	@Override
+	public void visit(final MapType mapType)
+	{
+		PrintType(mapType, new Action(){
+			@Override
+			public void doIt() {
+				output.Append("map [");
+				output.Append(mapType.maxNumberOfElements());
+				output.Append("] ");
+				PrintSubElementOrNull(mapType.fromType());
+				output.Append(" to ");
+				PrintSubElementOrNull(mapType.toType());
+			}});
+	}
+
+	@Override
+	public void visit(final TupleType tupleType)
+	{
+		PrintType(tupleType, new Action(){
+			@Override
+			public void doIt() {
+				output.Append("(");
+				PrintEnumeration(tupleType.innerTypes());
+				output.Append(")");
+			}});
+	}
+
+	@Override
+	public void visit(OpaqueType opaqueType)
+	{
+		PrintSubElementOrNull(opaqueType.resolvedType());
+
+		output.Append(" /*opagque*/");
+	}
+
+	@Override
+	public void visit(final QrType qrType)
+	{
+		PrintType(qrType, new Action(){
+			@Override
+			public void doIt() {
+				output.Append("qspace of [");
+				PrintEnumeration(qrType.landmarks());
+				output.Append("]");
+			}});
+	}
+
+	@Override
+	public void visit(LandmarkIdentifier landmarkIdentifier)
+	{
+		output.Append(landmarkIdentifier.tokenText());
+	}
+
+	@Override
+	public void visit(final OoActionSystemType ooActionSystemType)
+	{
+		PrintType(ooActionSystemType, new Action(){
+			@Override
+			public void doIt() {
+				if (ooActionSystemType.autoConstruction())
+					output.Append("autocons ");
+
+				output.Append("system ");
+				if (ooActionSystemType.baseType() != null)
+					output.Append(String.format("(%s)", ooActionSystemType.baseType().identifier().tokenText()));
+				output.AppendLine("");
+
+				output.IncIndent();
+				output.AppendLine("|[");
+
+				// get a list of interesting symbols
+				final ArrayList<AttributeIdentifier> attrs = new ArrayList<AttributeIdentifier>();
+				final ArrayList<MethodIdentifier> methods = new ArrayList<MethodIdentifier>();
+				final ArrayList<NamedActionIdentifier> namedActions = new ArrayList<NamedActionIdentifier>();
+
+				for(final Identifier sym: ooActionSystemType.symbols().symbolList())
+				{
+					if (sym.kind() == IdentifierKind.AttributeIdentifier)
+						attrs.add((AttributeIdentifier)sym);
+					else if (sym.kind() == IdentifierKind.MethodIdentifier)
+						methods.add((MethodIdentifier)sym);
+					else if (sym.kind() == IdentifierKind.NamedActionIdentifier)
+						namedActions.add((NamedActionIdentifier)sym);
+				}
+
+				int i = 0;
+				if (attrs.size() > 0)
+				{
+					// variables
+					output.IncIndent();
+					output.AppendLine("var");
+					for (final AttributeIdentifier attr : attrs)
+					{
+						if (i != 0)
+							output.AppendLine(";");
+						i++;
+						PrintSubElementOrNull(attr);
+					}
+					output.DecIndent();
+					output.AppendLine("");
+				}
+				final boolean writeTypesSave = writeTypes;
+				writeTypes = false;
+
+				i = 0;
+				if (methods.size() > 0)
+				{
+					output.IncIndent();
+					output.AppendLine("methods");
+					for (final MethodIdentifier method : methods)
+					{
+						if (i != 0)
+							output.AppendLine(";");
+						i++;
+						PrintSubElementOrNull(method);
+					}
+					output.DecIndent();
+					output.AppendLine("");
+				}
+
+				i = 0;
+				if (namedActions.size() > 0)
+				{
+					output.IncIndent();
+					output.AppendLine("actions");
+					for (final NamedActionIdentifier action: namedActions)
+					{
+						if (i != 0)
+							output.AppendLine(";");
+						i++;
+						PrintSubElementOrNull(action);
+					}
+					output.DecIndent();
+					output.AppendLine("");
+				}
+
+				if ((ooActionSystemType.doOdBlock() != null) &&
+				    (ooActionSystemType.doOdBlock().statements().size() > 0))
+				{
+					output.IncIndent();
+					output.AppendLine("do");
+					PrintSubElementOrNull(ooActionSystemType.doOdBlock());
+					output.DecIndent();
+					output.AppendLine("");
+					output.AppendLine("od");
+				}
+				output.DecIndent();
+				output.AppendLine("");
+				output.Append("]|");
+				writeTypes = writeTypesSave;
+			}});
+	}
+
+	@Override
+	public void visit(NullType nullType)
+	{
+		output.Append("nil");
+	}
+
+
+	@Override
+	public void visit(AttributeIdentifier attributeIdentifier)
+	{
+		if (attributeIdentifier.isStatic())
+			output.Append("static ");
+		if (attributeIdentifier.isObservable())
+			output.Append("obs ");
+		if (attributeIdentifier.isControllable())
+			output.Append("ctr ");
+
+		output.Append(attributeIdentifier.tokenText());
+		if (writeTypes)
+		{
+			output.Append(": ");
+			PrintSubElementOrNull(attributeIdentifier.type());
+			output.Append(" = ");
+			PrintSubElementOrNull(attributeIdentifier.initializer());
+		}
+	}
+
+
+	@Override
+	public <T>void visit(ValueExpression<T> valueExpression)
+	{
+		if (valueExpression.value() != null)
+			output.Append(valueExpression.value().toString());
+		else
+			output.Append("nil");
+	}
+
+	@Override
+	public void visit(AbortStatement abortStatement)
+	{
+		output.Append("abort");
+	}
+
+	@Override
+	public void visit(Assignment assignment)
+	{
+		PrintEnumeration(assignment.places());
+		output.Append(" := ");
+		PrintEnumeration(assignment.values());
+		if (assignment.nondetExpression() != null)
+		{
+			output.IncIndent();
+			output.AppendLine("");
+			output.Append("with ");
+			assignment.nondetExpression().Accept(this);
+
+			if (assignment.symbols().symbolList().size() > 0)
+			{
+				output.Append(" /* vars: ");
+				for (final Identifier localVar: assignment.symbols().symbolList())
+				{
+					localVar.Accept(this);
+					output.Append(" ");
+				}
+				output.Append("*/");
+			}
+			output.DecIndent();
+			output.AppendLine("");
+		}
+	}
+
+	@Override
+	public void visit(KillStatement killStatement)
+	{
+		output.Append("kill (");
+		PrintSubElementOrNull(killStatement.someOne);
+		output.Append(")");
+	}
+
+	@Override
+	public void visit(AccessExpression accessExpression)
+	{
+		if (accessExpression.right() != null)
+		{
+			output.Append("(");
+			PrintSubElementOrNull(accessExpression.left());
+			output.Append(").");
+			PrintSubElementOrNull(accessExpression.right());
+		}
+		else
+		{
+			output.Append("(");
+			PrintSubElementOrNull(accessExpression.left());
+			output.Append(")");
+		}
+	}
+
+	private void PrintOperator(Expression expression)
+	{
+		switch (expression.kind())
+		{
+		case abs:    // T_ABS:
+			output.Append("abs");
+			break;
+		case card:   // T_CARD:
+			output.Append("card");
+			break;
+		case dom:    // T_DOM:
+			output.Append("dom");
+			break;
+		case range:  // T_RNG:
+			output.Append("range");
+			break;
+		case merge:  // T_MERGE:
+			output.Append("merge");
+			break;
+		case len:    // T_LEN:
+			output.Append("len");
+			break;
+		case elems:  // T_ELEMS:
+			output.Append("elems");
+			break;
+		case head:   // T_HEAD:
+			output.Append("head");
+			break;
+		case tail:   // T_TAIL:
+			output.Append("tail");
+			break;
+		case conc:   // T_CONC:
+			output.Append("conc");
+			break;
+		case inds:   // T_INDS:
+			output.Append("inds");
+			break;
+		case dinter: // T_DINTER:
+			output.Append("dinter");
+			break;
+		case dunion: // T_DUNION:
+			output.Append("dunion");
+			break;
+		case domresby:   // T_DOMRESBY:
+			output.Append("domresby");
+			break;
+		case domresto:   // T_DOMRESTO:
+			output.Append("domresto");
+			break;
+		case rngresby:   // T_RNGRESBY:
+			output.Append("rngresby");
+			break;
+		case rngresto:   // T_RNGRESTO:
+			output.Append("rngresto");
+			break;
+		case div:    // T_DIV:
+			output.Append("div");
+			break;
+		case idiv:   // T_IDIV:
+			output.Append("idiv");
+			break;
+		case mod:    // T_MOD:
+			output.Append("mod");
+			break;
+		case prod:   // T_PROD:
+			output.Append("*");
+			break;
+		case inter:  // T_INTER:
+			output.Append("inter");
+			break;
+		case sum:    // T_SUM:
+			output.Append("+");
+			break;
+		case minus:  // T_MINUS:
+			output.Append("-");
+			break;
+		case union:  // T_UNION:
+			output.Append("union");
+			break;
+		case diff:   // T_DIFF:
+			output.Append("diff");
+			break;
+		case munion: // T_MUNION:
+			output.Append("munion");
+			break;
+		case seqmod_mapoverride: // T_SEQMOD_MAPOVERRIDE:
+			output.Append("seqmod_mapoverride");
+			break;
+		case less:
+			output.Append("<");
+			break;
+		case lessequal:
+			output.Append("<=");
+			break;
+		case greater:
+			output.Append(">");
+			break;
+		case greaterequal:
+			output.Append(">=");
+			break;
+		case equal:
+			output.Append("=");
+			break;
+		case notequal:
+			output.Append("<>");
+			break;
+		case subset:
+			output.Append("subset");
+			break;
+		case elemin:
+			output.Append("in");
+			break;
+		case notelemin:
+			output.Append("not in");
+			break;
+		case and:    // T_AND:
+			output.Append("and");
+			break;
+
+		case or:     // T_OR:
+			output.Append("or");
+			break;
+		case implies:    // T_IMPLIES:
+			output.Append("=>");
+			break;
+		case biimplies:  // T_BIIMPLIES:
+			output.Append("<=>");
+			break;
+
+		case Primed:
+			output.Append("'");
+			break;
+
+
+		case Cast:
+			output.Append("(");
+			if (expression.type() != null)
+				output.Append(expression.type().toString());
+			else
+				output.Append("Cast??");
+			output.Append(")");
+			break;
+
+		default:
+			output.Append(expression.kind().toString()); //Enum.GetName(typeof(ExpressionKind), expression.kind));
+			break;
+		}
+	}
+
+	@Override
+	public void visit(TypeExpression typeExpression)
+	{
+		PrintSubElementOrNull(typeExpression.type());
+	}
+
+	@Override
+	public void visit(BinaryOperator binaryOperator)
+	{
+		output.IncIndent();
+		output.AppendLine("(");
+		PrintSubElementOrNull(binaryOperator.left());
+		output.DecIndent();
+		output.AppendLine("");
+		output.AppendLine(")");
+
+		PrintOperator(binaryOperator); output.AppendLine("");
+
+		output.IncIndent();
+		output.AppendLine("(");
+		PrintSubElementOrNull(binaryOperator.right());
+		output.DecIndent();
+		output.AppendLine("");
+		output.AppendLine(")");
+	}
+
+	@Override
+	public void visit(UnaryOperator unaryOperator)
+	{
+		PrintOperator(unaryOperator);
+		output.Append("(");
+		PrintSubElementOrNull(unaryOperator.child());
+		output.Append(")");
+	}
+
+	@Override
+	public void visit(UnresolvedIdentifierExpression unresolvedIdentifierExpression)
+	{
+		output.Append(unresolvedIdentifierExpression.tokenText());
+	}
+
+	@Override
+	public void visit(CallExpression callExpression)
+	{
+		if (callExpression.child() != null)
+			callExpression.child().Accept(this);
+		if ((callExpression.arguments() != null) && (callExpression.arguments().size() > 0))
+		{
+			output.Append("(");
+			PrintEnumeration(callExpression.arguments());
+			output.Append(")");
+		}
+		else
+		{
+			output.Append("()");
+		}
+	}
+
+	@Override
+	public void visit(TupleMapAccessExpression tupleMapAccessExpression)
+	{
+		if (tupleMapAccessExpression.child() != null)
+			tupleMapAccessExpression.child().Accept(this);
+		output.Append("[");
+		PrintSubElementOrNull(tupleMapAccessExpression.argument());
+		output.Append("]");
+	}
+
+	@Override
+	public void visit(TupleConstructor tupleConstructor)
+	{
+		output.Append(tupleConstructor.tupleType().tokenText());
+		output.Append("(");
+		PrintEnumeration(tupleConstructor.values());
+		output.Append(")");
+	}
+
+	@Override
+	public void visit(ListConstructor listConstructor)
+	{
+		output.Append("[");
+		PrintEnumeration(listConstructor.elements());
+		if (listConstructor.hasComprehension())
+		{
+			output.Append("| var ");
+			int i = 0;
+			for (final Identifier element: listConstructor.comprehensionVariables().symbolList())
+			{
+				if (i != 0)
+					output.Append("; ");
+				i++;
+				PrintSubElementOrNull(element);
+			}
+			output.AppendLine(" &");
+			PrintSubElementOrNull(listConstructor.comprehension());
+		}
+		output.Append("]");
+	}
+
+	@Override
+	public void visit(QValConstructor qValConstructor)
+	{
+		output.Append("qval(");
+		PrintSubElementOrNull(qValConstructor.value()[0]);
+		if (qValConstructor.value().length == 2)
+		{
+			output.Append(" .. ");
+			PrintSubElementOrNull(qValConstructor.value()[1]);
+		}
+		output.Append(",");
+		output.Append(qValConstructor.valueDeriv().toString());
+		output.Append(")");
+	}
+
+
+	private boolean make_parens = false;
+
+	@Override
+	public void visit(NondetBlock nondetBlock)
+	{
+		int i = 0;
+		if (make_parens)
+		{
+			output.IncIndent();
+			output.AppendLine("(");
+		}
+		for (final Statement smt: nondetBlock.statements())
+		{
+			if (i != 0)
+			{
+				output.DecIndent();
+				output.AppendLine("");
+				output.IncIndent();
+				output.AppendLine("[] ");
+			}
+			i++;
+			smt.Accept(this);
+		}
+		if (make_parens)
+		{
+			output.DecIndent();
+			output.AppendLine("");
+			output.AppendLine(")");
+		}
+	}
+
+	@Override
+	public void visit(PrioBlock prioBlock)
+	{
+		int i = 0;
+		if (make_parens)
+		{
+			output.IncIndent();
+			output.AppendLine("(");
+		}
+		for (final Statement smt: prioBlock.statements())
+		{
+			if (i != 0)
+			{
+				output.DecIndent();
+				output.AppendLine("");
+				output.IncIndent();
+				output.AppendLine("// ");
+			}
+			i++;
+			smt.Accept(this);
+		}
+		if (make_parens)
+		{
+			output.DecIndent();
+			output.AppendLine("");
+			output.AppendLine(")");
+		}
+	}
+
+	@Override
+	public void visit(SeqBlock seqBlock)
+	{
+		int i = 0;
+		final boolean old_makeparens = make_parens;
+		output.IncIndent();
+		output.AppendLine("(");
+		if (seqBlock.symbols().symbolList().size() > 0)
+		{
+			output.Append("var ");
+			for (final Identifier id: seqBlock.symbols().symbolList())
+			{
+				output.Append(id.tokenText());
+				output.Append(": ");
+				PrintSubElementOrNull(id);
+			}
+			output.Append(": ");
+		}
+		for (final Statement smt: seqBlock.statements())
+		{
+			if (smt == null)
+				continue;
+			if (i != 0)
+			{
+				output.DecIndent();
+				output.AppendLine("");
+				output.IncIndent();
+				output.AppendLine("; ");
+			}
+			i++;
+			make_parens = true;
+			smt.Accept(this);
+			make_parens = old_makeparens;
+		}
+		output.DecIndent();
+		output.AppendLine("");
+		output.AppendLine(")");
+	}
+
+	@Override
+	public void visit(Call call)
+	{
+		call.callExpression().Accept(this);
+	}
+
+	@Override
+	public void visit(GuardedCommand guardedCommand)
+	{
+		output.Append("requires ");
+		PrintSubElementOrNull(guardedCommand.guard());
+		output.IncIndent();
+		output.AppendLine(" :");
+
+		guardedCommand.body().Accept(this);
+
+		output.DecIndent();
+		output.AppendLine("");
+		output.AppendLine("end");
+	}
+
+	@Override
+	public void visit(IdentifierExpression identifierExpression)
+	{
+		output.Append(identifierExpression.identifier().tokenText());
+	}
+
+	@Override
+	public void visit(NondetIdentifierList nondetIdentifierList)
+	{
+		int i = 0;
+		for (final Identifier smt: nondetIdentifierList.identifiers())
+		{
+			if (i != 0)
+			{
+				output.DecIndent();
+				output.AppendLine("");
+				output.IncIndent();
+				output.AppendLine("[] ");
+			}
+			i++;
+			smt.Accept(this);
+		}
+	}
+
+	@Override
+	public void visit(PrioIdentifierList prioIdentifierList)
+	{
+		int i = 0;
+		for (final Identifier smt: prioIdentifierList.identifiers())
+		{
+			if (i != 0)
+			{
+				output.DecIndent();
+				output.AppendLine("");
+				output.IncIndent();
+				output.AppendLine("//");
+			}
+			i++;
+			smt.Accept(this);
+		}
+	}
+
+
+	@Override
+	public void visit(SeqIdentifierList seqIdentifierList)
+	{
+		int i = 0;
+		output.IncIndent();
+		output.AppendLine("(");
+		for (final Identifier smt: seqIdentifierList.identifiers())
+		{
+			if (i != 0)
+			{
+				output.AppendLine("; ");
+			}
+			i++;
+			smt.Accept(this);
+		}
+		output.DecIndent();
+		output.AppendLine("");
+		output.AppendLine(")");
+	}
+
+	@Override
+	public void visit(SkipStatement skipStatement)
+	{
+		output.Append("skip");
+	}
+
+	@Override
+	public void visit(TernaryOperator ternaryOperator)
+	{
+		if (ternaryOperator.kind() == ExpressionKind.conditional)
+		{
+			output.Append("if");
+			PrintSubElementOrNull(ternaryOperator.left());
+			output.IncIndent();
+			output.AppendLine("then");
+			PrintSubElementOrNull(ternaryOperator.mid());
+			output.DecIndent();
+			output.AppendLine("");
+			output.IncIndent();
+			output.AppendLine("else");
+			PrintSubElementOrNull(ternaryOperator.right());
+			output.DecIndent();
+			output.AppendLine("");
+			output.Append("end");
+		}
+		else if (ternaryOperator.kind() == ExpressionKind.foldLR ||
+				ternaryOperator.kind() == ExpressionKind.foldRL)
+		{
+			PrintSubElementOrNull(ternaryOperator.left());
+			if (ternaryOperator.mid() != null)
+			{
+				output.Append(" :: (");
+				PrintSubElementOrNull(ternaryOperator.mid());
+				output.Append(")");
+			}
+			if (ternaryOperator.kind() == ExpressionKind.foldLR)
+				output.Append(" :>: (");
+			else
+				output.Append(" :<: (");
+			PrintSubElementOrNull(ternaryOperator.right());
+			output.Append(")");
+		}
+		else
+			throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(MethodIdentifier methodIdentifier)
+	{
+		final Boolean safe = ((FunctionType)methodIdentifier.type()).isMiracleSafe();
+		if ( safe == null || safe == false)
+			output.Append("/*BASIC*/ ");
+
+
+		final FunctionType atype = (FunctionType)methodIdentifier.type();
+
+		output.Append(methodIdentifier.tokenText());
+		output.Append("(");
+		int j = 0;
+		for (final Identifier x: methodIdentifier.parameter())
+		{
+			if (j != 0)
+				output.Append(", ");
+			else
+				j++;
+			output.Append(x.tokenText());
+			output.Append(": ");
+			PrintSubElementOrNull(x.type());
+		}
+		output.Append(")");
+		if (atype.returnType() != null)
+		{
+			output.Append(": ");
+			PrintSubElementOrNull(atype.returnType());
+		}
+		output.AppendLine("");
+
+		output.IncIndent();
+		output.AppendLine("var");
+		int i = 0;
+		for (final Identifier sym: methodIdentifier.symbolTable().symbolList())
+		{
+			if (i != 0)
+				output.AppendLine(";");
+			i++;
+			output.Append(sym.tokenText()); output.Append(": "); PrintSubElementOrNull(sym.type());
+		}
+		output.DecIndent();
+		output.AppendLine("");
+
+		PrintSubElementOrNull(methodIdentifier.body());
+		output.Append("end");
+	}
+
+	@Override
+	public void visit(NamedActionIdentifier namedActionIdentifier)
+	{
+		final Boolean safe = ((FunctionType)namedActionIdentifier.type()).isMiracleSafe();
+		if ( safe == null || safe == false)
+			output.Append("/*BASIC*/ ");
+
+		output.Append(namedActionIdentifier.tokenText());
+		output.Append("(");
+		final FunctionType atype = (FunctionType)namedActionIdentifier.type();
+		PrintEnumeration(atype.parameter());
+		output.Append(")");
+		output.AppendLine("");
+
+		output.IncIndent();
+		output.AppendLine("var");
+		int i = 0;
+		for (final Identifier sym: namedActionIdentifier.symbolTable().symbolList())
+		{
+			if (i != 0)
+				output.AppendLine(";");
+			i++;
+			output.Append(sym.tokenText()); output.Append(": "); PrintSubElementOrNull(sym.type());
+		}
+		output.DecIndent();
+		output.AppendLine("");
+
+		PrintSubElementOrNull(namedActionIdentifier.body());
+		output.Append("end");
+	}
+
+	@Override
+	public void visit(MapConstructor mapConstructor)
+	{
+		output.Append("{");
+		int i = 0;
+		for (final MapItem x: mapConstructor.items())
+		{
+			if (i != 0)
+				output.Append(", ");
+			i++;
+			PrintSubElementOrNull(x.key);
+			output.Append(" -> ");
+			PrintSubElementOrNull(x.value);
+		}
+		output.Append("}");
+	}
+
+	@Override
+	public void visit(SetConstructor setConstructor)
+	{
+		output.Append("[");
+		PrintEnumeration(setConstructor.items());
+		if (setConstructor.hasComprehension())
+		{
+			output.Append("| var ");
+			int i = 0;
+			for(final Identifier elem: setConstructor.comprehensionVariables().symbolList())
+			{
+				if (i != 0)
+					output.Append("; ");
+				i++;
+				PrintSubElementOrNull(elem);
+			}
+			output.AppendLine(" &");
+			PrintSubElementOrNull(setConstructor.comprehension());
+		}
+		output.Append("]");
+	}
+
+	@Override
+	public void visit(ExpressionVariableIdentifier expressionVariableIdentifier)
+	{
+		output.Append(expressionVariableIdentifier.tokenText()); output.Append(": ");
+		PrintSubElementOrNull(expressionVariableIdentifier.type());
+	}
+
+
+	@Override
+	public void visit(ObjectConstructor objectConstructor)
+	{
+		output.Append("new (");
+		PrintSubElementOrNull(objectConstructor.type());
+		output.Append(")");
+	}
+
+	@Override
+	public String toString()
+	{
+		return output.toString();
+	}
+
+	public OoaPrintVisitor(ParserState aState)
+	{
+		super(aState);
+		writeTypes = true;
+		output = new OoasCodeEmitter();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaDeepCloneVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaDeepCloneVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaDeepCloneVisitor.java	(revision 2)
@@ -0,0 +1,604 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.ExistsQuantifier;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ForallQuantifier;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.ListConstructor;
+import org.momut.ooas.ast.expressions.MapConstructor;
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+import org.momut.ooas.ast.expressions.QValConstructor;
+import org.momut.ooas.ast.expressions.Quantifier;
+import org.momut.ooas.ast.expressions.SetConstructor;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.TypeExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.UnresolvedIdentifierExpression;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.identifiers.LocalVariableIdentifier;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.Module;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.NondetIdentifierList;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.identifiers.PrioIdentifierList;
+import org.momut.ooas.ast.identifiers.SeqIdentifierList;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.identifiers.UnspecIdentifierList;
+import org.momut.ooas.ast.statements.AbortStatement;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.KillStatement;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.QualitativeConstraintStatement;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.SkipStatement;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.types.AnyType;
+import org.momut.ooas.ast.types.BoolType;
+import org.momut.ooas.ast.types.CharType;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.NullType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.parser.SymbolTable;
+import org.momut.ooas.utils.OoasCompilerHashMap;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+
+public final class OoaDeepCloneVisitor extends OoaCompleteAstTraversalVisitor
+{
+
+	OoasCompilerHashMap<Object, Object> mapping;
+	Identifier selfreplacement;
+
+	public boolean quantifierState = false;
+
+	/* we do not clone types */
+	@Override
+	public /*override*/ void visit(AnyType anyType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(BoolType boolType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(CharType charType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(EnumType enumType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(FloatType floatType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(FunctionType functionType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(IntType intType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(ListType listType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(MapType mapType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(NullType nullType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(OoActionSystemType ooActionSystemType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(TupleType tupleType)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(EnumIdentifier enumIdentifier)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(LandmarkIdentifier landmarkIdentifier)
+	{ throw new NotImplementedException(); }
+	@Override
+	public /*override*/ void visit(ExpressionVariableIdentifier expressionVariableIdentifier)
+	{ throw new NotImplementedException(); }
+
+
+	@Override
+	public /*override*/ void visit(LocalVariableIdentifier localVariableIdentifier)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public /*override*/ void visit(MainModule mainModule)
+	{
+		throw new NotImplementedException();
+	}
+
+
+	@Override
+	public /*override*/ void visit(MapConstructor mapConstructor)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public /*override*/ void visit(MethodIdentifier methodIdentifier)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public /*override*/ void visit(NamedActionIdentifier namedActionIdentifier)
+	{
+		final Statement newBlock = SClone(namedActionIdentifier.body());
+		namedActionIdentifier.SetBody(newBlock);
+		// we do not clone the parameters..
+	}
+
+	@Override
+	public /*override*/ void visit(Module module)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public /*override*/ void visit(NondetIdentifierList nondetIdentifierList)
+	{
+		throw new NotImplementedException();
+	}
+
+
+	@Override
+	public /*override*/ void visit(OpaqueType opaqueType)
+	{
+		throw new NotImplementedException(); // must not happen
+	}
+
+	@Override
+	public /*override*/ void visit(ParameterIdentifier parameterIdentifier)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public /*override*/ void visit(PrioIdentifierList prioIdentifierList)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public /*override*/ void visit(QrType qrType)
+	{
+		throw new NotImplementedException();
+	}
+
+
+
+	@Override
+	public /*override*/ void visit(ObjectConstructor objectConstructor)
+	{
+		//base.visit(objectConstructor);
+	}
+
+	private void UpdateScope(IScope aScope)
+	{
+		if (aScope.GetParentScope() != null && !mapping.containsKey(aScope.GetParentScope()))
+			throw new ArgumentException();
+		else if (aScope.GetParentScope() != null)
+		{
+			aScope.SetParentScope((IScope)mapping.get(aScope.GetParentScope()));
+		}
+	}
+
+	private void CheckScope(IScope aScope) {
+		if (aScope.GetParentScope() == null)
+			return;
+		if (mapping.containsKey(aScope.GetParentScope()))
+			throw new InternalCompilerException("Internal Error. Scope check failed.");
+	}
+
+	private Expression EClone(Expression anExpr)
+	{
+		Expression result = null;
+		if (anExpr != null)
+		{
+			result = anExpr.Clone();
+
+			if (anExpr instanceof IScope)
+			{
+				mapping.putSafe(anExpr, result);
+				UpdateScope((IScope)result);
+			}
+
+			result.Accept(this);
+		}
+		return result;
+	}
+
+	private Statement SClone(Statement aStatement)
+	{
+		Statement result = null;
+		if (aStatement != null)
+		{
+			result = aStatement.Clone();
+
+			if (aStatement instanceof IScope)
+			{
+				mapping.putSafe(aStatement, result);
+				UpdateScope((IScope)result);
+			}
+
+			result.Accept(this);
+		}
+		return result;
+	}
+
+	// clones symbols found in symbol table
+	private void SymTabClone(SymbolTable aTable)
+	{
+		if (aTable != null && aTable.symbolList().size() > 0)
+		{
+			final List<Identifier> newList = new ArrayList<Identifier>();
+			for (final Identifier x: aTable.symbolList())
+			{
+				if (!mapping.containsKey(x))
+				{
+					final Identifier newid = x.Clone();
+					newList.add(newid);
+					mapping.putSafe(x, newid);
+				}
+				else
+					newList.add((Identifier)mapping.get(x));
+			}
+			aTable.SetSymbolList(newList);
+		}
+	}
+
+
+	private void cloneExpressionList(ListIterator<Expression> anElem)
+	{
+		while (anElem.hasNext())
+		{
+			final Expression clone = EClone(anElem.next());
+			anElem.remove();
+			anElem.add(clone);
+		}
+	}
+
+
+	/*no need to clone leafs (they are already cloned and a shallow copy is sufficient*/
+	@Override
+	public /*override*/ void visit(AbortStatement abortStatement)
+	{ }
+	@Override
+	public /*override*/ <T> void visit(ValueExpression<T> valueExpression)
+	{ }
+
+
+	/*clone a block*/
+	public void cloneBlock(Block aBlock)
+	{
+		SymTabClone(aBlock.symbols());
+		final ListIterator<Statement> stmnt = aBlock.statements().listIterator();
+		while (stmnt.hasNext())
+		{
+			final Statement clone = SClone(stmnt.next());
+			stmnt.remove();
+			stmnt.add(clone);
+		}
+	}
+	@Override
+	public /*override*/ void visit(NondetBlock nondetBlock)
+	{
+		cloneBlock(nondetBlock);
+	}
+	@Override
+	public /*override*/ void visit(SeqBlock seqBlock)
+	{
+		seqBlock.SetFilter(EClone(seqBlock.filter()));
+		cloneBlock(seqBlock);
+	}
+	@Override
+	public /*override*/ void visit(PrioBlock prioBlock)
+	{
+		cloneBlock(prioBlock);
+	}
+
+	@Override
+	public /*override*/ void visit(AccessExpression accessExpression)
+	{
+		visit((BinaryOperator)accessExpression);
+	}
+	@Override
+	public /*override*/ void visit(BinaryOperator binaryOperator)
+	{
+		final Expression left = EClone(binaryOperator.left());
+		final Expression right = EClone(binaryOperator.right());
+		binaryOperator.SetLeftChild(left);
+		binaryOperator.SetRightChild(right);
+	}
+
+	@Override
+	public /*override*/ void visit(Assignment assignment)
+	{
+		SymTabClone(assignment.symbols());
+		cloneExpressionList(assignment.places().listIterator());
+		cloneExpressionList(assignment.values().listIterator());
+		assignment.SetNondetExpression(EClone(assignment.nondetExpression()));
+		CheckScope(assignment);
+	}
+
+	@Override
+	public /*override*/ void visit(AttributeIdentifier attributeIdentifier)
+	{
+		final Expression initializer = EClone(attributeIdentifier.initializer());
+		attributeIdentifier.SetInitializer(initializer);
+	}
+	@Override
+	public /*override*/ void visit(Call call)
+	{
+		final Expression cExpr = EClone(call.callExpression());
+		call.SetCallExpression(cExpr);
+	}
+
+	@Override
+	public /*override*/ void visit(CallExpression callExpression)
+	{
+		final ArrayList<Expression> newargs = new ArrayList<Expression>();
+		for (final Expression x: callExpression.arguments())
+		{
+			newargs.add(EClone(x));
+		}
+		callExpression.SetArguments(newargs);
+
+		visit((UnaryOperator)callExpression);
+	}
+
+	public void CloneQuantifier(Quantifier qf)
+	{
+		SymTabClone(qf.symbols());
+		final boolean oldQunatifierState = quantifierState;
+		quantifierState = true;
+		visit(qf);
+		quantifierState = oldQunatifierState;
+	}
+	@Override
+	public /*override*/ void visit(ExistsQuantifier quantifier)
+	{
+		CloneQuantifier(quantifier);
+	}
+	@Override
+	public /*override*/ void visit(ForallQuantifier quantifier)
+	{
+		CloneQuantifier(quantifier);
+	}
+
+
+
+
+	@Override
+	public /*override*/ void visit(GuardedCommand guardedCommand)
+	{
+		final Statement newblock = SClone(guardedCommand.body());
+		final Expression newguard = EClone(guardedCommand.guard());
+		guardedCommand.SetBody(newblock);
+		guardedCommand.SetGuard(newguard);
+	}
+
+	@Override
+	public /*override*/ void visit(IdentifierExpression identifierExpression)
+	{
+
+		if (identifierExpression.isSelf())
+		{
+			/*if (quantifierState) //FIXXME
+            {
+                if (!selfreplacement.tokenText.StartsWith("attr"))
+                {
+                    String oldTokenText = selfreplacement.tokenText;
+                    selfreplacement.SetTokenText("attr____model_root_" + selfreplacement.tokenText);
+                    identifierExpression.SetIdentifier(selfreplacement);
+                    selfreplacement.SetTokenText(oldTokenText);
+                }
+            }
+            else
+			 */
+			identifierExpression.SetIdentifier(selfreplacement);
+
+
+		}
+		else if (mapping.containsKey(identifierExpression.identifier())
+				&& identifierExpression.identifier().kind() != IdentifierKind.MethodIdentifier)
+
+			/* we do NOT replace method calls here, since they are prefixed by self if it's a
+			 * method in the current object or by some field/method access if it's another
+			 * object.
+			 */
+			identifierExpression.SetIdentifier((Identifier)mapping.get(identifierExpression.identifier()));
+
+	}
+
+	@Override
+	public /*override*/ void visit(KillStatement killStatement)
+	{
+		if (mapping.containsKey(killStatement.someOne))
+			killStatement.SetIdentifier((Identifier)mapping.get(killStatement.someOne));
+	}
+
+
+	@Override
+	public /*override*/ void visit(ListConstructor listConstructor)
+	{
+		SymTabClone(listConstructor.comprehensionVariables());
+
+		final ArrayList<Expression> newelems = new ArrayList<Expression>();
+		for (final Expression x: listConstructor.elements())
+			newelems.add(EClone(x));
+
+		listConstructor.SetElements(newelems);
+		listConstructor.SetComprehension(EClone(listConstructor.comprehension()));
+	}
+
+	@Override
+	public /*override*/ void visit(QualitativeConstraintStatement qalitativeConstraintStatement)
+	{
+		if (qalitativeConstraintStatement.variable0() != null && mapping.containsKey(qalitativeConstraintStatement.variable0()))
+			qalitativeConstraintStatement.SetVariable0((Identifier)mapping.get(qalitativeConstraintStatement.variable0()));
+		if (qalitativeConstraintStatement.variable1() != null && mapping.containsKey(qalitativeConstraintStatement.variable1()))
+			qalitativeConstraintStatement.SetVariable1((Identifier)mapping.get(qalitativeConstraintStatement.variable1()));
+		if (qalitativeConstraintStatement.variable2() != null && mapping.containsKey(qalitativeConstraintStatement.variable2()))
+			qalitativeConstraintStatement.SetVariable2((Identifier)mapping.get(qalitativeConstraintStatement.variable2()));
+	}
+
+
+	@Override
+	public /*override*/ void visit(QValConstructor qValConstructor)
+	{
+		final List<Expression> values = Arrays.asList(qValConstructor.value());
+		for (int i = 0; i < values.size(); i++)
+			qValConstructor.value()[i] = EClone(values.get(i));
+	}
+
+	@Override
+	public /*override*/ void visit(SeqIdentifierList seqIdentifierList)
+	{
+		throw new NotImplementedException();
+	}
+
+
+	@Override
+	public /*override*/ void visit(SetConstructor setConstructor)
+	{
+		SymTabClone(setConstructor.comprehensionVariables());
+		final ArrayList<Expression> newelems = new ArrayList<Expression>();
+		for (final Expression x: setConstructor.items())
+			newelems.add(EClone(x));
+
+		setConstructor.SetItems(newelems);
+		setConstructor.SetComprehension(EClone(setConstructor.comprehension()));
+	}
+
+
+	@Override
+	public /*override*/ void visit(SkipStatement skipStatement)
+	{ }
+
+	@Override
+	public /*override*/ void visit(TernaryOperator ternaryOperator)
+	{
+		ternaryOperator.SetLeftChild(EClone(ternaryOperator.left()));
+		ternaryOperator.SetMidChild(EClone(ternaryOperator.mid()));
+		ternaryOperator.SetRightChild(EClone(ternaryOperator.right()));
+	}
+
+	@Override
+	public /*override*/ void visit(TupleConstructor tupleConstructor)
+	{
+		final ArrayList<Expression> values = new ArrayList<Expression>();
+		for (final Expression x: tupleConstructor.values())
+			values.add(EClone(x));
+		tupleConstructor.SetTupleValues(values);
+	}
+
+	@Override
+	public /*override*/ void visit(TupleMapAccessExpression tupleMapAccessExpression)
+	{
+		tupleMapAccessExpression.SetArgument(EClone(tupleMapAccessExpression.argument()));
+		visit((UnaryOperator)tupleMapAccessExpression);
+	}
+
+	@Override
+	public /*override*/ void visit(TypeExpression typeExpression)
+	{ /*we do not clone types*/ }
+
+
+	@Override
+	public /*override*/ void visit(TypeIdentifier typeIdentifier)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public /*override*/ void visit(UnaryOperator unaryOperator)
+	{
+		final Expression child = EClone(unaryOperator.child());
+		unaryOperator.SetChild(child);
+	}
+
+
+	@Override
+	public /*override*/ void visit(UnresolvedIdentifierExpression unresolvedIdentifierExpression)
+	{
+		throw new NotImplementedException(); // must not occur
+	}
+
+	@Override
+	public /*override*/ void visit(UnspecIdentifierList unspecIdentifierList)
+	{
+		throw new NotImplementedException();
+	}
+
+	public OoaDeepCloneVisitor(HashMap<Object, Object> initMapping, Identifier selfreplace)
+	{
+		super (null);
+		mapping = new OoasCompilerHashMap<Object, Object>(initMapping);
+		selfreplacement = selfreplace;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ParameterIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ParameterIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ParameterIdentifier.java	(revision 2)
@@ -0,0 +1,67 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.UlyssesType;
+
+public final class ParameterIdentifier extends LocalVariableIdentifier
+{
+	public ParameterIdentifier(Token aToken,
+			UlyssesType aType,
+			IScope aDefiningScope)
+	{
+		super(aToken, aType, aDefiningScope);
+		m_identifierKind = IdentifierKind.ParameterIdentifier;
+	}
+
+	public ParameterIdentifier(String name, UlyssesType aType, IScope aDefiningScope)
+	{
+		super (name, aType, IdentifierKind.ParameterIdentifier, aDefiningScope);
+	}
+
+	public ParameterIdentifier(ParameterIdentifier toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Identifier Clone()
+	{
+		return new ParameterIdentifier(this);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+}
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaSymbolSortVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaSymbolSortVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaSymbolSortVisitor.java	(revision 2)
@@ -0,0 +1,78 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import java.util.Collections;
+
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+
+public final class OoaSymbolSortVisitor extends OoaCompleteAstTraversalVisitor
+{
+	/* Sorting of enums is not necessarily a good idea in terms of the user wanting to know what's going on
+	 * however, we need to do this for the ulysses prolog target - otherwise mutations won't be correct..
+	 * (regardeless in what order the enum symbols were declared, the order must be the same - then we can
+	 * map them to ints)
+	 */
+	@Override
+	public void visit(EnumType enumType)
+	{
+		Collections.sort(enumType.listOfEnumSymbols());
+		super.visit(enumType);
+	}
+
+	@Override
+	public void visit(MainModule mainModule)
+	{
+		for (Identifier s: mainModule.symbolTable().symbolList())
+		{
+			if (s.kind() == IdentifierKind.TypeIdentifier &&
+					((TypeIdentifier)s).type().kind() == TypeKind.OoActionSystemType)
+			{
+				OoActionSystemType ooa = (OoActionSystemType)((TypeIdentifier)s).type();
+				ooa.symbols().Sort();
+			}
+		}
+		mainModule.symbolTable().Sort();
+		super.visit(mainModule);
+	}
+
+	public OoaSymbolSortVisitor(ParserState aState)
+	{
+		super(aState, false);
+		if (aState == null)
+			throw new ArgumentException();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaIdentifierVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaIdentifierVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaIdentifierVisitor.java	(revision 2)
@@ -0,0 +1,51 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+
+/// <summary>
+/// Visitor that restricts itself to identifier
+/// </summary>
+public class OoaIdentifierVisitor extends OoaCompleteAstTraversalVisitor
+{
+	@Override
+	protected void VisitAstElement(IAst element, IAst parent)
+	{
+		// we are only interested in an expression.
+		if (element.nodeType() == AstNodeTypeEnum.identifier)
+			super.VisitAstElement(element, parent);
+	}
+
+	public OoaIdentifierVisitor()
+	{
+		super(null);
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypesVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypesVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypesVisitor.java	(revision 2)
@@ -0,0 +1,177 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import java.util.HashSet;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.parser.ParserError;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+
+/// <summary>
+/// Requires: ResolveOpaque
+///
+/// Checks whether types have been defined in a sane way (no self refs etc.)
+/// </summary>
+public final class OoaTypesVisitor extends OoaCompleteAstTraversalVisitor
+{
+	private void Error(UlyssesType aType, String p)
+	{
+		ParserError error = new ParserError(m_ParserState.filename,
+				aType.identifier().line(), aType.identifier().column(), p);
+		m_ParserState.AddErrorMessage(error);
+	}
+
+	HashSet<UlyssesType> typesSeen = new HashSet<UlyssesType>();
+
+
+	@Override
+	public void visit(MainModule mainModule)
+	{
+		for (Identifier x: mainModule.symbolTable().symbolList())
+		{
+			if (x.kind() == IdentifierKind.TypeIdentifier)
+				x.Accept(this);
+		}
+	}
+
+	@Override
+	protected void VisitAstElement(IAst element, IAst parent)
+	{
+		if (element.nodeType() != AstNodeTypeEnum.type)
+			m_visited.add(element);
+
+		super.VisitAstElement(element, parent);
+	}
+
+
+	@Override
+	public void visit(TypeIdentifier typeIdentifier)
+	{
+		typesSeen.clear();
+		super.visit(typeIdentifier);
+	}
+
+
+	private interface Action<T extends UlyssesType> {
+		void doIt(T param);
+	}
+
+	/* Does the check for recursion */
+	private <T extends UlyssesType> void CheckForRecursion(T aType, String Message, Action<T> toCall)
+	{
+		if (typesSeen.contains(aType))
+		{
+			Error(aType, Message);
+			return;
+		}
+		typesSeen.add(aType);
+		try
+		{
+			toCall.doIt(aType);
+		}
+		finally
+		{
+			typesSeen.remove(aType);
+		}
+	}
+
+	/* see whether a tuple-type includes itself */
+	public void HackUntilCSharp4(TupleType t)
+	{ super.visit(t); }
+
+	@Override
+	public void visit(TupleType tupleType)
+	{
+		this.<TupleType>CheckForRecursion(tupleType,
+				String.format("Tuple contains itself: '%s' (Recursive definitions not allowed.)",
+						tupleType.toString()),
+				new Action<TupleType>(){
+					@Override
+					public void doIt(TupleType param) {
+						HackUntilCSharp4(param);
+				}}); // (x) => HackUntilCSharp4(x));
+	}
+
+	/* see whether a list-type includes itself */
+	public void HackUntilCSharp4(ListType t)
+	{ super.visit(t); }
+
+	@Override
+	public void visit(ListType listType)
+	{
+		this.<ListType>CheckForRecursion(listType,
+				String.format("List contains itself: '%s' (Recursive definitions not allowed.)",
+						listType.toString()),
+				new Action<ListType>(){
+					@Override
+					public void doIt(ListType param) {
+						HackUntilCSharp4(param);
+				}}); // (x) => HackUntilCSharp4(x));
+	}
+
+	/* see whether a map-type includes itself */
+	public void HackUntilCSharp4(MapType t)
+	{ super.visit(t); }
+	@Override
+	public void visit(MapType mapType)
+	{
+		this.<MapType>CheckForRecursion(mapType,
+				String.format("Map contains itself: '%s' (Recursive definitions not allowed.)",
+						mapType.toString()),
+				new Action<MapType>(){
+					@Override
+					public void doIt(MapType param) {
+						HackUntilCSharp4(param);
+					}}); // (x) => HackUntilCSharp4(x));
+	}
+
+	@Override
+	public void visit(OoActionSystemType ooActionSystemType)
+	{
+		// do not go into classes..
+	}
+
+	public OoaTypesVisitor(ParserState aState)
+	{
+		super (aState, true);
+		if (aState == null)
+			throw new ArgumentException();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaResolveExpressionsVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaResolveExpressionsVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaResolveExpressionsVisitor.java	(revision 2)
@@ -0,0 +1,1997 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Stack;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.ExistsQuantifier;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.ForallQuantifier;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.LeafExpression;
+import org.momut.ooas.ast.expressions.ListConstructor;
+import org.momut.ooas.ast.expressions.MapConstructor;
+import org.momut.ooas.ast.expressions.QValConstructor;
+import org.momut.ooas.ast.expressions.SetConstructor;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.TypeExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.UnresolvedIdentifierExpression;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.expressions.LeafExpression.LeafTypeEnum;
+import org.momut.ooas.ast.expressions.MapConstructor.MapItem;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.ConstantIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.identifiers.SelfTypeIdentifier;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.types.AnyType;
+import org.momut.ooas.ast.types.BoolType;
+import org.momut.ooas.ast.types.CharType;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.NullType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.ast.types.ValuedEnumType;
+import org.momut.ooas.parser.ParserError;
+import org.momut.ooas.parser.ParserMessage;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.parser.ParserWarning;
+import org.momut.ooas.parser.SymbolTable;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+
+/// <summary>
+/// Requires: ReplaceOpaqueVisitor
+///
+/// After we have an AST without any Opaquetypes, we still need to replace all the
+/// UnresolvedIdentifierExpressions. We also need to compute the expression types,
+/// which is also necessary to resolve all the identifiers. So, this visitor
+/// goes over all expressions and
+///   - resolves all identifiers
+///   - calculates resulting types (incl. coercion)
+/// </summary>
+public final class OoaResolveExpressionsVisitor extends OoaCompleteAstTraversalVisitor
+{
+	// we allow for free variable in expressions. collect them here.
+	private final Stack<SymbolTable> m_freeVariables = new Stack<SymbolTable>();
+	private Expression m_entryExpression = null;
+
+	// helpers that replace the old expression in the AST by the new one.
+	private void ReplaceExpression(IAst parent, Expression subElement, Expression newExpression)
+	{
+		switch (parent.nodeType())
+		{
+			case identifier:
+				ReplaceExpressionInIdentifier((Identifier)parent, subElement, newExpression);
+				break;
+			case statement:
+				ReplaceExpressionInStatement((Statement)parent, subElement, newExpression);
+				break;
+			default:
+				throw new NotImplementedException();
+		}
+	}
+	private void ReplaceExpressionInIdentifier(Identifier identifier, Expression subElement, Expression newExpression)
+	{
+		switch (identifier.kind())
+		{
+			case AttributeIdentifier:
+				final AttributeIdentifier ident = (AttributeIdentifier)identifier;
+				assert(ident.initializer() == subElement); // ref equ.
+				ident.SetInitializer(newExpression);
+				break;
+			case Constant:
+				final ConstantIdentifier aconst = (ConstantIdentifier)identifier;
+				assert(aconst.Value() == subElement); // ref equ
+				aconst.SetValue(newExpression);
+				if (newExpression.kind() != ExpressionKind.Value)
+					Error(aconst.Value(), String.format("%s not a constant!", aconst.tokenText()));
+				break;
+			default:
+				throw new NotImplementedException();
+		}
+	}
+	private void ReplaceExpressionInStatement(Statement statement, Expression subElement, Expression newExpression)
+	{
+		switch (statement.kind())
+		{
+			case GuardedCommand:
+				final GuardedCommand gc = (GuardedCommand)statement;
+				assert(gc.guard() == subElement); // ref eq
+				gc.SetGuard(newExpression);
+			break;
+			case SeqBlock:
+				final SeqBlock sqblock = (SeqBlock)statement;
+				assert(sqblock.filter() == subElement); // ref eq
+				sqblock.SetFilter(null);
+				// we convert the filter to a guarded command...
+				final SeqBlock implseq = new SeqBlock(sqblock.line(), sqblock.pos());
+				implseq.SetStatements(sqblock.statements());
+				final GuardedCommand implguard = new GuardedCommand(newExpression, implseq, sqblock.line(), sqblock.pos());
+				sqblock.SetStatements(new LinkedList<Statement>());
+				sqblock.AddStatement(implguard);
+				break;
+			case Assignment:
+				final Assignment zw = (Assignment)statement;
+				boolean found = false;
+				if (zw.nondetExpression() == subElement) // ref eq
+				{
+					zw.SetNondetExpression(newExpression);
+					found = true;
+				}
+				else
+				{
+					int cntr = 0;
+					while (cntr < zw.places().size()) {
+						if (zw.places().get(cntr) == subElement) { // ref eq
+							zw.places().set(cntr, newExpression);
+							found = true;
+							break;
+						}
+						cntr ++;
+					}
+					if (!found) {
+						cntr = 0;
+						while (cntr < zw.values().size()) {
+							if (zw.values().get(cntr) == subElement) { // ref eq.
+								zw.values().set(cntr, newExpression);
+								found = true;
+								break;
+							}
+							cntr ++;
+						}
+					}
+				}
+				assert(found);
+				break;
+			case MethodCall:
+				final Call call = (Call)statement;
+				assert(call.callExpression() == subElement); // ref eq.
+				call.SetCallExpression(newExpression);
+				break;
+			default:
+				throw new NotImplementedException();
+		}
+	}
+
+	// helper that returns null and adds an error message in the parserstate errorlist.
+	private Expression Error(Expression expression, String p)
+	{
+		final ParserError error = new ParserError(m_ParserState.filename,
+				expression.line(), expression.pos(), p);
+		m_ParserState.AddErrorMessage(error);
+		return null;
+	}
+	private void Info(Expression expression, String p)
+	{
+		final ParserMessage msg = new ParserMessage(m_ParserState.filename,
+				expression.line(), expression.pos(), p);
+		m_ParserState.AddMessage(msg);
+	}
+	// helper that adds a warning message to the output
+	private void Warning(Identifier expression, String p)
+	{
+		final ParserWarning warning = new ParserWarning(m_ParserState.filename,
+				expression.line(), expression.column(), p);
+		m_ParserState.AddWarningMessage(warning);
+	}
+	private void Warning(Expression expression, String p)
+	{
+		final ParserWarning warning = new ParserWarning(m_ParserState.filename,
+				expression.line(), expression.pos(), p);
+		m_ParserState.AddWarningMessage(warning);
+	}
+
+	private final ArrayList<TupleConstructor> m_matcherList = new ArrayList<TupleConstructor>();
+
+	///
+	///   Resolve Expressions
+	///
+
+	private Expression ResolveExpression(TernaryOperator expression)
+	{
+		if (expression.kind() == ExpressionKind.conditional)
+		{
+			final Expression left = ResolveExpression(expression.left());
+			Expression mid = ResolveExpression(expression.mid());
+			Expression right = ResolveExpression(expression.right());
+
+			if (left == null || mid == null || right == null)
+				return null;
+
+			if (left.type() == null || left.type().kind() != TypeKind.BoolType)
+				return Error(expression, "Conditional: Condition not a bool");
+
+			if (mid.type() == null || right.type() == null)
+				return Error(expression, "Conditional: Then or Else branch has void-type");
+
+			final UlyssesType acover = UlyssesType.CoverType(mid.type(), right.type());
+
+			if (acover == null)
+				return Error(expression, String.format(
+					"Conditional: Then and Else branch must be of same type. (%s <> %s)",
+					mid.type().toString(), right.type().toString()));
+
+			if (!UlyssesType.TypeEqual(acover, mid.type()))
+			{
+				mid = new UnaryOperator(ExpressionKind.Cast, mid, mid.line(), mid.pos());
+				mid.SetType(acover);
+			}
+			if (!UlyssesType.TypeEqual(acover, right.type()))
+			{
+				right = new UnaryOperator(ExpressionKind.Cast, right, right.line(), right.pos());
+				right.SetType(acover);
+			}
+
+
+			expression.SetLeftChild(left);
+			expression.SetMidChild(mid);
+			expression.SetRightChild(right);
+			expression.SetType(mid.type());
+			return expression;
+		}
+		else if (expression.kind() == ExpressionKind.foldLR || expression.kind() == ExpressionKind.foldRL)
+		{
+			CallExpression leftcall = expression.left().kind() != ExpressionKind.Call
+				? new CallExpression(expression.left(), new ArrayList<Expression>(), expression.line(),
+					expression.pos(), expression.definingScope())
+				: (CallExpression)expression.left();
+
+			leftcall = (CallExpression)ResolveExpression(leftcall, true);
+			if (leftcall == null)
+				return null;
+
+			final Expression afun = ResolveExpression(leftcall.child());
+			leftcall.SetChild(afun);
+			if (afun == null || afun.type() == null || afun.type().kind() != TypeKind.FunctionType)
+				return Error(expression, "Fold/Map operation needs a method or named action as LHS");
+
+			final FunctionType funType = (FunctionType)afun.type();
+			if (funType.returnType() == null && expression.mid() != null)
+				return Error(expression, "Fold operation needs a method with matching return type");
+			if (funType.returnType() != null && expression.mid() == null)
+				Warning(expression, "Map operation will discard result of function");
+
+			final boolean isMap = expression.mid() == null;
+			Expression mid = expression.mid();
+			if (!isMap)
+			{
+				mid = ResolveExpression(mid);
+				if ((funType.parameter().size() - leftcall.arguments().size()) != 2)
+					return Error(expression, "Function used in fold operation needs 2 not-instantiated parameters");
+			} else if ((funType.parameter().size() - leftcall.arguments().size()) != 1)
+				return Error(expression, "Function used in map operation needs one not-instantiated parameter");
+
+			final Expression right = ResolveExpression(expression.right());
+			if (right == null || right.type() == null || right.type().kind() != TypeKind.ListType)
+				return Error(expression, "Fold/Map operation needs list as RHS");
+
+			if (!isMap)
+			{
+				final int nextToLast = funType.parameter().size() - 2;
+				final UlyssesType initCover = UlyssesType.CoverType(funType.parameter().get(nextToLast), mid.type());
+				if (initCover == null)
+					return Error(expression, "Next to last parameter does not match initializer type in map operation.");
+				if (!UlyssesType.TypeEqual(mid.type(), initCover))
+					mid = new UnaryOperator(ExpressionKind.Cast, mid, mid.line(), mid.pos());
+				mid.SetType(initCover);
+
+				//List<Expression> args = new List<Expression> ();
+				leftcall.arguments().add(new IdentifierExpression(new ParameterIdentifier("_result", initCover, null), 0, 0));
+				leftcall.arguments().add(new IdentifierExpression(new ParameterIdentifier("_elem", funType.parameter().peekLast(), null), 0, 0));
+				//leftcall.SetArguments(args);
+			}
+			// UlyssesType listCover = UlyssesType.CoverType(funType.parameter.Last.Value, ((ListType)right.type).innerType);
+			// if (listCover == null)
+			if (!UlyssesType.TypeEqual(funType.parameter().peekLast(), ((ListType)right.type()).innerType()))
+				return Error(expression, "Last paramter does not match inner-type of list in fold/map operation");
+
+			expression.SetLeftChild(leftcall);
+			expression.SetMidChild(mid);
+			expression.SetRightChild(right);
+			if (!isMap)
+				expression.SetType(funType.returnType());
+			else
+				expression.SetType(new NullType());
+			return expression;
+		} else
+			throw new ArgumentException();
+	}
+	private Expression ResolveExpression(ForallQuantifier expression)
+	{
+		final Expression child = ResolveExpression(expression.child());
+		if (child == null)
+			return null;
+
+		expression.SetType(new BoolType(null));
+		expression.SetChild(child);
+		return expression;
+	}
+	private Expression ResolveExpression(ExistsQuantifier expression)
+	{
+		final Expression child = ResolveExpression(expression.child());
+		if (child == null)
+			return null;
+
+		expression.SetType(new BoolType(null));
+		expression.SetChild(child);
+		return expression;
+	}
+	private Expression ResolveExpression(ListConstructor expression)
+	{
+		UlyssesType type = null;
+		ListType restype = null;
+		Expression comprehension = null;
+		if (expression.comprehension() != null)
+		{
+			comprehension = ResolveExpressionNewScope(expression.comprehension());
+
+			if (comprehension == null)
+				return null;
+
+			if (comprehension.type() == null)
+				return Error(expression, "List comprehension has void expression");
+
+			if (comprehension.type().kind() != TypeKind.BoolType)
+				return Error(expression, "List comprehension has to be bool-expression");
+
+			expression.SetComprehension(comprehension);
+
+			if (expression.elements().size() != 1)
+				return Error(expression, "List comprehension expects one initializer expression");
+		}
+
+		final ArrayList<Expression> newitems = new ArrayList<Expression>();
+
+		if (expression.elements().size() == 0 || expression.elements().get(0) == null || (
+		        expression.elements().get(0).kind() == ExpressionKind.Value &&
+		        expression.elements().get(0) instanceof ValueExpression<?> &&
+		        ((ValueExpression<?>)expression.elements().get(0)).value() == null))
+		{
+			// empty list
+			type = new NullType();
+		}
+		else
+		{
+			final ArrayList<Expression> tmpitems = new ArrayList<Expression>();
+			for (final Expression item: expression.elements())
+			{
+				final Expression element = ResolveExpression(item);
+				if (element == null)
+					return null;
+				if (element.type() == null)
+					return Error(expression, "Void expression in list initializer");
+
+				if (element.kind() == ExpressionKind.Value &&
+				    element instanceof ValueExpression<?> &&
+				    ((ValueExpression<?>)element).value() == null)
+				{
+					return Error(expression, "Not-In-List (nil) values not allowed in a list");
+				}
+
+				// calculate the type we're constructing
+				if (type == null)
+					type = element.type();
+
+				type = UlyssesType.CoverType(type, element.type());
+				if (type == null)
+					return Error(expression, "List constructor needs matching types");
+
+				tmpitems.add(element);
+			}
+
+			// now we have the resulting type - we still need to insert casts that might be necessary
+			for (final Expression item: tmpitems)
+			{
+				if (!UlyssesType.TypeEqual(item.type(), type))
+				{
+					final Expression cast = new UnaryOperator(ExpressionKind.Cast, item, item.line(), item.pos());
+					cast.SetType(type);
+					newitems.add(cast);
+				}
+				else
+					newitems.add(item);
+			}
+		}
+
+		expression.SetElements(newitems);
+		if (comprehension == null)
+			restype = new ListType(type, newitems.size(), null);
+		else
+			restype = new ListType(type, -1, null); // we do not know anything about the bound
+
+		expression.SetType(restype);
+		return expression;
+	}
+	private Expression ResolveExpression(SetConstructor expression)
+	{
+		UlyssesType type = null;
+		ListType restype = null;
+		Expression comprehension = null;
+		if (expression.comprehension() != null)
+		{
+			comprehension = ResolveExpressionNewScope(expression.comprehension());
+
+			if (comprehension == null)
+				return null;
+
+			if (comprehension.type() == null)
+				return Error(expression, "Set comprehension has void expression");
+
+			if (comprehension.type().kind() != TypeKind.BoolType)
+				return Error(expression, "Set comprehension has to be bool-expression");
+
+			expression.SetComprehension(comprehension);
+
+			if (expression.items().size() != 1)
+				return Error(expression, "Set comprehension expects one initializer expression");
+		}
+
+		final ArrayList<Expression> newitems = new ArrayList<Expression>();
+		for (final Expression item: expression.items())
+		{
+			final Expression element = ResolveExpression(item);
+			if (element == null)
+				return null;
+
+			if (element.type() == null)
+				return Error(expression, "Void expression in set initializer");
+
+			if (type == null)
+				type = element.type();
+			type = UlyssesType.CoverType(type, element.type());
+			if (type == null)
+				return Error(expression, "Set initializer needs matching types");
+
+			newitems.add(element);
+		}
+		expression.SetItems(newitems);
+		restype = new ListType(type, newitems.size(), null);
+
+		expression.SetType(restype);
+		return expression;
+	}
+	private Expression ResolveExpression(MapConstructor expression)
+	{
+		UlyssesType domain = null;
+		UlyssesType range = null;
+		final ArrayList<MapConstructor.MapItem> newitems = new ArrayList<MapConstructor.MapItem>();
+
+		for(final MapItem item: expression.items())
+		{
+			final Expression domexpr = ResolveExpression(item.key);
+			if (domexpr == null)
+				return null;
+
+			if (domexpr.type() == null)
+				return Error(expression, "Domain initializing expression void");
+
+			if (domain == null)
+				domain = domexpr.type();
+
+			final Expression rangeexpr = ResolveExpression(item.value);
+			if (rangeexpr == null)
+				return null;
+
+			if (rangeexpr.type() == null)
+				return Error(expression, "Range initializing expression void");
+
+			if (range == null)
+				range = rangeexpr.type();
+
+			domain = UlyssesType.CoverType(domain, domexpr.type());
+			range = UlyssesType.CoverType(range, rangeexpr.type());
+			if (domain == null)
+				return Error(expression, "Types of domain expressions do not match");
+
+			if (range == null)
+				return Error(expression, "Types of range expressions do not match");
+
+			newitems.add(new MapConstructor.MapItem(domexpr, rangeexpr));
+		}
+
+		expression.SetItems(newitems);
+		final MapType resulttype = new MapType(domain, range, newitems.size(), null);
+		expression.SetType(resulttype);
+		return expression;
+	}
+	private Expression ResolveExpression(TupleConstructor expression)
+	{
+		final TupleType typeToConstruct = (TupleType)expression.tupleType().type();
+
+		if (expression.values().size() != typeToConstruct.innerTypes().size())
+			return Error(expression, String.format("Tuple constructor has wrong arity. (%s <> %s)",
+				typeToConstruct.innerTypes().size(), expression.values().size()));
+
+		//TupleType resulttype = new TupleType(null);
+		final ArrayList<Expression> newvalexprs = new ArrayList<Expression>();
+
+		final Iterator<UlyssesType> innerTargetType = typeToConstruct.innerTypes().iterator();
+		int freeVarCount = 0;
+		for (final Expression initexpr: expression.values())
+		{
+			final UlyssesType innerTargetTypeValue = innerTargetType.next();
+			Expression newval = ResolveExpression(initexpr);
+			if (newval == null)
+				return null;
+			if (newval.type() == null)
+				return Error(expression, "Element has void type");
+
+			if (newval.type().kind() == TypeKind.Any)
+			{
+				// free var - so set type.
+				final AnyType freevar = (AnyType)newval.type();
+				freevar.VariableIdentifier().SetType(innerTargetTypeValue);
+				freevar.VariableIdentifier().SetInitialized(true);
+				freeVarCount++;
+			}
+			else
+			{
+				final UlyssesType acover = UlyssesType.CoverType(innerTargetTypeValue, newval.type());
+				if (acover == null || !UlyssesType.TypeEqualByKind(innerTargetTypeValue, acover))
+					return Error(expression,
+						String.format("Element in tuple constructor has non-matching type (%s <> %s)",
+								innerTargetTypeValue.toString(), newval.type().toString()));
+
+				if (!UlyssesType.TypeEqual(acover, newval.type()))
+				{
+					newval = new UnaryOperator(ExpressionKind.Cast, newval, newval.line(), newval.pos());
+					newval.SetType(acover);
+				}
+				if (UlyssesType.FirstTypeLessRange(innerTargetTypeValue, acover)) {
+					Warning(expression,
+						String.format("Tuple constructor may over/underflow: %s := %s",
+								innerTargetTypeValue.toString(), acover.toString()));
+					newval = new UnaryOperator(ExpressionKind.Cast, newval, newval.line(), newval.pos());
+					newval.SetType(innerTargetTypeValue);
+				}
+			}
+
+			newvalexprs.add(newval);
+			//resulttype.AddType(newval.type);
+		}
+
+		if (freeVarCount > 0)
+		{
+			if (freeVarCount != expression.values().size())
+				return Error(expression, String.format("Tuple constructor must have 0 or #elems (%s) free variables", expression.values().size()));
+			else
+			{
+				expression.SetIsMatcher(true); // mark this tuple constructor as matcher, since this is the only thing it does..
+				m_matcherList.add(expression); // matcher has to be bound by one equality
+			}
+		}
+
+		expression.SetTupleValues(newvalexprs);
+		//expression.SetType(resulttype);
+		expression.SetType(typeToConstruct); // the constructor always will create the correct type!
+		return expression;
+	}
+
+	private Expression ResolveExpression(QValConstructor expression)
+	{
+		Expression basevalue = null;
+		Expression rangevalue = null;
+
+		basevalue = ResolveExpression(expression.value()[0]);
+		if (basevalue == null || basevalue.kind() != ExpressionKind.Access
+		    || basevalue.type() == null || basevalue.type().kind() != TypeKind.QrType)
+			return Error(expression, "Landmark expected.");
+		expression.SetType(basevalue.type());
+		expression.SetValue(basevalue);
+
+		if (expression.value().length == 2)
+		{
+			rangevalue = ResolveExpression(expression.value()[1]);
+			if (rangevalue == null || rangevalue.kind() != ExpressionKind.Access
+			    || rangevalue.type() == null || rangevalue.type().kind() != TypeKind.QrType)
+				return Error(expression, "Landmark expected.");
+			if (!UlyssesType.TypeEqual(basevalue.type(), rangevalue.type()))
+				return Error(expression, String.format("Quantity spaces do not match: %s <> %s",
+						basevalue.type().toString(),
+						rangevalue.type().toString()));
+			expression.AddRange(rangevalue);
+		}
+		return expression;
+	}
+
+	private Expression ResolveExpression(IdentifierExpression expression)
+	{
+		// nothing to do here, since we do not have any consts that may be
+		// folded
+		if ((expression.identifier().kind() == IdentifierKind.MethodIdentifier
+		       || expression.identifier().kind() == IdentifierKind.NamedActionIdentifier)
+		    && !m_entryExpression.callTargets().contains(expression.identifier()))
+		{
+			m_entryExpression.callTargets().add((FunctionIdentifier)expression.identifier());
+		}
+
+		return expression;
+	}
+	private Expression ResolveExpression(UnresolvedIdentifierExpression expression)
+	{
+		Identifier anid;
+		//Identifier self = m_ParserState.Lookup("self");
+
+		if (m_freeVariables.peek().Defined(expression.tokenText()))
+			anid = m_freeVariables.peek().Get(expression.tokenText());
+		else
+			anid = m_ParserState.Lookup(expression.tokenText(), expression.scope());
+
+		if (anid != null)
+		{
+			switch (anid.kind())
+			{
+			case TypeIdentifier:
+				return new TypeExpression(anid.type(), expression.line(), expression.pos());
+
+			case MethodIdentifier:
+				m_entryExpression.callTargets().add((FunctionIdentifier)anid);
+				final SelfTypeIdentifier selfid = (SelfTypeIdentifier)m_ParserState.Lookup("self", expression.scope());
+				if ((selfid != null) && ((OoActionSystemType)(selfid).type()).symbols().Defined(anid))
+				{
+					// if it's a self access, add a self identifier (needed by cadp backend, e.g.)
+					// self.<method> is handled in a separate method and does not call us here!! (hence this code is working)
+					final IdentifierExpression aself = new IdentifierExpression(selfid, expression.line(), expression.pos());
+					aself.setIsSelf(true);
+					final AccessExpression localaccess = new AccessExpression(aself, new IdentifierExpression(anid, expression.line(), expression.pos()),
+							expression.line(), expression.pos());
+					ResolveExpression(localaccess);
+					return localaccess;
+				}
+				else
+				{
+					return new IdentifierExpression(anid, expression.line(), expression.pos());
+				}
+
+			case NamedActionIdentifier:
+				m_entryExpression.callTargets().add((FunctionIdentifier)anid);
+				return new IdentifierExpression(anid, expression.line(), expression.pos());
+
+			case Constant:
+				if (((ConstantIdentifier)anid).Value() != null)
+					return ((ConstantIdentifier)anid).Value().Clone();
+				else
+					return null;
+
+			default:
+				return new IdentifierExpression(anid, expression.line(), expression.pos());
+			}
+		}
+		else
+		{
+			final ExpressionVariableIdentifier freeVar =
+					new ExpressionVariableIdentifier(expression.tokenText(), expression.line(), expression.pos());
+			freeVar.SetType(new AnyType(freeVar));
+			m_freeVariables.peek().AddIdentifier(freeVar);
+
+			// add a warning about free variables - do not change text without changing the text in ooaTypeCheckVisitor..
+			Warning(freeVar, String.format("Free variable in expression: '%s'.", freeVar.tokenText()));
+
+			return new IdentifierExpression(freeVar, expression.line(), expression.pos());
+		}
+	}
+	private Expression ResolveExpression(TupleMapAccessExpression expression)
+	{
+		final Expression child = ResolveExpression(expression.child());
+		if (child == null)
+			return null;
+
+		final Expression arg = ResolveExpression(expression.argument());
+		if (arg == null)
+			return null;
+
+
+		assert(child.type() != null);
+
+		if ((child.kind() != ExpressionKind.Type) && (child.type().kind() == TypeKind.TupleType))
+		{
+			if ((arg.kind() != ExpressionKind.Value)
+			    || (((LeafExpression)arg).valueType() != LeafTypeEnum.integer))
+			{
+				return Error(expression, "Argument to tuple access must be constant integer value!");
+			}
+			final TupleType aTuple = (TupleType)child.type();
+			@SuppressWarnings("unchecked")
+			final
+			ValueExpression<Integer> aval = (ValueExpression<Integer>)arg;
+			if ((aval.value() < 0) || (aval.value() >= aTuple.innerTypes().size()))
+			{
+				return Error(expression, "Argument to tuple access has to be in range 0..#elems-1");
+			}
+//			LinkedListNode<UlyssesType> anode = aTuple.innerTypes().First;
+//			int target = aval.value();
+//			while (target > 0)
+//			{
+//				target--;
+//				anode = anode.Next;
+//			}
+//			expression.SetType(anode.Value);
+			expression.SetType(aTuple.innerTypes().get(aval.value()));
+		}
+		else if ((child.kind() != ExpressionKind.Type) && (child.type().kind() == TypeKind.MapType))
+		{
+			final MapType amap = (MapType)child.type();
+			expression.SetType(amap.toType());
+		}
+		else if ((child.kind() != ExpressionKind.Type) && (child.type().kind() == TypeKind.ListType))
+		{
+			// we allow element access of lists via list[i]
+			final ListType alist = (ListType)child.type();
+			expression.SetType(alist.innerType());
+		}
+		else
+		{
+			return Error(expression, "Not a list, tuple, or map instance");
+		}
+		expression.SetArgument(arg);
+		expression.SetChild(child);
+		return expression;
+	}
+	private Expression ResolveExpression(CallExpression expression)
+	{
+		return ResolveExpression(expression, false);
+	}
+	private Expression ResolveExpression(CallExpression expression, boolean allowFewerParameters)
+	{
+		// calc type of child
+		final Expression child = ResolveExpression(expression.child());
+		if (child == null)
+			return null;
+
+		assert(child.type() != null);
+
+		expression.SetChild(child);
+
+		if (child.type().kind() != TypeKind.FunctionType)
+		{
+			return Error(expression, "No function to call!");
+		}
+
+
+		final FunctionType funtype = (FunctionType)child.type();
+
+//		// check whether call of named action is allowed
+//		if (funtype.functionType() != FunctionTypeEnum.Method)
+//		{
+//			// see if call is allowed: must not be called from within a named action
+//			IScope callingScope = expression.scope();
+//			while (callingScope != null)
+//			{
+//				if (callingScope instanceof NamedActionIdentifier || callingScope instanceof MethodIdentifier)
+//					return Error(expression, "Call of named Action only allowed in do-od block!");
+//				callingScope = callingScope.GetParentScope();
+//			}
+//		}
+
+		// check arguments
+		final int argsSpec = funtype.parameter().size();
+		final int argsHave = expression.arguments().size();
+		if (argsHave < argsSpec && !allowFewerParameters)
+		{
+			return Error(expression, "Too few parameters in function call");
+		}
+		if (argsHave > argsSpec)
+		{
+			return Error(expression, "Too much parameters in function call");
+		}
+
+		final ArrayList<Expression> newargs = new ArrayList<Expression>();
+		final Iterator<UlyssesType> demandedArgType = funtype.parameter().iterator();
+		for (final Expression arg: expression.arguments())
+		{
+			final UlyssesType demandedArgTypeValue = demandedArgType.next();
+			Expression newarg = ResolveExpression(arg);
+			if (newarg == null)
+				return null;
+
+			if (newarg.GetUninitializedFreeVariables().size() > 0)
+				Error(arg, String.format("Undefined variable '%s'",
+					newarg.GetUninitializedFreeVariables().get(0).tokenText()));
+
+			final Expression constantvalue = newarg.kind() == ExpressionKind.Value ? newarg : null;
+
+			final UlyssesType acover = UlyssesType.CoverType(newarg.type(), demandedArgTypeValue);
+			if (acover == null || !UlyssesType.TypeEqualByKind(demandedArgTypeValue, acover))
+				return Error(arg, String.format("Argument type does not match; expected: %s delivered: %s",
+						demandedArgTypeValue.toString(), newarg.type().toString()));
+
+			newarg = UnaryOperator.TryCoerceUp(newarg, acover);
+
+			if (UlyssesType.FirstTypeLessRange(demandedArgTypeValue, acover))
+			{
+				if (constantvalue == null)
+				{
+					Warning(arg, String.format("Call parameter may over/underflow: %s := %s",
+							demandedArgTypeValue.toString(), acover.toString()));
+					final UnaryOperator cast = new UnaryOperator(ExpressionKind.Cast, newarg, newarg.line(), newarg.pos());
+					cast.SetType(demandedArgTypeValue);
+					newarg = cast;
+				}
+				else
+				{
+					Error(arg, String.format("Call parameter out of range (%s  := %s)",
+							demandedArgTypeValue.toString(), constantvalue.toString()));
+				}
+			}
+
+			newargs.add(newarg);
+		}
+		expression.SetArguments(newargs);
+
+		if (funtype.returnType() != null)
+			expression.SetType(funtype.returnType());
+		return expression;
+	}
+	private Expression ResolveExpression(AccessExpression expression)
+	{
+		Expression lhs = ResolveExpression(expression.left());
+		if (lhs == null)
+			return null;
+		if (!(expression.right() instanceof UnresolvedIdentifierExpression))
+		{
+			expression.SetRightChild(ResolveExpression(expression.right()));
+			expression.SetType(expression.right().type());
+			return expression;
+		}
+
+		final boolean selfAccess = (lhs.kind() == ExpressionKind.Identifier) && ((IdentifierExpression)lhs).isSelf();
+		final boolean staticAccess = lhs.kind() == ExpressionKind.Type;
+		final UnresolvedIdentifierExpression access = (UnresolvedIdentifierExpression)expression.right();
+		// atype could be null...
+		UlyssesType atype = lhs.type();
+		if ((lhs.kind() == ExpressionKind.Call) && (atype == null))
+		{
+			return Error(access, "Can not access return type of void-function");
+		}
+		else if (atype == null)
+		{
+			return Error(access, "Can not access member of a void type");
+		}
+
+		// if we did not apply a call expression to a function
+		if (atype.kind() == TypeKind.FunctionType)
+		{
+			// we can access the return val...
+			final FunctionType fun = (FunctionType)atype;
+
+			// check arity
+			if (fun.parameter().size() > 0)
+				return Error(access, "Implicit function call not possible: Too few parameters.");
+
+			// check return type
+			if (fun.returnType() == null)
+				return Error(access, "Can not access return type of void-function!");
+
+			// call ok
+			atype = fun.returnType();
+			// but add callExpression
+			lhs = new CallExpression(lhs, null, lhs.line(), lhs.pos(), null); // we do not know the scope
+			lhs.SetType(atype);
+		}
+
+		// update left child
+		expression.SetLeftChild(lhs);
+
+
+		switch (atype.kind())
+		{
+		case OoActionSystemType:
+			final Identifier anid = ((OoActionSystemType)atype).ResolveIdentifier(access.tokenText());
+			if (anid != null)
+			{
+				if (anid.kind() == IdentifierKind.MethodIdentifier && !m_entryExpression.callTargets().contains(anid))
+					m_entryExpression.callTargets().add((FunctionIdentifier)anid);
+
+				if (staticAccess)
+				{
+					if ((anid.kind() == IdentifierKind.AttributeIdentifier) &&
+							(((AttributeIdentifier)anid).isStatic()))
+					{
+						final IdentifierExpression newrhs = new IdentifierExpression(anid, access.line(), access.pos());
+						expression.SetRightChild(newrhs);
+					}
+					else
+						return Error(access, "Can not access non-static member of an action system");
+				}
+				else
+				{
+					if (anid.kind() != IdentifierKind.MethodIdentifier && !selfAccess)
+						return Error(access, "Can only access methods of action system objects");
+					else
+					{
+						final IdentifierExpression newrhs = new IdentifierExpression(anid, access.line(), access.pos());
+						expression.SetRightChild(newrhs);
+					}
+				}
+			}
+			else
+				return Error(access, String.format("%s no member of %s",
+						access.tokenText(), ((OoActionSystemType)atype).identifier().tokenText()));
+			break;
+		case EnumeratedType:
+			final EnumType anEnum = (EnumType)atype;
+			if (!staticAccess)
+			{
+				return Error(access, "Enum values can only be accessed statically.");
+			}
+			if (anEnum.symbolTable().Defined(access.tokenText()))
+			{
+				final Identifier enumid = anEnum.symbolTable().Get(access.tokenText());
+				final IdentifierExpression newrhs = new IdentifierExpression(enumid, access.line(), access.pos());
+				expression.SetRightChild(newrhs);
+			}
+			else
+				return Error(access, String.format("%s not contained in enum %s",
+						access.tokenText(), anEnum.identifier().tokenText()));
+			break;
+		case QrType:
+			final QrType aQualitativeType = (QrType)atype;
+			if (!staticAccess)
+			{
+				return Error(access, "QSpace values can only be accessed statically.");
+			}
+			if (aQualitativeType.symbolTable().Defined(access.tokenText()))
+			{
+				final Identifier landmark = aQualitativeType.symbolTable().Get(access.tokenText());
+				final IdentifierExpression newrhs = new IdentifierExpression(landmark, access.line(), access.pos());
+				expression.SetRightChild(newrhs);
+			}
+			else
+				return Error(access, String.format("%s not contained in qspace %s",
+						access.tokenText(), aQualitativeType.identifier().tokenText()));
+			break;
+		default:
+			/*error, we can not access an element with '.' in any other type*/
+			return Error(expression, "Expected: System, Enum, Func, or QR type");
+		}
+
+		expression.SetType(expression.right().type());
+		return expression;
+	}
+	private Expression ResolveExpression(UnaryOperator expression)
+	{
+		final Expression child = ResolveExpression(expression.child());
+		// if there was some error, then exit
+		if (child == null)
+			return null;
+
+		if (child.type() == null)
+			return Error(expression, "Can not apply unary operator to void-expression");
+
+
+		switch (expression.kind())
+		{
+		case Primed:
+			expression.SetType(child.type());
+			break;
+
+			/*map unary*/
+		case dom:           // map A to B -> list of A
+			if (child.type().kind() != TypeKind.MapType)
+				return Error(expression, "Domain operator only applicable to map types.");
+			MapType amap = (MapType)child.type();
+			ListType list = new ListType(amap.fromType(), amap.maxNumberOfElements(), null);
+			expression.SetType(list);
+			break;
+		case range:         // map A to B -> list of B
+			if (child.type().kind() != TypeKind.MapType)
+				return Error(expression, "Range operator only applicable to map types.");
+			amap = (MapType)child.type();
+			list = new ListType(amap.toType(), amap.maxNumberOfElements(), null);
+			expression.SetType(list);
+			break;
+		case merge:         // list of map A to B -> map A to B
+			if ((child.type().kind() == TypeKind.ListType) &&
+					(((ListType)child.type()).innerType().kind() == TypeKind.MapType))
+			{
+				expression.SetType(((ListType)child.type()).innerType());
+				break;
+			}
+			else
+				return Error(expression, "Merge operator only applicable to a list of maps");
+			/*set/list unary*/
+		case card:       // list of A -> int (does not respect dupes, i.e. dupes do not count)
+			if (child.type().kind() != TypeKind.ListType)
+				return Error(expression, "Cardinality operator only applicable to list types.");
+			expression.SetType(new IntType(0, ((ListType)child.type()).maxNumberOfElements(), null));
+			break;
+		case dconc:      // list of list of A -> list of A
+			if ((child.type().kind() == TypeKind.ListType)
+					&& (((ListType)child.type()).innerType().kind() == TypeKind.ListType))
+			{
+				list = (ListType)child.type();
+				final ListType innerlist = (ListType)list.innerType();
+				final int maxnumber = innerlist.maxNumberOfElements() * list.maxNumberOfElements();
+				expression.SetType(new ListType(innerlist.innerType(), maxnumber, null));
+				break;
+			}
+			else
+				return Error(expression, "Distributed Concatenation operator only applicable to list of lists");
+		case dinter:     // list of list of A -> list of A (intersection, does not respect dupes)
+			if ((child.type().kind() == TypeKind.ListType)
+					&& (((ListType)child.type()).innerType().kind() == TypeKind.ListType))
+			{
+				list = (ListType)child.type();
+				final ListType innerlist = (ListType)list.innerType();
+				final int maxnumber = innerlist.maxNumberOfElements();
+				expression.SetType(new ListType(innerlist.innerType(), maxnumber, null));
+				break;
+			}
+			else
+				return Error(expression, "Distributed Intersection operator only applicable to list of lists");
+		case dunion:     // list of list of A -> list of A (union, does not respect dupes)
+			if ((child.type().kind() == TypeKind.ListType)
+					&& (((ListType)child.type()).innerType().kind() == TypeKind.ListType))
+			{
+				list = (ListType)child.type();
+				final ListType innerlist = (ListType)list.innerType();
+				// better upper limit?!
+						final int maxnumber = innerlist.maxNumberOfElements() * list.maxNumberOfElements();
+						expression.SetType(new ListType(innerlist.innerType(), maxnumber, null));
+						break;
+			}
+			else
+				return Error(expression, "Distributed Union operator only applicable to list of lists");
+		case elems:      // list of A -> list of A (does not respect dupes)
+			if (child.type().kind() != TypeKind.ListType)
+				return Error(expression, "Element operator only applicable to list");
+			expression.SetType(child.type());
+			break;
+		case head:       // list of A -> A
+			if (child.type().kind() != TypeKind.ListType)
+				return Error(expression, "Head operator only applicable to list");
+			expression.SetType(((ListType)child.type()).innerType());
+			break;
+		case inds:       // list of A -> list of int
+			if (child.type().kind() != TypeKind.ListType)
+				return Error(expression, "Indices operator only applicable to list");
+			list = (ListType)child.type();
+			final IntType inner = new IntType(0, list.maxNumberOfElements(), null);
+			expression.SetType(new ListType(inner, list.maxNumberOfElements(), null));
+			break;
+		case len:        // list of A -> int (dupes count)
+			if (child.type().kind() != TypeKind.ListType)
+				return Error(expression, "Length operator only applicable to list");
+			list = (ListType)child.type();
+			expression.SetType(new IntType(0, list.maxNumberOfElements(), null));
+			break;
+		case tail:       // list of A -> list of A
+			if (child.type().kind() != TypeKind.ListType)
+				return Error(expression, "Tail operator only applicable to list");
+			list = (ListType)child.type();
+			if (list.maxNumberOfElements() == 0)
+				return Error(expression, "Tail operator only applicable to list of length > 0");
+			final int newmaxelems = list.maxNumberOfElements() - 1;
+			if (newmaxelems == 0)
+				Warning(expression, "Tail operator returns empty list.");
+			// set the return type null when list is empty?
+			expression.SetType(new ListType(list.innerType(), newmaxelems, null));
+			break;
+			/*unary numberic*/
+		case unminus:
+			if (!child.type().IsNumeric())
+				return Error(expression, "Unary minus only applicable to numeric types");
+			expression.SetType(Expression.ArithmeticCover(child.type(), null, expression.kind()));
+			break;
+		case unplus:
+			if (!child.type().IsNumeric())
+				return Error(expression, "Unary plus only applicable to numeric types");
+			expression.SetType(child.type());
+			break;
+		case abs:
+			if (!child.type().IsNumeric())
+				return Error(expression, "Abs only applicable to numeric types");
+			expression.SetType(child.type());
+			break;
+		case not:
+			if (/*!IsNumeric(child.type) && */
+					(child.type().kind() != TypeKind.BoolType))
+				return Error(expression, "Not only applicable to bool types");
+			expression.SetType(child.type());
+			break;
+			/*unary quantors*/
+		case forall:
+			expression.SetType(new BoolType(null));
+			break;
+		case exists:
+			expression.SetType(new BoolType(null));
+			break;
+		default:
+			throw new NotImplementedException();
+		}
+
+		expression.SetChild(child);
+		return expression;
+	}
+	@SuppressWarnings("unchecked")
+	private Expression ResolveExpression(BinaryOperator expression)
+	{
+		Expression lhs = ResolveExpression(expression.left());
+		Expression rhs = ResolveExpression(expression.right());
+
+
+		// if there was some error, then exit
+		if ((lhs == null) || (rhs == null))
+			return null;
+
+		final UlyssesType lt = lhs.type();
+		final UlyssesType rt = rhs.type();
+
+		if ((lt == null) || (rt == null))
+			return Error(expression, "Binary operator not applicable to void-type subexpression.");
+
+
+		switch (expression.kind())
+		{
+		/*map operators*/
+		case domresby:   // list of A * map A to B -> map A to B
+		case domresto:   // list of A * map A to B -> map A to B
+			if (lt.kind() != TypeKind.ListType)
+				return Error(expression, "Domain restriction operator expects list on LHS");
+			if (rt.kind() != TypeKind.MapType)
+				return Error(expression, "Domain restriction operator expects map on RHS");
+			ListType domlist = (ListType)lt;
+			MapType domMap = (MapType)rt;
+			if (!UlyssesType.TypeEqual(domlist.innerType(), domMap.fromType()))
+				return Error(expression, "Inner type of list and domain-type of map do not match");
+			// since this is a restriction, maxnumofelems is ok
+			expression.SetType(domMap);
+			break;
+		case rngresby:   // map A to B * list of B -> map A to B
+		case rngresto:   // map A to B * list of B -> map A to B
+			if (lt.kind() != TypeKind.MapType)
+				return Error(expression, "Range restriction operator expects map on LHS");
+			if (rt.kind() != TypeKind.ListType)
+				return Error(expression, "Rangle restriction operator expects list on RHS");
+			final ListType rangelist = (ListType)rt;
+			domMap = (MapType)lt;
+			if (!UlyssesType.TypeEqual(rangelist.innerType(), domMap.fromType()))
+				return Error(expression, "Inner type of list and rangle-type of map do not match");
+			// since this is a restriction, maxnumofelems is ok
+			expression.SetType(domMap);
+			break;
+		case munion:     // map A to B * map A to B -> map A to B
+			if (lt.kind() != TypeKind.MapType ||
+			rt.kind() != TypeKind.MapType)
+				return Error(expression, "Map union expects maps on LHS and RHS");
+			domMap = (MapType)lt;
+			MapType rngMap = (MapType)rt;
+			if (!UlyssesType.TypeEqual(domMap.fromType(), rngMap.fromType()) ||
+					!UlyssesType.TypeEqual(domMap.toType(), rngMap.toType()))
+				return Error(expression, "Domain and Range types of maps must be equal");
+			// union may change maximum number of elements..
+			final MapType resMap = new MapType(domMap.fromType(), domMap.toType(),
+					domMap.maxNumberOfElements() + rngMap.maxNumberOfElements(), null);
+			expression.SetType(resMap);
+			break;
+			/*set/list binary*/
+		case conc:       // list of A * list of A -> list of A
+			if (lt.kind() != TypeKind.ListType ||
+			rt.kind() != TypeKind.ListType)
+				return Error(expression, "List concatenation expects two lists.");
+			ListType la = (ListType)lt;
+			ListType lb = (ListType)rt;
+
+			if (lb.innerType().kind() == TypeKind.Null || lb.maxNumberOfElements() == 0)
+				return lhs;
+			if (la.innerType().kind() == TypeKind.Null || la.maxNumberOfElements() == 0)
+				return rhs;
+			if (!UlyssesType.TypeEqual(la.innerType(), lb.innerType()))
+				return Error(expression, String.format("Set/List concatenation expects two lists of same type. (%s <> %s)", la.toString(), lb.toString()));
+			ListType resultList = new ListType(la.innerType(),
+					la.maxNumberOfElements() + lb.maxNumberOfElements(), null);
+			expression.SetType(resultList);
+			break;
+		case diff:       // list of A * list of A -> list of A (does not respect dupes)
+			if (lt.kind() != TypeKind.ListType ||
+			rt.kind() != TypeKind.ListType)
+				return Error(expression, "Set difference expects two lists.");
+			la = (ListType)lt;
+			lb = (ListType)rt;
+			if (!UlyssesType.TypeEqual(la.innerType(), lb.innerType()))
+				return Error(expression, "Set difference expects two lists of same type.");
+			expression.SetType(la);
+			break;
+		case inter:      // list of A * list of A -> list of A (does not respect dupes)
+			if (lt.kind() != TypeKind.ListType ||
+			rt.kind() != TypeKind.ListType)
+				return Error(expression, "Set intersection expects two lists.");
+			la = (ListType)lt;
+			lb = (ListType)rt;
+			if (!UlyssesType.TypeEqual(la.innerType(), lb.innerType()))
+				return Error(expression, "Set intersection expects two lists of same type.");
+			expression.SetType(la.maxNumberOfElements() > lb.maxNumberOfElements() ? la : lb);
+			break;
+		case elemin:     // A * list of A -> bool
+		case notelemin:  // A * list of A -> bool
+			if (rt.kind() != TypeKind.ListType)
+				return Error(expression, "Element (not) in operator expects list-type as RHS.");
+			lb = (ListType)rt;
+			if (lhs.kind() == ExpressionKind.Value)
+				lhs = UnaryOperator.TryCoerceUp(lhs, lb.innerType());
+			final UlyssesType leftType = lhs.type();
+			if (!UlyssesType.TypeEqual(leftType, lb.innerType()))
+				return Error(expression, String.format("List and element must be of same type: %s in %s",
+						lt == null ? "<null>" : lt.toString(), lb ==null || lb.innerType() == null ? "<null>" : lb.innerType().toString()));
+			expression.SetType(new BoolType(null));
+			break;
+		case subset:     // list of A * list of A -> bool (does not respect dupes)
+			if (lt.kind() != TypeKind.ListType ||
+			rt.kind() != TypeKind.ListType)
+				return Error(expression, "Subset operation expects two lists.");
+			la = (ListType)lt;
+			lb = (ListType)rt;
+			if (!UlyssesType.TypeEqual(la.innerType(), lb.innerType()))
+				return Error(expression, "Subset operation expects two lists of same type.");
+			expression.SetType(new BoolType(null));
+			break;
+		case union:      // list of A * list of A -> list of A (does not respect dupes)
+			if (lt.kind() != TypeKind.ListType ||
+			rt.kind() != TypeKind.ListType)
+				return Error(expression, "Set union expects two lists.");
+			la = (ListType)lt;
+			lb = (ListType)rt;
+
+			if (la.innerType().kind() == TypeKind.Null || la.maxNumberOfElements() == 0)
+				return rhs;
+			if (lb.innerType().kind() == TypeKind.Null || lb.maxNumberOfElements() == 0)
+				return lhs;
+
+			if (!UlyssesType.TypeEqual(la.innerType(), lb.innerType()))
+				return Error(expression, "Set union expects two lists of same type.");
+			resultList = new ListType(la.innerType(),
+					la.maxNumberOfElements() + lb.maxNumberOfElements(), null);
+			expression.SetType(resultList);
+			break;
+
+			/*numeric binary*/
+		case pow:
+			if (!lt.IsNumeric() || !rt.IsNumeric())
+				return Error(expression, "Operator expects LHS and RHS to be numeric");
+			if (lt.kind() == TypeKind.IntType && rt.kind() == TypeKind.IntType)
+				expression.SetType(lt);
+			else
+				if (lt.kind() == TypeKind.FloatType)
+					expression.SetType(lt);
+				else
+				{
+					final IntType anint = (IntType)lt;
+					expression.SetType(new FloatType(anint.rangeLow(), anint.rangeHigh(),
+							FloatType.defaultPrecision(), null));
+				}
+			break;
+
+		case idiv:
+		case mod:
+			if (rt.kind() != TypeKind.IntType || lt.kind() != TypeKind.IntType)
+				return Error(expression, "Operator expects LHS and RHS to be integer");
+			expression.SetType(Expression.ArithmeticCover(lt, rt, expression.kind()));
+			break;
+		case div:
+			if (!rt.IsNumeric() || !lt.IsNumeric())
+				return Error(expression, "Operator expects LHS and RHS to be numeric");
+			if (lhs.type() instanceof ValuedEnumType)
+				lhs = UnaryOperator.TryCoerceUp(lhs, ((ValuedEnumType)lhs.type()).getIntType());
+			if (rhs.type() instanceof ValuedEnumType)
+				rhs = UnaryOperator.TryCoerceUp(rhs, ((ValuedEnumType)rhs.type()).getIntType());
+			UlyssesType cover = Expression.ArithmeticCover(lt, rt, expression.kind());
+			expression.SetType(cover);
+			break;
+		case minus:
+			if (!rt.IsNumeric() || !lt.IsNumeric())
+				return Error(expression, "Operator expects LHS and RHS to be numeric");
+			if (lhs.type() instanceof ValuedEnumType)
+				lhs = UnaryOperator.TryCoerceUp(lhs, ((ValuedEnumType)lhs.type()).getIntType());
+			if (rhs.type() instanceof ValuedEnumType)
+				rhs = UnaryOperator.TryCoerceUp(rhs, ((ValuedEnumType)rhs.type()).getIntType());
+			cover = Expression.ArithmeticCover(lt, rt, expression.kind());
+			expression.SetType(cover);
+			break;
+		case prod:
+			if (!rt.IsNumeric() || !lt.IsNumeric())
+				return Error(expression, "Operator expects LHS and RHS to be numeric");
+			if (lhs.type() instanceof ValuedEnumType)
+				lhs = UnaryOperator.TryCoerceUp(lhs, ((ValuedEnumType)lhs.type()).getIntType());
+			if (rhs.type() instanceof ValuedEnumType)
+				rhs = UnaryOperator.TryCoerceUp(rhs, ((ValuedEnumType)rhs.type()).getIntType());
+			cover = Expression.ArithmeticCover(lt, rt, expression.kind());
+			expression.SetType(cover);
+			break;
+		case sum:
+			if (!rt.IsNumeric() || !lt.IsNumeric())
+				return Error(expression, "Operator expects LHS and RHS to be numeric");
+			if (lhs.type() instanceof ValuedEnumType)
+				lhs = UnaryOperator.TryCoerceUp(lhs, ((ValuedEnumType)lhs.type()).getIntType());
+			if (rhs.type() instanceof ValuedEnumType)
+				rhs = UnaryOperator.TryCoerceUp(rhs, ((ValuedEnumType)rhs.type()).getIntType());
+			cover = Expression.ArithmeticCover(lt, rt, expression.kind());
+			expression.SetType(cover);
+			break;
+		case greater:
+		case greaterequal:
+		case less:
+		case lessequal:
+			if (!((rt.IsNumeric() && lt.IsNumeric()) || (rt.IsQualitative() && lt.IsQualitative())))
+				return Error(expression, "Operator expects LHS and RHS to be numeric or qualitative");
+			cover = UlyssesType.CoverType(lt, rt);
+			if (cover != null)
+			{
+				lhs = UnaryOperator.TryCoerceUp(lhs, cover);
+				rhs = UnaryOperator.TryCoerceUp(rhs, cover);
+				expression.SetType(new BoolType(null));
+			}
+			else
+				return Error(expression, String.format("Operator expects LHS and RHS to be of same type (%s <> %s)", lhs.type().toString(), rhs.type().toString()));
+			break;
+			/*bool binary*/
+		case and:
+			if (rt.kind() != TypeKind.BoolType || lt.kind() != TypeKind.BoolType)
+				return Error(expression, "Operator expects LHS and RHS of bool.");
+
+			expression.SetType(rt);
+			// little bit of optimization..
+			if (rhs.kind() == ExpressionKind.Value
+					&& ((ValueExpression<Boolean>)rhs).value() == false)
+				return rhs;
+			else if (lhs.kind() == ExpressionKind.Value
+					&& ((ValueExpression<Boolean>)lhs).value() == false)
+				return lhs;
+
+			// if both are true, then this will be taken care of in constant folding.
+			break;
+		case biimplies:
+			if (rt.kind() != TypeKind.BoolType || lt.kind() != TypeKind.BoolType)
+				return Error(expression, "Operator expects LHS and RHS of bool.");
+			expression.SetType(rt);
+			break;
+		case implies:
+			if (rt.kind() != TypeKind.BoolType || lt.kind() != TypeKind.BoolType)
+				return Error(expression, "Operator expects LHS and RHS of bool.");
+			expression.SetType(rt);
+
+			// ex falso...
+			if (lhs.kind() == ExpressionKind.Value
+					&& ((ValueExpression<Boolean>)lhs).value() == false)
+			{
+				final Expression shortcut = new ValueExpression<Boolean>(true, expression.line(), expression.pos(), Boolean.class);
+				shortcut.SetType(lt);
+				return shortcut;
+			}
+
+			break;
+		case or:
+			if (rt.kind() != TypeKind.BoolType || lt.kind() != TypeKind.BoolType)
+				return Error(expression, "Operator expects LHS and RHS of bool.");
+			expression.SetType(rt);
+
+			if (rhs.kind() == ExpressionKind.Value
+					&& ((ValueExpression<Boolean>)rhs).value() == true)
+				return rhs;
+			else if (lhs.kind() == ExpressionKind.Value
+					&& ((ValueExpression<Boolean>)lhs).value() == true)
+				return lhs;
+			break;
+			/*other binary*/
+		case equal:
+		case notequal:
+			cover = UlyssesType.CoverType(lt, rt);
+			if (cover != null)
+			{
+				/* see whether we have a tuple-matcher on one side.. */
+				if (expression.kind() == ExpressionKind.equal)
+				{
+					if (lhs.kind() == ExpressionKind.TupleConstr &&
+							((TupleConstructor)lhs).isMatcher())
+					{
+						if (rhs.kind() == ExpressionKind.TupleConstr &&
+								((TupleConstructor)rhs).isMatcher())
+							return Error(expression, "Free variables on both sides of the equality sign in tuple constructors.");
+						m_matcherList.remove(lhs);
+					}
+					else if (rhs.kind() == ExpressionKind.TupleConstr &&
+							((TupleConstructor)rhs).isMatcher())
+					{
+						if (lhs.kind() == ExpressionKind.TupleConstr &&
+								((TupleConstructor)lhs).isMatcher())
+							return Error(expression, "Free variables on both sides of the equality sign in tuple constructors.");
+						m_matcherList.remove(rhs);
+					}
+				}
+
+				lhs = UnaryOperator.TryCoerceUp(lhs, cover);
+				rhs = UnaryOperator.TryCoerceUp(rhs, cover);
+				expression.SetType(new BoolType(null));
+			}
+			else
+				return Error(expression, String.format("Operator expects LHS and RHS to be of same type (%s <> %s)", lhs.type().toString(), rhs.type().toString()));
+			break;
+		case seqmod_mapoverride:
+			if (rt.kind() != TypeKind.MapType)
+				return Error(expression, "Map expected as RHS on sequence modification or map override.");
+			// list of A * map int to A -> list of A or
+			if (lt.kind() == TypeKind.ListType)
+			{
+				// we're in sequence modification.
+				domlist = (ListType)lt;
+				rngMap = (MapType)rt;
+				if (rngMap.fromType().kind() != TypeKind.IntType)
+					return Error(expression, "Domain of map has to be integer");
+				if (!UlyssesType.TypeEqual(domlist.innerType(), rngMap.toType()))
+					return Error(expression, "Type of list expected to match range of map");
+				// since we only replace elements in the list (by matching ones from the map),
+				// we're save to return the original list..
+				expression.SetType(lt);
+			}
+			// map A to B * map A to B -> map A to B
+			else if (lt.kind() == TypeKind.MapType)
+			{
+				domMap = (MapType)lt;
+				rngMap = (MapType)rt;
+				if (!UlyssesType.TypeEqual(domMap.fromType(), rngMap.fromType()) ||
+						!UlyssesType.TypeEqual(domMap.toType(), rngMap.toType()))
+					return Error(expression, "Maps need same domain and range types");
+				// since we override entries in the first map:
+				expression.SetType(domMap);
+			}
+			else
+				return Error(expression, "Sequence Modification or Map override expects list or map as LHS");
+			break;
+		default:
+			throw new NotImplementedException();
+		}
+
+		// set subtrees.
+		expression.SetLeftChild(lhs);
+		expression.SetRightChild(rhs);
+
+		// we only allow:  a = MyTuple(c,d) style matchers
+		if (m_matcherList.size() > 0)
+		{
+			m_matcherList.clear();
+			return Error(expression, "Free variables in tuple constructor only allowed in expressions of the form 'atuple = ATupleConstructor(free1,free2...)'");
+		}
+
+		// try simple constant folding
+		return ApplyConstantFolding(expression);
+	}
+
+
+	///
+	///  We're also doing a bit of constant folding here.
+	///
+
+	@SuppressWarnings("unchecked")
+	private Expression ApplyConstantFolding(UnaryOperator expression)
+	{
+		final Expression child = expression.child();
+		if (child.type().IsNumeric() && expression.kind() == ExpressionKind.Cast)
+		{
+			switch (expression.type().kind())
+			{
+			case FloatType:
+				if (child.type().kind() == TypeKind.IntType && child.kind() == ExpressionKind.Value)
+				{
+					final Expression result = new ValueExpression<Double>((double)((ValueExpression<Integer>)child).value(), child.line(), child.pos(), Double.class);
+					result.SetType(expression.type());
+					return result;
+				}
+				break;
+			default:
+				break;
+			}
+		}
+		return expression;
+	}
+
+	@SuppressWarnings("unchecked")
+	private Expression ApplyConstantFolding(BinaryOperator expression)
+	{
+		Expression lhs = expression.left();
+		Expression rhs = expression.right();
+
+		if (lhs.kind() == ExpressionKind.Cast)
+		{
+			lhs = ApplyConstantFolding((UnaryOperator)lhs);
+			expression.SetLeftChild(lhs);
+		}
+		if (rhs.kind() == ExpressionKind.Cast)
+		{
+			rhs = ApplyConstantFolding((UnaryOperator)rhs);
+			expression.SetRightChild(rhs);
+		}
+
+
+		if (lhs.kind() == ExpressionKind.Value && rhs.kind() == ExpressionKind.Value)
+			if (expression.type().kind() == TypeKind.FloatType)
+			{
+				final double fval1 = ((ValueExpression<Double>)lhs).value();
+				final double fval2 = ((ValueExpression<Double>)rhs).value();
+				double result = 0;
+				switch (expression.kind())
+				{
+
+				case sum:
+					result = fval1 + fval2;
+					break;
+				case minus:
+					result = fval1 - fval2;
+					break;
+				case prod:
+					result = fval1 * fval2;
+					break;
+				case div:
+					if (fval2 == 0)
+						return Error(expression, "Division not defined");
+					result = fval1 / fval2;
+					break;
+				default:
+					// bail out, if we can not handle it
+					return expression;
+				}
+				if (result < ((FloatType)expression.type()).low()
+						|| result > ((FloatType)expression.type()).high())
+					return Error(expression, "Internal Error: value after constant folding not in float-range!");
+
+				final ValueExpression<Double> resexp = new ValueExpression<Double>(result, expression.line(), expression.pos(), Double.class);
+				resexp.SetType(expression.type());
+				return resexp;
+			}
+			else if (expression.type().kind() == TypeKind.IntType)
+			{
+				final int val1 = ((ValueExpression<Integer>)lhs).value();
+				final int val2 = ((ValueExpression<Integer>)rhs).value();
+				int result = 0;
+				switch (expression.kind())
+				{
+				case sum:
+					result = val1 + val2;
+					break;
+				case minus:
+					result = val1 - val2;
+					break;
+				case prod:
+					result = val1 * val2;
+					break;
+				case idiv:
+					if (val2 == 0)
+						return Error(expression, "Division not defined.");
+					result = val1 / val2;
+					break;
+				case mod:
+					result = val1 % val2;
+					break;
+				default:
+					// bail out, if we can not handle it
+					return expression;
+				}
+
+				if (result < ((IntType)expression.type()).rangeLow()
+						|| result > ((IntType)expression.type()).rangeHigh())
+					return Error(expression, "Internal Error: value after constant folding not in int-range!");
+
+				final ValueExpression<Integer> intres = new ValueExpression<Integer>(result, expression.line(), expression.pos(), Integer.class);
+				intres.SetType(expression.type());
+				return intres;
+			}
+			else if (expression.type().kind() == TypeKind.BoolType)
+			{
+				boolean result = false;
+				switch (expression.kind())
+				{
+				case greater:
+					assert(lhs.type().kind() == rhs.type().kind());
+					switch (lhs.type().kind())
+					{
+					case IntType:
+						result = ((ValueExpression<Integer>)lhs).value() >
+							((ValueExpression<Integer>)rhs).value();
+						break;
+					case FloatType:
+						result = ((ValueExpression<Double>)lhs).value() >
+							((ValueExpression<Double>)rhs).value();
+						break;
+					default:
+						return expression;
+					}
+					break;
+				case greaterequal:
+					assert(lhs.type().kind() == rhs.type().kind());
+					switch (lhs.type().kind())
+					{
+					case IntType:
+						result = ((ValueExpression<Integer>)lhs).value() >=
+							((ValueExpression<Integer>)rhs).value();
+						break;
+					case FloatType:
+						result = ((ValueExpression<Double>)lhs).value() >=
+							((ValueExpression<Double>)rhs).value();
+						break;
+					default:
+						return expression;
+					}
+					break;
+				case less:
+					assert(lhs.type().kind() == rhs.type().kind());
+					switch (lhs.type().kind())
+					{
+					case IntType:
+						result = ((ValueExpression<Integer>)lhs).value() <
+							((ValueExpression<Integer>)rhs).value();
+						break;
+					case FloatType:
+						result = ((ValueExpression<Double>)lhs).value() <
+							((ValueExpression<Double>)rhs).value();
+						break;
+					default:
+						return expression;
+					}
+					break;
+				case lessequal:
+					assert(lhs.type().kind() == rhs.type().kind());
+					switch (lhs.type().kind())
+					{
+					case IntType:
+						result = ((ValueExpression<Integer>)lhs).value() <=
+							((ValueExpression<Integer>)rhs).value();
+						break;
+					case FloatType:
+						result = ((ValueExpression<Double>)lhs).value() <=
+							((ValueExpression<Double>)rhs).value();
+						break;
+					default:
+						return expression;
+					}
+					break;
+				case and:
+					result = ((ValueExpression<Boolean>)lhs).value() && ((ValueExpression<Boolean>)rhs).value();
+					break;
+				case equal:
+					// we have to be careful here, since equal takes all sorts of types..
+					assert(lhs.type().kind() == rhs.type().kind());
+					switch (lhs.type().kind())
+					{
+					case BoolType:
+						result = ((ValueExpression<Boolean>)lhs).value() ==
+							((ValueExpression<Boolean>)rhs).value();
+						break;
+					case IntType:
+						result = ((ValueExpression<Integer>)lhs).value() ==
+							((ValueExpression<Integer>)rhs).value();
+						break;
+					case FloatType:
+						result = ((ValueExpression<Double>)lhs).value() ==
+							((ValueExpression<Double>)rhs).value();
+						break;
+					default:
+						return expression;
+					}
+					break;
+				case biimplies:
+					result = ((ValueExpression<Boolean>)lhs).value() == ((ValueExpression<Boolean>)rhs).value();
+					break;
+				case implies:
+					result = !((ValueExpression<Boolean>)lhs).value() || ((ValueExpression<Boolean>)rhs).value();
+					break;
+				case or:
+					result = ((ValueExpression<Boolean>)lhs).value() || ((ValueExpression<Boolean>)rhs).value();
+					break;
+				default:
+					return expression;
+				}
+				final ValueExpression<Boolean> boolres = new ValueExpression<Boolean>(result, expression.line(), expression.pos(), Boolean.class);
+				boolres.SetType(expression.type());
+				return boolres;
+			}
+
+		return expression;
+	}
+
+
+	///
+	///  "jump table" (could by avoided by 'dynamic' type as found in c#4)
+	///
+
+	@SuppressWarnings("unchecked")
+	private Expression ResolveExpression(Expression expression)
+	{
+		if (expression == null) return null;
+
+		Expression result = expression;
+
+		switch (expression.kind())
+		{
+		case Value:
+			final LeafExpression aValue = (LeafExpression)expression;
+			switch (aValue.valueType())
+			{
+			case bool:
+				expression.SetType(new BoolType(null));
+				break;
+			case chr:
+				expression.SetType(new CharType(null));// IntType(0, 255, null));
+				break;
+			case complex:
+			case identifier:
+				assert(false);
+				break;
+			case integer:
+				final int val = ((ValueExpression<Integer>)expression).value();
+				expression.SetType(new IntType(val, val, null));
+				break;
+			case qval:
+				throw new NotImplementedException();
+			case real:
+				final double fval = ((ValueExpression<Double>)expression).value();
+				expression.SetType(new FloatType(fval, fval, fval, null));
+				break;
+			case reference:
+				final Object aref = ((ValueExpression<?>)expression).value();
+				if (aref == null)
+					expression.SetType(new NullType());
+				else
+				{
+					assert(false);
+					return null;
+				}
+				break;
+			case unset:
+				throw new NotImplementedException();
+			default:
+				break;
+			}
+			result = expression;
+			break;
+
+			/* ternary operators */
+		case conditional:
+		case foldLR:
+		case foldRL:
+			result = ResolveExpression((TernaryOperator)expression);
+			break;
+
+			/* forall */
+		case forall:
+			result = ResolveExpression((ForallQuantifier)expression);
+			break;
+
+			/* exists */
+		case exists:
+			result = ResolveExpression((ExistsQuantifier)expression);
+			break;
+
+			/* constructors */
+		case ListConstr:
+			result = ResolveExpression((ListConstructor)expression);
+			break;
+		case SetConstr:
+			result = ResolveExpression((SetConstructor)expression);
+			break;
+		case MapConstr:
+			result = ResolveExpression((MapConstructor)expression);
+			break;
+		case TupleConstr:
+			result = ResolveExpression((TupleConstructor)expression);
+			break;
+		case ObjectConstr:
+			result = expression;
+			break;
+		case QValConstr:
+			result = ResolveExpression((QValConstructor)expression);
+			break;
+
+			/* identifiers */
+		case Identifier:
+			result = ResolveExpression((IdentifierExpression)expression);
+			break;
+		case UnresolvedIdentifier:
+			result = ResolveExpression((UnresolvedIdentifierExpression)expression);
+			break;
+
+			/* evaluate */
+		case TupleMapAccess:
+			result = ResolveExpression((TupleMapAccessExpression)expression);
+			break;
+		case Call:
+			result = ResolveExpression((CallExpression)expression);
+			break;
+
+			/* access some element within a class.. */
+		case Access:
+			result = ResolveExpression((AccessExpression)expression);
+			break;
+
+
+		case Cast:
+			final UnaryOperator cast = (UnaryOperator)expression;
+
+			/*prevent casts of complex datatypes, e.g. lists etc..*/
+			if (cast.type().kind() != TypeKind.OoActionSystemType)
+				return Error(cast, String.format("Cast operator needs class type as argument. (Expected: OoActionSystemType, Found: %s)", cast.type().kind().name()));
+
+			cast.SetChild(ResolveExpression(cast.child()));
+			final UlyssesType acover = UlyssesType.CoverType(cast.type(), cast.child().type());
+			final boolean upcast = UlyssesType.TypeEqual(acover, cast.type());           // the cast is safe; Mostly used in list constructors..
+			final boolean downcast = UlyssesType.TypeEqual(acover, cast.child().type()); // downcast, unsafe.
+			if (downcast)
+				Info(cast, String.format("Potentially unsafe downcast: %s as %s (cover: %s)",
+					cast.child().type().toString(), cast.type().toString(), acover.toString()));
+			if (acover == null || !(upcast || downcast))
+				return Error(cast, String.format("Invalid cast: %s as %s (cover: %s)",
+					cast.child().type().toString(), cast.type().toString(), acover != null ? acover.toString() : "<none>"));
+
+			result = cast;
+			break;
+
+			/* general unary operators */
+		case Primed:
+		case unminus:
+		case unplus:
+		case not:
+		case abs:
+		case dom:
+		case range:
+		case merge:
+		case card:
+		case dconc:
+		case dinter:
+		case dunion:
+		case elems:
+		case head:
+		case inds:
+		case len:
+		case tail:
+			result = ResolveExpression((UnaryOperator)expression);
+			break;
+
+			/* general binary operators */
+		case domresby:
+		case domresto:
+		case rngresby:
+		case rngresto:
+		case munion:
+		case conc:
+		case diff:
+		case inter:
+		case elemin:
+		case notelemin:
+		case subset:
+		case union:
+		case div:
+		case greater:
+		case greaterequal:
+		case idiv:
+		case less:
+		case lessequal:
+		case minus:
+		case mod:
+		case pow:
+		case prod:
+		case sum:
+		case and:
+		case biimplies:
+		case implies:
+		case or:
+		case equal:
+		case notequal:
+		case seqmod_mapoverride:
+			result = ResolveExpression((BinaryOperator)expression);
+			break;
+		default:
+			throw new NotImplementedException();
+		}
+
+		return result;
+	}
+
+
+	public Expression ResolveExpressionNewScope(Expression toResolve)
+	{
+		Expression result = null;
+
+		m_freeVariables.push(new SymbolTable());
+		try
+		{
+			result = ResolveExpression(toResolve);
+		}
+		finally
+		{
+			if (result != null)
+				result.SetFreeVariables(m_freeVariables.pop());
+		}
+		return result;
+	}
+
+
+	///
+	///  called for every element in the ast
+	///
+
+	@Override
+	protected void VisitAstElement(IAst subElement, IAst parent)
+	{
+		if (subElement.nodeType() == AstNodeTypeEnum.expression)
+		{
+			// calculate a new (resolved) expression
+			m_freeVariables.push(new SymbolTable());
+			// save toplevel -- used to keep track of method calls.
+			m_entryExpression = (Expression)subElement;
+
+			final Expression newExpression = ResolveExpression(m_entryExpression);
+			// replace the expression in the parent
+			if (newExpression != null)
+			{
+				newExpression.SetFreeVariables(m_freeVariables.pop());
+				ReplaceExpression(parent, (Expression)subElement, newExpression);
+			}
+
+		}
+		else
+			subElement.Accept(this); // saves us the call to base.VisitAstElement
+	}
+
+
+	///
+	///  PUBLIC METHODS
+	///
+
+	public OoaResolveExpressionsVisitor(ParserState aState)
+	{
+		super (aState);
+		if (aState == null)
+			throw new ArgumentException();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaReplaceOpaqueVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaReplaceOpaqueVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaReplaceOpaqueVisitor.java	(revision 2)
@@ -0,0 +1,186 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.LocalVariableIdentifier;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+
+/// <summary>
+/// Replaces all Opaque types (types we could not resolve in the first run of the parser)
+/// with the resolved ones. Note: The actual resolving has already been done, i.e., the
+/// resolvedType member is already set to the correct value. Now we just want to get an
+/// AST that does not contain any OpaqueTypeNodes at all.
+/// </summary>
+public final class OoaReplaceOpaqueVisitor extends OoaCompleteAstTraversalVisitor
+{
+
+	private void ReplaceOpaque(IAst parent)
+	{
+		switch (parent.nodeType())
+		{
+		case type:
+			ReplaceOpaqueInType((UlyssesType)parent);
+			break;
+		case identifier:
+			ReplaceOpaqueInIdentifier((Identifier)parent);
+			break;
+		case expression:
+			ReplaceOpaqueInExpression((Expression)parent);
+			break;
+		default:
+			throw new NotImplementedException();
+		}
+	}
+
+
+	private void ReplaceOpaqueInExpression(Expression expression)
+	{
+		switch (expression.kind())
+		{
+		case ObjectConstr:
+			ObjectConstructor c = (ObjectConstructor)expression;
+			c.SetType(((OpaqueType)c.type()).resolvedType());
+			break;
+		case Cast:
+			UnaryOperator unop = (UnaryOperator)expression;
+			unop.SetType(((OpaqueType)unop.type()).resolvedType());
+			break;
+		default:
+			throw new NotImplementedException();
+		}
+	}
+
+
+	private void ReplaceOpaqueInIdentifier(Identifier identifier)
+	{
+		switch (identifier.kind())
+		{
+		case AttributeIdentifier:
+			AttributeIdentifier id = (AttributeIdentifier)identifier;
+			assert(id.type() instanceof OpaqueType); // that's why we are here
+			id.SetType(((OpaqueType)id.type()).resolvedType());
+			break;
+		case ExpressionVariableIdentifier:
+			ExpressionVariableIdentifier exprvar = (ExpressionVariableIdentifier)identifier;
+			assert(exprvar.type() instanceof OpaqueType);
+			exprvar.SetType(((OpaqueType)exprvar.type()).resolvedType());
+			break;
+		case LocalVariableIdentifier:
+			LocalVariableIdentifier var = (LocalVariableIdentifier)identifier;
+			assert(var.type() instanceof OpaqueType);
+			var.SetType(((OpaqueType)var.type()).resolvedType());
+			break;
+		case ParameterIdentifier:
+			ParameterIdentifier param = (ParameterIdentifier)identifier;
+			assert(param.type() instanceof OpaqueType);
+			param.SetType(((OpaqueType)identifier.type()).resolvedType());
+			break;
+		default:
+			throw new NotImplementedException();
+		}
+	}
+
+	private void ReplaceOpaqueInType(UlyssesType ulyssesType)
+	{
+		switch (ulyssesType.kind())
+		{
+		case FunctionType:
+			FunctionType func = (FunctionType)ulyssesType;
+			if (func.returnType() instanceof OpaqueType)
+				func.SetReturnType(((OpaqueType)func.returnType()).resolvedType());
+
+			for (int cntr = 0; cntr < func.parameter().size(); cntr ++)
+			{
+				UlyssesType t = func.parameter().get(cntr);
+				if (t.kind() == TypeKind.OpaqueType)
+					func.parameter().set(cntr, ((OpaqueType)t).resolvedType());
+			}
+			break;
+		case ListType:
+			ListType alist = (ListType)ulyssesType;
+			if (alist.innerType().kind() == TypeKind.OpaqueType)
+				alist.SetInnerType(((OpaqueType)alist.innerType()).resolvedType());
+			break;
+		case MapType:
+			MapType aMap = (MapType)ulyssesType;
+			if (aMap.fromType().kind() == TypeKind.OpaqueType)
+				aMap.SetFromType(((OpaqueType)aMap.fromType()).resolvedType());
+			if (aMap.toType().kind() == TypeKind.OpaqueType)
+				aMap.SetToType(((OpaqueType)aMap.toType()).resolvedType());
+			break;
+			/*case TypeKind.OoActionSystemType:
+               // handeled by the other cases...
+                break;*/
+			case TupleType:
+				TupleType aTuple = (TupleType)ulyssesType;
+				for (int cntr = 0; cntr < aTuple.innerTypes().size(); cntr ++) {
+					UlyssesType t = aTuple.innerTypes().get(cntr);
+					if (t.kind() == TypeKind.OpaqueType)
+						aTuple.innerTypes().set(cntr, ((OpaqueType)t).resolvedType());
+				}
+				break;
+			default:
+				throw new NotImplementedException();
+		}
+	}
+
+	@Override
+	protected void VisitAstElement(IAst subElement, IAst parent)
+	{
+		super.VisitAstElement(subElement, parent);
+
+		/*see whether the subElement is an OpaqueType, we need
+          to replace.*/
+		if ((subElement != null)
+				&& (subElement.nodeType() == AstNodeTypeEnum.type)
+				&& (((UlyssesType)subElement).kind() == TypeKind.OpaqueType))
+			ReplaceOpaque(parent);
+	}
+
+	public OoaReplaceOpaqueVisitor(ParserState aState)
+	{
+		super(aState);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/SeqIdentifierList.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/SeqIdentifierList.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/SeqIdentifierList.java	(revision 2)
@@ -0,0 +1,51 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+public final class SeqIdentifierList extends IdentifierList
+{
+	public SeqIdentifierList()
+	{
+		super (IdentifierListType.seqential);
+	}
+
+	public SeqIdentifierList(IdentifierList aParent)
+	{
+		super (IdentifierListType.seqential);
+		if (aParent != null)
+			aParent.AddElement(this);
+	}
+
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaPrintMetricsVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaPrintMetricsVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaPrintMetricsVisitor.java	(revision 2)
@@ -0,0 +1,192 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors.analysis;
+
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.LocalVariableIdentifier;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.Module;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.statements.AbortStatement;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.BreakStatement;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.KillStatement;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.SkipStatement;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.parser.ParserMessage;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+public final class OoaPrintMetricsVisitor extends OoaCompleteAstTraversalVisitor {
+
+	protected int m_modules = 0;
+	protected int m_actions = 0;
+	protected int m_methods = 0;
+	protected int m_statements = 0;
+	protected int m_actionSystems = 0;
+	protected int m_attributes = 0;
+	protected int m_namedTypes = 0;
+	protected int m_blocks = 0;
+	protected int m_localVars = 0;
+
+	public int getNumberOfModules() {return m_modules;}
+	public int getNumberOfActions() {return m_actions;}
+	public int getNumberOfMethods() {return m_methods;}
+	public int getNumberOfStatements()     {return m_statements;}
+	public int getNumberOfActionSystems()  {return m_actionSystems;}
+	public int getNumberOfGlobalVariables(){return m_attributes;}
+
+	@Override
+	public String toString() {
+		return String.format("# Modules: %s, # Actions: %s, # Methods: %s, # Statements: %s, # ActionsSystems: %s, # Attributes: %s, # Named Types %s, # Blocks: %s, # Local Vars: %s",
+				m_modules, m_actions, m_methods, m_statements, m_actionSystems, m_attributes, m_namedTypes, m_blocks, m_localVars);
+	}
+
+	@Override
+	public void done() {
+		m_ParserState.AddMessage(new ParserMessage(m_ParserState.filename, 0,0, "OOAS Metrics:\n\t" + toString()));
+	}
+
+	@Override
+	public void visit(LocalVariableIdentifier localVariableIdentifier) {
+		m_localVars++;
+		super.visit(localVariableIdentifier);
+	}
+
+	@Override
+	public void visit(NondetBlock nondetBlock) {
+		m_blocks++;
+		super.visit(nondetBlock);
+	}
+	@Override
+	public void visit(PrioBlock prioBlock) {
+		m_blocks++;
+		super.visit(prioBlock);
+	}
+	@Override
+	public void visit(SeqBlock seqBlock) {
+		m_blocks++;
+		super.visit(seqBlock);
+	}
+
+	@Override
+	public void visit(TypeIdentifier typeIdentifier) {
+		m_namedTypes++;
+		super.visit(typeIdentifier);
+	}
+
+	@Override
+	public void visit(AbortStatement abortStatement) {
+		m_statements++;
+		super.visit(abortStatement);
+	}
+
+	@Override
+	public void visit(Assignment assignment) {
+		m_statements++;
+		super.visit(assignment);
+	}
+
+	@Override
+	public void visit(AttributeIdentifier attributeIdentifier) {
+		m_attributes++;
+		super.visit(attributeIdentifier);
+	}
+
+	@Override
+	public void visit(BreakStatement breakStatement) {
+		m_statements++;
+		super.visit(breakStatement);
+	}
+
+	@Override
+	public void visit(Call call) {
+		m_statements++;
+		super.visit(call);
+	}
+
+	@Override
+	public void visit(GuardedCommand guardedCommand) {
+		m_statements++;
+		super.visit(guardedCommand);
+	}
+
+	@Override
+	public void visit(KillStatement killStatement) {
+		m_statements++;
+		super.visit(killStatement);
+	}
+
+	@Override
+	public void visit(MainModule mainModule) {
+		m_modules++;
+		super.visit(mainModule);
+	}
+
+	@Override
+	public void visit(MethodIdentifier methodIdentifier) {
+		m_methods++;
+		super.visit(methodIdentifier);
+	}
+
+	@Override
+	public void visit(Module module) {
+		m_modules++;
+		super.visit(module);
+	}
+
+	@Override
+	public void visit(NamedActionIdentifier namedActionIdentifier) {
+		m_actions++;
+		super.visit(namedActionIdentifier);
+	}
+
+	@Override
+	public void visit(OoActionSystemType ooActionSystemType) {
+		m_actionSystems++;
+		super.visit(ooActionSystemType);
+	}
+
+	@Override
+	public void visit(SkipStatement skipStatement) {
+		m_statements++;
+		super.visit(skipStatement);
+	}
+
+	public OoaPrintMetricsVisitor(ParserState aState) {
+		super(aState, false);
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypeCheckVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypeCheckVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypeCheckVisitor.java	(revision 2)
@@ -0,0 +1,473 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import java.util.ArrayList;
+import java.util.ListIterator;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.KillStatement;
+import org.momut.ooas.ast.statements.QualitativeConstraintStatement;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.parser.ParserError;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.parser.ParserWarning;
+import org.momut.ooas.parser.SymbolTable;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.utils.exceptions.OoasCompilerRuntimeException;
+
+/// <summary>
+/// Requires: ResolveExpressionVisitor and MethodPureClassifierVisitor
+///
+/// Does the typechecking of statements and initializers.
+/// Needs resolved expressions, hence a run of ResolveVisitor first.
+/// </summary>
+public final class OoaTypeCheckVisitor extends OoaCompleteAstTraversalVisitor
+{
+
+	/// <summary>
+	/// internal; used to count occurrences of attribute access in an expression
+	/// </summary>
+	private static final class OoaInitializerCheck extends OoaExpressionVisitor
+	{
+		ArrayList<Identifier> attributeAccess = new ArrayList<Identifier>();
+
+		@Override
+		public void visit(IdentifierExpression identifierExpression)
+		{
+			final Identifier id = identifierExpression.identifier();
+			if (id.kind() == IdentifierKind.AttributeIdentifier)
+				attributeAccess.add(id);
+			super.visit(identifierExpression);
+		}
+
+	}
+
+
+
+
+	private void Error(Statement statement, String p)
+	{
+		final ParserError error = new ParserError(m_ParserState.filename,
+				statement.line(), statement.pos(), p);
+		m_ParserState.AddErrorMessage(error);
+	}
+	private void Error(Identifier id, String p)
+	{
+		final ParserError error = new ParserError(m_ParserState.filename,
+				id.line(), id.column(), p);
+		m_ParserState.AddErrorMessage(error);
+	}
+
+
+
+	private void Warning(Statement aStatement, String p)
+	{
+		final ParserWarning warn = new ParserWarning(m_ParserState.filename,
+				aStatement.line(), aStatement.pos(), p);
+		m_ParserState.AddWarningMessage(warn);
+	}
+	private void Warning(Identifier aStatement, String p)
+	{
+		final ParserWarning warn = new ParserWarning(m_ParserState.filename,
+				aStatement.line(), aStatement.column(), p);
+		m_ParserState.AddWarningMessage(warn);
+	}
+
+
+
+	private void RemoveWarning(Identifier expression, String p)
+	{
+		final ArrayList<ParserWarning> toRemove = new ArrayList<ParserWarning>();
+		for (final ParserWarning x: m_ParserState.listOfParserWarnings)
+		{
+			if (p.equals(x.message()) && x.line() == expression.line() && x.column() == expression.column())
+				toRemove.add(x);
+		}
+		for (final ParserWarning x: toRemove)
+			m_ParserState.listOfParserWarnings.remove(x);
+	}
+
+	private void TypeCheckGuardedCommand(GuardedCommand gc)
+	{
+		if (gc.guard().type() == null ||
+				gc.guard().type().kind() != TypeKind.BoolType)
+			Error(gc, "Guard needs to be boolean expression");
+
+		final ArrayList<ExpressionVariableIdentifier> uninitfree = gc.guard().GetUninitializedFreeVariables();
+		if (uninitfree.size() > 0)
+			Error(gc, String.format("Undefined variable: '%s'", uninitfree.get(0).tokenText()));
+
+		CheckMethodCallsArePure(gc.guard());
+
+		gc.body().Accept(this);
+	}
+
+	private void CheckMethodCallsArePure(Expression expression)
+	{
+		for (final FunctionIdentifier method: expression.callTargets())
+		{
+			if (!((FunctionType)method.type()).isPureFunction())
+				Error(method, String.format("Method '%s' needs to be pure: No change of state allowed.", method.tokenText()));
+		}
+	}
+
+
+	private void TypeCheckAssignment(Assignment assignment)
+	{
+		SymbolTable freevars = new SymbolTable();
+		if (assignment.nondetExpression() != null)
+		{
+			CheckMethodCallsArePure(assignment.nondetExpression());
+
+			if (assignment.nondetExpression().freeVariables() != null
+					&& assignment.nondetExpression().freeVariables().symbolList().size() > 0)
+			{
+				// expression has free variables we need to match with right-hand-side of assignment.
+				freevars = assignment.nondetExpression().freeVariables();
+
+				for (final Expression aRhsExpr: assignment.values())
+				{
+					if (aRhsExpr.freeVariables() != null)
+						for (final Identifier freeRhsVar: aRhsExpr.freeVariables().symbolList())
+						{
+							if (freevars.Defined(freeRhsVar.tokenText()))
+							{
+								final Identifier exprvar = freevars.Get(freeRhsVar.tokenText());
+								if (freeRhsVar.type().kind() == TypeKind.Any)
+								{
+									freeRhsVar.SetType(exprvar.type());
+									assignment.AddIdentifier(exprvar, null);
+									// remove free variable warnings
+									RemoveWarning(exprvar, String.format("Free variable in expression: '%s'.", exprvar.tokenText()));
+									RemoveWarning(freeRhsVar, String.format("Free variable in expression: '%s'.", exprvar.tokenText()));
+								}
+								else if (UlyssesType.TypeEqual(freeRhsVar.type(), exprvar.type()))
+								{
+									assignment.AddIdentifier(exprvar, null);
+									// remove free variable warnings
+									RemoveWarning(exprvar, String.format("Free variable in expression: '%s'.", exprvar.tokenText()));
+									RemoveWarning(freeRhsVar, String.format("Free variable in expression: '%s'.", exprvar.tokenText()));
+								}
+								else
+									Error(assignment, String.format("Type mismatch on variable %s: %s <> %s", freeRhsVar.tokenText(), freeRhsVar.type().toString(), exprvar.type().toString()));
+							}
+							else
+								Error(assignment, String.format("Undefined variable '%s'", freeRhsVar.tokenText()));
+						}
+				}
+			}
+		}
+
+		for (final Identifier avar: freevars.symbolList())
+			if (!assignment.symbols().Defined(avar.tokenText()))
+				Error(assignment, String.format("Undefined variable '%s'", avar.tokenText()));
+
+		if (assignment.places().size() != assignment.values().size())
+		{
+			Error(assignment, "Number of places does not match number of values in assignment.");
+			//return;
+		}
+
+		final ListIterator<Expression> aplaceIt = assignment.places().listIterator();
+		final ListIterator<Expression> avalueIt = assignment.values().listIterator();
+		while (aplaceIt.hasNext() && avalueIt.hasNext())
+		{
+			final Expression aplace = aplaceIt.next();
+			Expression avalue = avalueIt.next();
+
+			CheckPlace(aplace, assignment);
+
+			// we allow non-pure methods only for assignments of the form 'variable := function(x,y)'
+			if (avalue.kind() != ExpressionKind.Call)
+				CheckMethodCallsArePure(avalue);
+
+			final UlyssesType acover = UlyssesType.CoverType(aplace.type(), avalue.type());
+			if (acover == null)
+				Error(assignment, String.format("Type mismatch in assignment: %s ( %s := %s )", aplace.toString(), aplace.type().toString(), avalue.type().toString()));
+			else if (!UlyssesType.TypeEqualByKind(aplace.type(), acover)) /*ignore range things.. (see warning below)*/
+				Error(assignment, String.format("Type mismatch in assignment: %s ( %s := %s )", aplace.toString(), aplace.type().toString(), acover.toString()));
+			else
+			{
+				final ArrayList<ExpressionVariableIdentifier> uninitvars = avalue.GetUninitializedFreeVariables();
+				final Expression constantvalue = avalue.kind() == ExpressionKind.Value ? avalue : null;
+
+				if (uninitvars.size() > 0)
+					Error(assignment, String.format("Undefined variable '%s'", uninitvars.get(0).tokenText()));
+
+				if (!UlyssesType.TypeEqual(avalue.type(), acover))
+				{
+					final UnaryOperator cast = new UnaryOperator(ExpressionKind.Cast, avalue, avalue.line(), avalue.pos());
+					cast.SetType(acover);
+					avalueIt.remove();
+					avalueIt.add(cast);
+					avalue = avalueIt.previous();
+					if (avalue != cast)
+						throw new OoasCompilerRuntimeException();
+				}
+
+				if (UlyssesType.FirstTypeLessRange(aplace.type(), acover))
+				{
+					if (constantvalue == null)
+					{
+						Warning(assignment, String.format("Assignment may over/underflow: %s := %s", aplace.type().toString(), acover.toString()));
+						final UnaryOperator cast = new UnaryOperator(ExpressionKind.Cast, avalue, avalue.line(), avalue.pos());
+						cast.SetType(aplace.type());
+						avalueIt.remove();
+						avalueIt.add(cast);
+						avalue = avalueIt.previous();
+						if (avalue != cast)
+							throw new OoasCompilerRuntimeException();
+					}
+					else
+					{
+						Error(assignment, String.format("Assignment out of range (%s  := %s)", aplace.toString(), constantvalue.toString()));
+					}
+				}
+			}
+		}
+	}
+
+	/// <summary>
+	/// Checks whether the LHS-expression of an assignment is a valid place.
+	/// IMPORTANT: If more complicated LHS expressions are allowed, then
+	///            ooaPrologExpression.cs needs to be adapted too!
+	/// </summary>
+	private void CheckPlace(Expression expression, Assignment assignment)
+	{
+		// check that we have some LHS of following forms
+		// self.<var/attr>
+		// attr[..]
+		boolean result = true;
+
+		// one array/map access allowed
+		if (expression.kind() == ExpressionKind.TupleMapAccess)
+		{
+			final TupleMapAccessExpression tAccessExpression = (TupleMapAccessExpression)expression;
+			expression = tAccessExpression.child();
+		}
+
+		// attributes feature a self ref
+		if (expression.kind() == ExpressionKind.Access)
+		{
+			final AccessExpression accessExpression = (AccessExpression)expression;
+			if (accessExpression.left().kind() == ExpressionKind.Identifier && ((IdentifierExpression)accessExpression.left()).isSelf())
+				expression = accessExpression.right();
+			else
+				result = false;
+		}
+
+		// now we need to have an identifier
+		if (expression.kind() != ExpressionKind.Identifier)
+			result = false;
+
+		if (!result)
+			Error(assignment, String.format("LHS of assignment must be variable or attribute."));
+	}
+
+
+	private void TypeCheckQualConstraint(QualitativeConstraintStatement qualConstr)
+	{
+		if (qualConstr.variable0().type().kind() != TypeKind.QrType && qualConstr.variable0().type().kind() != TypeKind.Any)
+			Error(qualConstr, String.format("Qualitative type expected: '%s'", qualConstr.variable0().tokenText()));
+		if (qualConstr.variable1().type().kind() != TypeKind.QrType && qualConstr.variable1().type().kind() != TypeKind.Any)
+			Error(qualConstr, String.format("Qualitative type expected: '%s'", qualConstr.variable0().tokenText()));
+		if (qualConstr.variable2() != null && qualConstr.variable2().type().kind() != TypeKind.QrType
+				&& qualConstr.variable2().type().kind() != TypeKind.Any)
+			Error(qualConstr, String.format("Qualitative type expected: '%s'", qualConstr.variable0().tokenText()));
+	}
+	private void TypeCheck(Statement statement)
+	{
+		switch (statement.kind())
+		{
+		case Abort:
+		case Skip:
+		case Break:
+			break;
+
+		case NondetBlock:
+		case PrioBlock:
+		case SeqBlock:
+			statement.Accept(this);
+			break;
+
+		case Assignment:
+			final Assignment assignment = (Assignment)statement;
+			TypeCheckAssignment(assignment);
+			break;
+		case GuardedCommand:
+			final GuardedCommand gc = (GuardedCommand)statement;
+			TypeCheckGuardedCommand(gc);
+			break;
+		case Kill:
+			final KillStatement kill = (KillStatement)statement;
+			if (kill.someOne.type().kind() != TypeKind.OoActionSystemType)
+				Error(kill, String.format(" %s not an object", kill.someOne.tokenText()));
+			break;
+		case MethodCall:
+			final Call callstatement = (Call)statement;
+			if (callstatement.callExpression().GetUninitializedFreeVariables().size() > 0)
+				Error(callstatement, "Uninitialized free variables in call expression.");
+			if (callstatement.callExpression().kind() != ExpressionKind.Call
+					&& callstatement.callExpression().kind() != ExpressionKind.foldRL
+					&& callstatement.callExpression().kind() != ExpressionKind.foldLR)
+				Error(callstatement, "Not a valid method call");
+			break;
+		case QualConstraint:
+			final QualitativeConstraintStatement qualConstr = (QualitativeConstraintStatement)statement;
+			TypeCheckQualConstraint(qualConstr);
+			break;
+		default:
+			throw new NotImplementedException();
+		}
+	}
+
+	//private void TypeCheck()
+
+	private void TypeCheck(AttributeIdentifier attributeIdentifier)
+	{
+		if (attributeIdentifier.initializer() == null)
+			throw new ArgumentException();
+
+		final UlyssesType atype = attributeIdentifier.initializer().type();
+		if (atype == null)
+			Error(attributeIdentifier, "Initializer lacks type.");
+		else
+		{
+			/* we use the typecheck to validate a few more properties of the initializer that
+			 * need a completely resolved expression
+			 */
+			final OoaInitializerCheck initCheck = new OoaInitializerCheck();
+			attributeIdentifier.initializer().Accept(initCheck);
+			if (initCheck.attributeAccess.size() > 0)
+				// disallow use of other attributes in initializer
+				Error(attributeIdentifier, "Access of other attributes not allowed in attribute initializer.");
+			else if (attributeIdentifier.initializer().callTargets().size() > 0)
+				// disallow method calls in initializer
+				Error(attributeIdentifier, "Method calls not allowed in attribute initializer.");
+			else if (attributeIdentifier.initializer().freeVariables().symbolList().size() > 0)
+				// disallow use of free variables in initializer
+				Error(attributeIdentifier,
+						String.format("Unknown identifier in initializer: '%s'",
+								attributeIdentifier.initializer().freeVariables().symbolList().get(0).tokenText()));
+			else
+			{
+				final UlyssesType idtype = attributeIdentifier.type();
+				final UlyssesType acover = UlyssesType.CoverType(idtype, atype);
+
+				if (acover == null)
+					Error(attributeIdentifier, String.format("Type mismatch in attribute initializer: %s ( %s := %s )", attributeIdentifier.toString(), idtype.toString(), atype.toString()));
+				else if (!UlyssesType.TypeEqualByKind(idtype, acover)) /*ignore range things.. (see warning below)*/
+					Error(attributeIdentifier, String.format("Type mismatch in attribute initializer: %s ( %s := %s )", attributeIdentifier.toString(), idtype.toString(), acover.toString()));
+				else
+				{
+					final Expression constantvalue = attributeIdentifier.initializer().kind() == ExpressionKind.Value ? attributeIdentifier.initializer() : null;
+
+					if (!UlyssesType.TypeEqual(atype, acover))
+					{
+						final UnaryOperator cast = new UnaryOperator(ExpressionKind.Cast, attributeIdentifier.initializer(),
+								attributeIdentifier.initializer().line(), attributeIdentifier.initializer().pos());
+						cast.SetType(acover);
+						attributeIdentifier.SetInitializer(cast);
+					}
+
+					if (UlyssesType.FirstTypeLessRange(idtype, acover))
+					{
+						if (constantvalue == null)
+						{
+							Warning(attributeIdentifier, String.format("Assignment may over/underflow: %s := %s", idtype.toString(), acover.toString()));
+							final UnaryOperator cast = new UnaryOperator(ExpressionKind.Cast, attributeIdentifier.initializer(),
+									attributeIdentifier.initializer().line(), attributeIdentifier.initializer().pos());
+							cast.SetType(idtype);
+							attributeIdentifier.SetInitializer(cast);
+						}
+						else
+						{
+							Error(attributeIdentifier, String.format("Initialization out of range (%s  := %s)", attributeIdentifier.toString(), constantvalue.toString()));
+						}
+					}
+				}
+
+				/*
+
+
+                if (cover == null || !UlyssesType.TypeEqual(cover, idtype))
+                    Error(attributeIdentifier,
+                        String.Format("Type mismatch in attribute initializer: expected '%s', found '%s'",
+                            idtype.ToString(), atype.ToString()));
+                else
+                    attributeIdentifier.SetInitializer(UnaryOperator.CoerceUp(attributeIdentifier.initializer, idtype));
+				 * */
+			}
+		}
+	}
+
+
+	@Override
+	protected void VisitAstElement(IAst element, IAst parent)
+	{
+		if (element.nodeType() == AstNodeTypeEnum.statement)
+		{
+			TypeCheck((Statement)element);
+		}
+		else if (element.nodeType() == AstNodeTypeEnum.identifier
+				&& ((Identifier)element).kind() == IdentifierKind.AttributeIdentifier)
+		{
+			TypeCheck((AttributeIdentifier)element);
+		}
+		else super.VisitAstElement(element, parent);
+	}
+
+
+
+	public OoaTypeCheckVisitor(ParserState aState)
+	{
+		super (aState);
+		if (aState == null)
+			throw new ArgumentException();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypeRenameVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypeRenameVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypeRenameVisitor.java	(revision 2)
@@ -0,0 +1,53 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+
+public final class OoaTypeRenameVisitor extends OoaCompleteAstTraversalVisitor
+{
+	@Override
+	public void visit(TypeIdentifier typeIdentifier)
+	{
+		if (!typeIdentifier.type().isAnonymousType())
+			typeIdentifier.prefix = m_ParserState.namesTypePrefix;
+
+		super.visit(typeIdentifier);
+	}
+
+	public OoaTypeRenameVisitor(ParserState aState)
+	{
+		super(aState, false);
+		if (aState == null)
+			throw new ArgumentException();
+		if (aState.namesTypePrefix.equals(""))
+			throw new ArgumentException();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ValueReferenceIdentifier.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ValueReferenceIdentifier.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/identifiers/ValueReferenceIdentifier.java	(revision 2)
@@ -0,0 +1,57 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.identifiers;
+
+import org.antlr.runtime.Token;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.types.UlyssesType;
+
+///////////////////////////////////////////////
+///  Variable Identifiers
+///
+
+public abstract class ValueReferenceIdentifier extends Identifier
+{
+	public ValueReferenceIdentifier(Token aToken,
+			UlyssesType aType,
+			IdentifierKind aKind,
+			IScope aDefiningScope)
+	{
+		super(aToken, aType, aKind, aDefiningScope);
+	}
+
+	public ValueReferenceIdentifier(ValueReferenceIdentifier toCopy)
+	{
+		super(toCopy);
+	}
+
+	public ValueReferenceIdentifier(String name, UlyssesType aType, IdentifierKind aKind, IScope aDefiningScope)
+	{
+		super(name, aType, aKind, aDefiningScope);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialPrioritizedCompositionVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialPrioritizedCompositionVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialPrioritizedCompositionVisitor.java	(revision 2)
@@ -0,0 +1,171 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors.optimisation;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.IdentifierList;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.statements.StatementKind;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+import org.momut.ooas.utils.exceptions.OoasCompilerRuntimeException;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+/// <summary>
+/// removes trivial prioritized compositions.
+/// </summary>
+public final class OoaRemoveTrivialPrioritizedCompositionVisitor extends OoaCompleteAstTraversalVisitor
+{
+	/// <summary>
+	/// replaces the prioBlock by its child (most likely a parBlock)
+	/// </summary>
+	private IAst ConvertPrioBlock(PrioBlock prioBlock, IAst parent)
+	{
+		if (prioBlock.statements().size() <= 1 && prioBlock.isSimpleBlock())
+		{
+			final Block newBlock = (Block)prioBlock.statements().peekFirst();
+			newBlock.SetParentScope(prioBlock.GetParentScope());
+			switch (parent.nodeType())
+			{
+			case type:
+				switch (((UlyssesType)parent).kind())
+				{
+				case OoActionSystemType:
+					final OoActionSystemType atype = (OoActionSystemType)parent;
+					final Block ablock = atype.doOdBlock();
+					assert(ablock == prioBlock); // ref equ.
+					atype.SetDoOdBlock(newBlock);
+					break;
+				default:
+					throw new NotImplementedException();
+				}
+				break;
+			case statement:
+				switch (((Statement)parent).kind())
+				{
+				case SeqBlock:
+					final SeqBlock aseqblock = (SeqBlock)parent;
+					final int idx = aseqblock.statements().indexOf(prioBlock);
+					if (idx == -1)
+						throw new OoasCompilerRuntimeException(); // must not happen?!
+					aseqblock.statements().set(idx, newBlock);
+//					LinkedListNode<Statement> toChange = aseqblock.statements.Find(prioBlock);
+//					toChange.Value = newBlock;
+					break;
+				case GuardedCommand:
+					final GuardedCommand gc = (GuardedCommand)parent;
+					assert(gc.body() == prioBlock); // ref equ.
+					gc.SetBody(newBlock);
+					break;
+				default:
+					throw new NotImplementedException();
+				}
+				break;
+			case identifier:
+				switch (((Identifier)parent).kind())
+				{
+				case NamedActionIdentifier:
+					final NamedActionIdentifier action = (NamedActionIdentifier)parent;
+					if (action.body() != prioBlock) // ref equ.
+						throw new InternalCompilerException("Internal Error: Cannot replace action body.");
+					action.SetBody(newBlock);
+					break;
+				case MethodIdentifier:
+					final MethodIdentifier method = (MethodIdentifier)parent;
+					assert(method.body() == prioBlock); // ref equ.
+					method.SetBody(newBlock);
+					break;
+				default:
+					throw new NotImplementedException();
+				}
+				break;
+			default:
+				throw new NotImplementedException();
+			}
+			m_changes = true;
+			return newBlock;
+		}
+		else
+			return prioBlock;
+	}
+
+
+	@Override
+	protected void VisitAstElement(IAst element, IAst parent)
+	{
+		if ((element.nodeType() == AstNodeTypeEnum.statement) &&
+				(((Statement)element).kind() == StatementKind.PrioBlock) &&
+				// we're only interested in actionblock and actionbody composition, not in type composition
+				!(parent.nodeType() == AstNodeTypeEnum.identifier && ((Identifier)parent).kind() == IdentifierKind.List))
+		{
+			final IAst newchild = ConvertPrioBlock((PrioBlock)element, parent);
+			super.VisitAstElement(newchild, parent);
+		}
+		else
+			super.VisitAstElement(element, parent);
+	}
+
+
+	@Override
+	public void visit(MainModule mainModule)
+	{
+		// get rid of any top-level spurious block
+		if (mainModule.systemDescription() != null)
+			while (mainModule.systemDescription().identifiers().size() == 1
+			       && mainModule.systemDescription().identifiers().peekFirst().kind() == IdentifierKind.List)
+			{
+				mainModule.SetSystemDescription((IdentifierList)mainModule.systemDescription().identifiers().peekFirst());
+			}
+		super.visit(mainModule);
+	}
+
+	private boolean m_changes = false;
+
+	public OoaRemoveTrivialPrioritizedCompositionVisitor(ParserState aState)
+	{
+		super (aState);
+	}
+
+
+	public boolean changedAst() {
+		return m_changes;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaCheckASTVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaCheckASTVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaCheckASTVisitor.java	(revision 2)
@@ -0,0 +1,102 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors.analysis;
+
+import java.util.HashMap;
+
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+public final class OoaCheckASTVisitor extends OoaCompleteAstTraversalVisitor {
+	private final String m_tag;
+	private final HashMap<String,UlyssesType> m_seenTypes = new HashMap<>();
+
+	@Override
+	protected void VisitAstElement(IAst element, IAst parent) {
+		if (element instanceof UlyssesType) {
+			final UlyssesType t = (element instanceof OpaqueType) ? ((OpaqueType) element).resolvedType()  : (UlyssesType) element;
+			if (t != null) { // opaque might not have resolve yet..
+				final String typeStr = t.toString();
+				if (m_seenTypes.containsKey(typeStr)) {
+					if (!t.isAnonymousType() &&
+					    m_seenTypes.get(typeStr) != t) // ref eq
+					{
+						throw new InternalCompilerException(String.format("Internal Error (%s): AST structure error."
+								+ " Type instantiated multiple times: %s", m_tag, typeStr));
+					}
+				} else
+					m_seenTypes.put(typeStr, t);
+			}
+		}
+
+		super.VisitAstElement(element, parent);
+	}
+
+
+	@Override
+	public void visit(NondetBlock nondetBlock) {
+		super.visit(nondetBlock);
+		checkScope(nondetBlock);
+	}
+
+	@Override
+	public void visit(PrioBlock prioBlock) {
+		super.visit(prioBlock);
+		checkScope(prioBlock);
+	}
+
+	@Override
+	public void visit(SeqBlock seqBlock) {
+		super.visit(seqBlock);
+		checkScope(seqBlock);
+	}
+
+	private final void checkScope(Block aBlock) {
+		for (final Statement element: aBlock.statements())
+			if (element instanceof IScope) {
+				final IScope child = (IScope) element;
+				if (child.GetParentScope() != aBlock)
+					throw new InternalCompilerException("Internal Error (%s): AST structure error. ", m_tag);
+			}
+	}
+
+	public OoaCheckASTVisitor(ParserState aState, String tag) {
+		super(aState);
+		m_tag = tag;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/BreakStatement.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/BreakStatement.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/BreakStatement.java	(revision 2)
@@ -0,0 +1,55 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+public class BreakStatement extends Statement
+{
+	public BreakStatement(int aline, int apos)
+	{
+		super (StatementKind.Break, aline, apos);
+	}
+
+	public BreakStatement(BreakStatement copy)
+	{
+		super (copy);
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		return new BreakStatement(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaPrintActionSequencesVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaPrintActionSequencesVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaPrintActionSequencesVisitor.java	(revision 2)
@@ -0,0 +1,137 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors.analysis;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.IdentityHashMap;
+import java.util.Map.Entry;
+
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.statements.StatementKind;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.FunctionType.FunctionTypeEnum;
+import org.momut.ooas.parser.ParserMessage;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.parser.ParserWarning;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+import org.momut.ooas.visitors.OoaPrintVisitor;
+
+public class OoaPrintActionSequencesVisitor extends OoaCompleteAstTraversalVisitor {
+
+	private final IdentityHashMap<String, Integer> m_sequences = new IdentityHashMap<>();
+	private boolean m_warned = false;
+
+	@Override
+	public void visit(SeqBlock seqBlock) {
+		super.visit(seqBlock);
+
+		boolean isFunction = false;
+		IScope scope = seqBlock.GetParentScope();
+		if (scope == null && !m_warned) {
+			m_ParserState.AddWarningMessage(new ParserWarning("", 0, 0, "Sequence analysis will be incomplete since the parent scope of a seq-block could not be resolved."));
+			m_warned = true;
+		}
+		while (!(scope instanceof OoActionSystemType) && !isFunction) {
+			isFunction = scope instanceof FunctionIdentifier;
+			scope = scope.GetParentScope();
+		}
+		if (isFunction)
+			return;
+
+		int index = 0;
+		int next = 0;
+		final ArrayList<String> m_calls = new ArrayList<>();
+		for (final Statement s: seqBlock.statements()) {
+			// get a list of call statements
+			if ( s.kind()== StatementKind.MethodCall
+			     && index == next )
+			{
+				final OoaPrintVisitor customFormatter = new OoaPrintVisitor(null){
+					@Override
+					public void visit(IdentifierExpression identifierExpression) {
+						final Identifier id = identifierExpression.identifier();
+						if (id.kind() == IdentifierKind.NamedActionIdentifier) {
+							final FunctionType ft = (FunctionType) id.type();
+							if (ft.functionType() == FunctionTypeEnum.Observable)
+								output.Append("obs ");
+							else if (ft.functionType() == FunctionTypeEnum.Controllable)
+								output.Append("ctr ");
+						}
+						output.Append(identifierExpression.identifier().tokenText());
+					}
+				};
+				final Call c = (Call) s;
+				m_calls.add( c.callExpression().toString(customFormatter));
+				next++;
+			}
+			index++;
+		}
+		if (m_calls.size() > 1) {
+			final String seq = m_calls.toString().intern();
+			if (!m_sequences.containsKey(seq))
+				m_sequences.put(seq, 0);
+			m_sequences.put(seq, m_sequences.get(seq) + 1);
+		}
+	}
+
+	@Override
+	public void visit(MainModule mainModule) {
+		// we only care about the instantiated names...
+		// if you want both, then just call super here..
+		final boolean haveInstance = mainModule.instance() != null;
+		if (haveInstance)
+			VisitSub(mainModule.instance(), mainModule);
+
+		final StringBuilder b = new StringBuilder();
+		b.append("List of sequential actions in model:");
+		b.append(System.lineSeparator());
+		final ArrayList<String> output = new ArrayList<>();
+		for (final Entry<String, Integer>e: m_sequences.entrySet())
+			output.add(String.format("\t%s: %s", e.getValue(), e.getKey()));
+		Collections.sort(output);
+		for (final String s:output)
+			b.append(s + System.lineSeparator());
+		m_ParserState.AddMessage(new ParserMessage("",0,0, b.toString()));
+//		System.out.println(b.toString());
+	}
+
+
+	public OoaPrintActionSequencesVisitor(ParserState aState) {
+		super(aState);
+	}
+}
Index: trunk/compiler/ooasCompiler_tests/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/compiler/ooasCompiler_tests/.settings/org.eclipse.jdt.core.prefs	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/.settings/org.eclipse.jdt.core.prefs	(revision 2)
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaJoinSequentialCompositionBlocksVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaJoinSequentialCompositionBlocksVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaJoinSequentialCompositionBlocksVisitor.java	(revision 2)
@@ -0,0 +1,106 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors.optimisation;
+
+import java.util.LinkedList;
+
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.statements.StatementKind;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+public final class OoaJoinSequentialCompositionBlocksVisitor extends OoaCompleteAstTraversalVisitor {
+
+	@Override
+	public void visit(SeqBlock seqBlock) {
+		// do all the children first.
+		super.visit(seqBlock);
+		checkScope(seqBlock);
+
+		// now see whether we can join a child-seq block
+		boolean didSomeWork = false;
+		final LinkedList<Statement> newList = new LinkedList<>();
+		for (final Statement s: seqBlock.statements()) {
+			if (s.kind() == StatementKind.SeqBlock && ((Block)s).isSimpleBlock()) {
+				final SeqBlock child = (SeqBlock)s;
+				if (child.GetParentScope() != seqBlock)
+					throw new InternalCompilerException("Internal Error: AST structure error.");
+				// now add all the statements of seqblock to the current seqblock
+				for (final Statement childS: child.statements()) {
+					if (childS instanceof IScope)
+						((IScope)childS).SetParentScope(seqBlock);
+					newList.add(childS);
+				}
+				didSomeWork = true;
+			} else
+				newList.add(s);
+		}
+		if (didSomeWork) {
+			m_changes = true;
+			seqBlock.SetStatements(newList);
+		}
+	}
+
+	@Override
+	public void visit(NondetBlock nondetBlock) {
+		super.visit(nondetBlock);
+		checkScope(nondetBlock);
+	}
+
+	@Override
+	public void visit(PrioBlock prioBlock) {
+		super.visit(prioBlock);
+		checkScope(prioBlock);
+	}
+
+
+	private final void checkScope(Block aBlock) {
+		for (final Statement element: aBlock.statements())
+			if (element instanceof IScope) {
+				final IScope child = (IScope) element;
+				if (child.GetParentScope() != aBlock)
+					throw new InternalCompilerException("Internal Error: AST structure error.");
+			}
+	}
+
+	private boolean m_changes = false;
+
+	public OoaJoinSequentialCompositionBlocksVisitor(ParserState aState) {
+		super(aState);
+	}
+
+	public boolean changedAst() {
+		return m_changes;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/NondetBlock.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/NondetBlock.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/NondetBlock.java	(revision 2)
@@ -0,0 +1,62 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+public final class NondetBlock extends Block
+{
+	public NondetBlock(int aline, int apos)
+	{
+		super (StatementKind.NondetBlock, aline, apos);
+	}
+
+	public NondetBlock(Block aParent, int aline, int apos)
+	{
+		super (StatementKind.NondetBlock, aline, apos);
+		if (aParent != null)
+			aParent.AddStatement(this);
+	}
+
+	public NondetBlock(NondetBlock toCopy)
+	{
+		super (toCopy);
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		return new NondetBlock(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialBlocksVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialBlocksVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialBlocksVisitor.java	(revision 2)
@@ -0,0 +1,87 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors.optimisation;
+
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.visitors.OoaEmptyVisitor;
+
+/**
+ * Iteratively applies the remove trivial Prioritized/Nondet/Seq visitors until
+ * we've reached a fixed point and no more changes can be done.
+ *
+ * @author willibald
+ */
+public final class OoaRemoveTrivialBlocksVisitor extends OoaEmptyVisitor {
+
+	final ParserState m_state;
+
+
+	private boolean removePrio(MainModule m) {
+		final OoaRemoveTrivialPrioritizedCompositionVisitor vis = new OoaRemoveTrivialPrioritizedCompositionVisitor(m_state);
+		vis.visit(m);
+		return vis.changedAst();
+	}
+
+	private boolean removeNonDet(MainModule m) {
+		final OoaRemoveTrivialNondetChoiceCompositionVisitor vis = new OoaRemoveTrivialNondetChoiceCompositionVisitor(m_state);
+		vis.visit(m);
+		return vis.changedAst();
+	}
+
+	private boolean removeSeq(MainModule m) {
+		final OoaRemoveTrivialSequentialCompositionVisitor vis = new OoaRemoveTrivialSequentialCompositionVisitor(m_state);
+		vis.visit(m);
+		return vis.changedAst();
+	}
+
+	private boolean joinSeq(MainModule m) {
+		final OoaJoinSequentialCompositionBlocksVisitor vis = new OoaJoinSequentialCompositionBlocksVisitor(m_state);
+		vis.visit(m);
+		return vis.changedAst();
+	}
+
+	@Override
+	public void visit(MainModule mainModule)
+	{
+		boolean changes = true;
+		while (changes) {
+			changes = false;
+			changes |= removePrio(mainModule);
+			changes |= removeNonDet(mainModule);
+			changes |= removeSeq(mainModule);
+			changes |= joinSeq(mainModule);
+		}
+	}
+
+
+	public OoaRemoveTrivialBlocksVisitor(ParserState aState)
+	{
+		m_state = aState;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialSequentialCompositionVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialSequentialCompositionVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialSequentialCompositionVisitor.java	(revision 2)
@@ -0,0 +1,165 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors.optimisation;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.statements.StatementKind;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+import org.momut.ooas.utils.exceptions.OoasCompilerRuntimeException;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+/**
+ * Removes Seq blocks that only have one element...
+ * @author KrennW
+ */
+public final class OoaRemoveTrivialSequentialCompositionVisitor extends OoaCompleteAstTraversalVisitor {
+
+	private void setNewParent(Statement s, final IScope oldScope,final IScope newParentScope) {
+		class ParentScopeVis extends OoaCompleteAstTraversalVisitor {
+			@Override
+			protected void VisitAstElement(IAst element, IAst parent) {
+				if (element instanceof IScope) {
+					final IScope scope = (IScope) element;
+					if (scope.GetParentScope() == oldScope)
+						scope.SetParentScope(newParentScope);
+				}
+				super.VisitAstElement(element, parent);
+			}
+
+			public ParentScopeVis() {
+				super(null);
+			}
+
+		}
+		if (s instanceof IScope)
+			((IScope)s).SetParentScope(newParentScope);
+		final ParentScopeVis visitor = new ParentScopeVis();
+		s.Accept(visitor);
+	}
+
+	/// <summary>
+	/// replaces the seqBlock by its child
+	/// </summary>
+	private IAst ConvertNondetBlock(SeqBlock seqBlock, IAst parent)
+	{
+		if (seqBlock.statements().size() <= 1 &&            // max one statement in block
+		    seqBlock.isSimpleBlock() &&                     // block must not have local vars etc.
+		    parent.nodeType() !=  AstNodeTypeEnum.type)     // we cannot simplify if block is owned by an OoActionSystem since dood always is a block
+		{
+			final Statement stmt = seqBlock.statements().peekFirst();
+			setNewParent(stmt, seqBlock, seqBlock.GetParentScope()); // change AST and correct all parentscope pointers to this seqblock
+
+			switch (parent.nodeType())
+			{
+			case statement:
+				switch (((Statement)parent).kind())
+				{
+				case SeqBlock:
+				case NondetBlock:
+				case PrioBlock:
+					final Block aBlock = (Block)parent;
+					final int idx = aBlock.statements().indexOf(seqBlock);
+					if (idx == -1)
+						throw new OoasCompilerRuntimeException(); // must not happen?!
+					aBlock.statements().set(idx, stmt);
+					break;
+				case GuardedCommand:
+					final GuardedCommand gc = (GuardedCommand)parent;
+					if(gc.body() != seqBlock) // ref equ.
+						throw new InternalCompilerException("Internal Error: Cannot replace guarded command body.");
+					gc.SetBody(stmt);
+					break;
+				default:
+					throw new NotImplementedException();
+				}
+				break;
+			case identifier:
+				switch (((Identifier)parent).kind())
+				{
+				case NamedActionIdentifier:
+				case MethodIdentifier:
+					final FunctionIdentifier method = (FunctionIdentifier)parent;
+					if (method.body() != seqBlock) // ref equ.
+						throw new InternalCompilerException("Internal Error: Cannot replace method body.");
+					method.SetBody(stmt);
+					break;
+				default:
+					throw new NotImplementedException();
+				}
+				break;
+			default:
+				throw new NotImplementedException();
+			}
+			m_changes = true;
+			return stmt;
+		}
+		else
+			return seqBlock;
+	}
+
+
+	@Override
+	protected void VisitAstElement(IAst element, IAst parent)
+	{
+		if ( (element.nodeType() == AstNodeTypeEnum.statement) &&
+		     (((Statement)element).kind() == StatementKind.SeqBlock) &&
+		      // we're only interested in actionblock and actionbody composition, not in type composition
+		     !(parent.nodeType() == AstNodeTypeEnum.identifier &&
+		       ((Identifier)parent).kind() == IdentifierKind.List))
+		{
+			final IAst newchild = ConvertNondetBlock((SeqBlock)element, parent);
+			super.VisitAstElement(newchild, parent);
+		}
+		else
+			super.VisitAstElement(element, parent);
+	}
+
+	private boolean m_changes = false;
+
+	public OoaRemoveTrivialSequentialCompositionVisitor(ParserState aState)
+	{
+		super (aState);
+	}
+
+
+	public boolean changedAst() {
+		return m_changes;
+	}
+
+}
Index: trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/AlarmSystem.ooas
===================================================================
--- trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/AlarmSystem.ooas	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/AlarmSystem.ooas	(revision 2)
@@ -0,0 +1,976 @@
+# ****************************************************************
+# Code Generator: 2013.2.1 (RC)
+# Input Model: AlarmSystem
+/*
+Revision: 870 
+Date: 2012-01-18 10:54:37 +0100 (Mi, 18 Jän 2012) 
+*/
+# generated at: Thu Jan 23 16:09:48 CET 2014
+# project: AlarmSystem.uml
+# ****************************************************************
+
+# Name prefixes:
+# p_ :		parameter in method declaration and body
+# c_ :		controllable in __model class
+# __ee_ :	event-element, e.g. property of a signal event
+# t_ :		typename
+# __ :		class, method or attribute for internal use/used only to implement UML semantics
+#			not used in methods/elements, if the class name itself is already prefixed
+
+types
+		# types for time trigger functionality
+	t_time = int [0..300];
+	t_AlarmSystem_time_triggers = {AlarmSystem_notimetrigger,
+		ClosedAndLocked_TE20_Armed,
+		Alarm_TE300_Quiet,
+		FlashAndSound_TE30_Flash
+	};
+	t_AlarmSystem_timers = (AlarmSystem, t_AlarmSystem_time_triggers);
+	t_timer_classentries = (t_AlarmSystem_timers);
+	t_timer = (t_time, t_timer_classentries);
+	# types for event handling
+	t_eventname_AlarmSystem = {__received_AlarmSystem_Close, __received_AlarmSystem_Lock, __received_AlarmSystem_Open, __received_AlarmSystem_Unlock, __time_trigger_ClosedAndLocked_TE20_Armed, __change_trigger_AlarmSystem_oclIsInStateArmedArmedOpen, __time_trigger_Alarm_TE300_Quiet, __time_trigger_FlashAndSound_TE30_Flash};
+	t_event_AlarmSystem = (t_eventname_AlarmSystem);
+		# enumeration types for class state variables
+	AlarmSystem_AlarmSystem_StateMachine_reg_Region_0 = {AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed, AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndLocked, AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndUnlocked, AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Initial_0, AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndLocked, AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndUnlocked};
+	AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 = {AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Alarm, AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Initial_0, AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Quiet};
+	AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 = {AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_Flash, AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_FlashAndSound, AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_Initial_0};
+	AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 = {AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed, AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen, AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_Initial_0};
+		# class names
+	t_class = {_class_AlarmSystem};
+
+__model = autocons system |[
+	var
+		sut : AlarmSystem = nil;
+		env : __environment = new(__environment, "__Environment");
+			# Close observer lists per class
+		AlarmSystem_receiving_Close : list[1] of AlarmSystem = [nil];
+			# Close queues per class
+		broadcast_Close_AlarmSystem_queue : list[1] of AlarmSystem = [nil];
+			# Lock observer lists per class
+		AlarmSystem_receiving_Lock : list[1] of AlarmSystem = [nil];
+			# Lock queues per class
+		broadcast_Lock_AlarmSystem_queue : list[1] of AlarmSystem = [nil];
+			# Open observer lists per class
+		AlarmSystem_receiving_Open : list[1] of AlarmSystem = [nil];
+			# Open queues per class
+		broadcast_Open_AlarmSystem_queue : list[1] of AlarmSystem = [nil];
+			# Unlock observer lists per class
+		AlarmSystem_receiving_Unlock : list[1] of AlarmSystem = [nil];
+			# Unlock queues per class
+		broadcast_Unlock_AlarmSystem_queue : list[1] of AlarmSystem = [nil];
+		initialized : bool = false;
+			# timers for time triggered transitions
+		timers : list [3] of t_timer = [nil];
+			# list of timers due
+		timers_due : list [3] of t_timer_classentries = [nil];
+			# open wait time
+		wait_time : t_time = 0;
+			# queues of time triggers to send out
+		timetrigger_queue_AlarmSystem_ClosedAndLocked_TE20_Armed : list[1] of AlarmSystem = [nil];
+		timetrigger_queue_AlarmSystem_Alarm_TE300_Quiet : list[1] of AlarmSystem = [nil];
+		timetrigger_queue_AlarmSystem_FlashAndSound_TE30_Flash : list[1] of AlarmSystem = [nil];
+			# instance specifications
+		instancesReady : int [0..1] = 0;
+		InstanceSpecification_0 : AlarmSystem = new(AlarmSystem, "InstanceSpecification_0");
+		Close_enabled_at_AlarmSystem : list [1] of bool = [false];
+		Lock_enabled_at_AlarmSystem : list [1] of bool = [false];
+		Open_enabled_at_AlarmSystem : list [1] of bool = [false];
+		Unlock_enabled_at_AlarmSystem : list [1] of bool = [false]
+	methods
+		get_sut : AlarmSystem =
+			result := self.sut
+		end;
+		get_instancesReady : int[0..1] =
+			result := self.instancesReady
+		end;
+		set_instancesReady (N : int[0..1]) =
+			self.instancesReady := N
+		end;
+		get_InstanceSpecification_0 : AlarmSystem =
+			result := self.InstanceSpecification_0
+		end;
+		get_timers : list [3] of t_timer =
+			result := self.timers
+		end;
+		set_timers(param : list [3] of t_timer) =
+			self.timers := param
+		end;
+		get_timers_due : list [3] of t_timer_classentries =
+			result := self.timers_due
+		end;
+		set_timers_due(param : list [3] of t_timer_classentries) =
+			self.timers_due := param
+		end;
+		get_wait_time : t_time =
+			result := self.wait_time
+		end;
+		reset_wait_time =
+			self.wait_time := 0
+		end;
+		set_wait_time(param : t_time) =
+			self.wait_time := self.wait_time + param
+		end;
+			# signal broadcast method(s)
+		__broadcast_Close =
+			broadcast_Close_AlarmSystem_queue := AlarmSystem_receiving_Close
+		end;
+		__broadcast_Lock =
+			broadcast_Lock_AlarmSystem_queue := AlarmSystem_receiving_Lock
+		end;
+		__broadcast_Open =
+			broadcast_Open_AlarmSystem_queue := AlarmSystem_receiving_Open
+		end;
+		__broadcast_Unlock =
+			broadcast_Unlock_AlarmSystem_queue := AlarmSystem_receiving_Unlock
+		end;
+			# registration functions for observer-pattern
+		__register_AlarmSystem_rcv_Close(p_listener : AlarmSystem) =
+			AlarmSystem_receiving_Close := AlarmSystem_receiving_Close ^ [p_listener]
+		end;
+		__register_AlarmSystem_rcv_Lock(p_listener : AlarmSystem) =
+			AlarmSystem_receiving_Lock := AlarmSystem_receiving_Lock ^ [p_listener]
+		end;
+		__register_AlarmSystem_rcv_Open(p_listener : AlarmSystem) =
+			AlarmSystem_receiving_Open := AlarmSystem_receiving_Open ^ [p_listener]
+		end;
+		__register_AlarmSystem_rcv_Unlock(p_listener : AlarmSystem) =
+			AlarmSystem_receiving_Unlock := AlarmSystem_receiving_Unlock ^ [p_listener]
+		end;
+			# registration and deregistration of timers
+		register_transition_AlarmSystem(timervalue : t_time, obj : AlarmSystem, transition : t_AlarmSystem_time_triggers) =
+			timers := timers ^ [t_timer(timervalue, (t_timer_classentries(t_AlarmSystem_timers(obj, transition))))]
+		end;
+		deregister_transition_AlarmSystem(obj : AlarmSystem, transition : t_AlarmSystem_time_triggers) =
+			timers := filterDeregisteredTransitions(obj, transition) :: ([nil]) :>: (timers)
+		end;
+		filterDeregisteredTransitions(obj : AlarmSystem, transition : t_AlarmSystem_time_triggers, tlist : list [3] of t_timer, elem : t_timer) : list [3] of t_timer =
+			requires elem[1][0][0] = obj and elem[1][0][1] <> transition :
+				result := tlist ^ [elem]
+			end
+			// result := tlist
+		end;
+		enable_Close_at_AlarmSystem(index : int [0..0], val : bool) =
+			Close_enabled_at_AlarmSystem[index] := val
+		end;
+		Close_is_enabled_at_AlarmSystem(index : int [0..0]) : bool =
+			result := Close_enabled_at_AlarmSystem[index]
+		end;
+		enable_Lock_at_AlarmSystem(index : int [0..0], val : bool) =
+			Lock_enabled_at_AlarmSystem[index] := val
+		end;
+		Lock_is_enabled_at_AlarmSystem(index : int [0..0]) : bool =
+			result := Lock_enabled_at_AlarmSystem[index]
+		end;
+		enable_Open_at_AlarmSystem(index : int [0..0], val : bool) =
+			Open_enabled_at_AlarmSystem[index] := val
+		end;
+		Open_is_enabled_at_AlarmSystem(index : int [0..0]) : bool =
+			result := Open_enabled_at_AlarmSystem[index]
+		end;
+		enable_Unlock_at_AlarmSystem(index : int [0..0], val : bool) =
+			Unlock_enabled_at_AlarmSystem[index] := val
+		end;
+		Unlock_is_enabled_at_AlarmSystem(index : int [0..0]) : bool =
+			result := Unlock_enabled_at_AlarmSystem[index]
+		end;
+		disable_external_input =
+			Close_enabled_at_AlarmSystem := [false];
+			Lock_enabled_at_AlarmSystem := [false];
+			Open_enabled_at_AlarmSystem := [false];
+			Unlock_enabled_at_AlarmSystem := [false]
+		end
+	actions
+		# model initialization
+		initialize = requires (not self.initialized) :
+				# set environment backreference
+			env.init(self);
+			# configuration objects
+			#InstanceSpecification_0;
+			# init values;
+			sut := InstanceSpecification_0;
+			# navigable roles;
+			InstanceSpecification_0.__init_AlarmSystem(self, 0, 0);
+			self.initialized := true
+		end;
+			# signal broadcast actions
+		broadcast_Close_to_next_AlarmSystem = var x : AlarmSystem requires broadcast_Close_AlarmSystem_queue <> [nil] :
+			break;
+			x := hd broadcast_Close_AlarmSystem_queue;
+			x.__rcv_Close();
+			broadcast_Close_AlarmSystem_queue := (tl broadcast_Close_AlarmSystem_queue)
+		end;
+		broadcast_Lock_to_next_AlarmSystem = var x : AlarmSystem requires broadcast_Lock_AlarmSystem_queue <> [nil] :
+			break;
+			x := hd broadcast_Lock_AlarmSystem_queue;
+			x.__rcv_Lock();
+			broadcast_Lock_AlarmSystem_queue := (tl broadcast_Lock_AlarmSystem_queue)
+		end;
+		broadcast_Open_to_next_AlarmSystem = var x : AlarmSystem requires broadcast_Open_AlarmSystem_queue <> [nil] :
+			x := hd broadcast_Open_AlarmSystem_queue;
+			x.__rcv_Open();
+			broadcast_Open_AlarmSystem_queue := (tl broadcast_Open_AlarmSystem_queue)
+		end;
+		broadcast_Unlock_to_next_AlarmSystem = var x : AlarmSystem requires broadcast_Unlock_AlarmSystem_queue <> [nil] :
+			x := hd broadcast_Unlock_AlarmSystem_queue;
+			x.__rcv_Unlock();
+			broadcast_Unlock_AlarmSystem_queue := (tl broadcast_Unlock_AlarmSystem_queue)
+		end;
+			# action distribute time triggers
+		distribute_timetriggers (x : t_timer_classentries) = requires timers_due <> [nil] and x = (hd timers_due) :
+			timetrigger_queue_AlarmSystem_ClosedAndLocked_TE20_Armed := timetrigger_queue_AlarmSystem_ClosedAndLocked_TE20_Armed ^ (if ((x[0])[0] = nil) or ((x[0])[1] <> ClosedAndLocked_TE20_Armed) then [nil] else [(x[0])[0]] end);
+			timetrigger_queue_AlarmSystem_Alarm_TE300_Quiet := timetrigger_queue_AlarmSystem_Alarm_TE300_Quiet ^ (if ((x[0])[0] = nil) or ((x[0])[1] <> Alarm_TE300_Quiet) then [nil] else [(x[0])[0]] end);
+			timetrigger_queue_AlarmSystem_FlashAndSound_TE30_Flash := timetrigger_queue_AlarmSystem_FlashAndSound_TE30_Flash ^ (if ((x[0])[0] = nil) or ((x[0])[1] <> FlashAndSound_TE30_Flash) then [nil] else [(x[0])[0]] end);
+			timers_due := (tl timers_due)
+		end;
+			# actions to deliver timetriggers
+		trigger_AlarmSystem_ClosedAndLocked_TE20_Armed = var AlarmSystem_ClosedAndLocked_TE20_Armed : AlarmSystem requires timetrigger_queue_AlarmSystem_ClosedAndLocked_TE20_Armed <> [nil] :
+			AlarmSystem_ClosedAndLocked_TE20_Armed := (hd timetrigger_queue_AlarmSystem_ClosedAndLocked_TE20_Armed);
+			AlarmSystem_ClosedAndLocked_TE20_Armed.__trigger_ClosedAndLocked_TE20_Armed();
+			timetrigger_queue_AlarmSystem_ClosedAndLocked_TE20_Armed := (tl timetrigger_queue_AlarmSystem_ClosedAndLocked_TE20_Armed)
+		end;
+		trigger_AlarmSystem_Alarm_TE300_Quiet = var AlarmSystem_Alarm_TE300_Quiet : AlarmSystem requires timetrigger_queue_AlarmSystem_Alarm_TE300_Quiet <> [nil] :
+			AlarmSystem_Alarm_TE300_Quiet := (hd timetrigger_queue_AlarmSystem_Alarm_TE300_Quiet);
+			AlarmSystem_Alarm_TE300_Quiet.__trigger_Alarm_TE300_Quiet();
+			timetrigger_queue_AlarmSystem_Alarm_TE300_Quiet := (tl timetrigger_queue_AlarmSystem_Alarm_TE300_Quiet)
+		end;
+		trigger_AlarmSystem_FlashAndSound_TE30_Flash = var AlarmSystem_FlashAndSound_TE30_Flash : AlarmSystem requires timetrigger_queue_AlarmSystem_FlashAndSound_TE30_Flash <> [nil] :
+			AlarmSystem_FlashAndSound_TE30_Flash := (hd timetrigger_queue_AlarmSystem_FlashAndSound_TE30_Flash);
+			AlarmSystem_FlashAndSound_TE30_Flash.__trigger_FlashAndSound_TE30_Flash();
+			timetrigger_queue_AlarmSystem_FlashAndSound_TE30_Flash := (tl timetrigger_queue_AlarmSystem_FlashAndSound_TE30_Flash)
+		end
+	do
+				initialize
+			//
+				# broadcast signals
+				(
+					broadcast_Close_to_next_AlarmSystem
+					//
+					broadcast_Lock_to_next_AlarmSystem
+					//
+					broadcast_Open_to_next_AlarmSystem
+					//
+					broadcast_Unlock_to_next_AlarmSystem
+				)
+			//
+				(
+						# distribute timetriggers
+					var u : t_timer_classentries : distribute_timetriggers(u)
+						# deliver timetriggers
+					//
+					trigger_AlarmSystem_ClosedAndLocked_TE20_Armed
+					//
+					trigger_AlarmSystem_Alarm_TE300_Quiet
+					//
+					trigger_AlarmSystem_FlashAndSound_TE30_Flash
+				)
+	od
+]|;
+
+__environment = system |[
+	var
+		m : __model = nil;
+		check_for_inputs : bool = true;
+			# flag for avoiding consecutive waits
+		wait_allowed : bool = true
+	methods
+		init (model : __model) =
+			self.m := model
+		end;
+		filterExpiredTimers(c_wait_time : t_time, tlist : list [3] of t_timer, elem : t_timer) : list [3] of t_timer = 
+			requires (elem[0] - c_wait_time) > 0 :
+				result := tlist ^ [t_timer(elem[0] - c_wait_time, elem [1])]
+			end
+			// result := tlist
+		end
+	actions
+			# external signal receptions
+		ctr receive_external_signal_Close_at_InstanceSpecification_0(c_wait_time : t_time)  = requires m.Close_is_enabled_at_AlarmSystem(0) and (m.get_wait_time() = c_wait_time) :
+				# re-allow wait controllable
+			wait_allowed := true;
+			m.reset_wait_time();
+				# reset flags enabling external input
+			m.disable_external_input();
+			m.get_InstanceSpecification_0().__rcv_Close();
+			check_for_inputs := true
+		end;
+		ctr receive_external_signal_Lock_at_InstanceSpecification_0(c_wait_time : t_time)  = requires m.Lock_is_enabled_at_AlarmSystem(0) and (m.get_wait_time() = c_wait_time) :
+				# re-allow wait controllable
+			wait_allowed := true;
+			m.reset_wait_time();
+				# reset flags enabling external input
+			m.disable_external_input();
+			m.get_InstanceSpecification_0().__rcv_Lock();
+			check_for_inputs := true
+		end;
+		ctr receive_external_signal_Open_at_InstanceSpecification_0(c_wait_time : t_time)  = requires m.Open_is_enabled_at_AlarmSystem(0) and (m.get_wait_time() = c_wait_time) :
+				# re-allow wait controllable
+			wait_allowed := true;
+			m.reset_wait_time();
+				# reset flags enabling external input
+			m.disable_external_input();
+			m.get_InstanceSpecification_0().__rcv_Open();
+			check_for_inputs := true
+		end;
+		ctr receive_external_signal_Unlock_at_InstanceSpecification_0(c_wait_time : t_time)  = requires m.Unlock_is_enabled_at_AlarmSystem(0) and (m.get_wait_time() = c_wait_time) :
+				# re-allow wait controllable
+			wait_allowed := true;
+			m.reset_wait_time();
+				# reset flags enabling external input
+			m.disable_external_input();
+			m.get_InstanceSpecification_0().__rcv_Unlock();
+			check_for_inputs := true
+		end;
+			# after delay action
+		after (c_wait_time : t_time) = requires (
+				c_wait_time > 0 and
+				# no consecutive wait
+				wait_allowed
+				# there are active timers
+				and (len m.get_timers() > 0) and
+				# wait time is equal to next timer value
+				(forall i : int [0..3] : (((i >= 0) and (i<len m.get_timers())) => (c_wait_time <= m.get_timers() [i] [0] )))
+				and (exists i : int [0..3] : (((i >= 0) and (i<len m.get_timers())) and (c_wait_time = m.get_timers() [i] [0] )))
+			) :
+				# trigger timers having c_wait_time as time (may be none!), will be processed by action deliver_timetriggers
+			m.set_timers_due([x | var x : t_timer_classentries & t_timer(c_wait_time,x) in m.get_timers()]);
+				# disallow after controllable if no timer was triggered
+			wait_allowed := (len m.get_timers_due() > 0);
+				# remove triggered timers (time = c_wait_time) and reduce all other timers by c_wait_time
+			m.set_timers(filterExpiredTimers(c_wait_time) :: ([nil]) :>: (m.get_timers()));
+			m.disable_external_input();
+			m.set_wait_time(c_wait_time)
+		end;
+		enable_wait = requires true :
+			wait_allowed := true
+		end;
+		enable_receptions = requires check_for_inputs :
+			m.get_InstanceSpecification_0().__set_enabled_flags();
+			check_for_inputs := false
+		end;
+		enable_receptions_check = requires true :
+			check_for_inputs := true
+		end
+	do
+			enable_receptions
+		//
+		(
+			 # after action
+			var t : t_time : after(t) [] 
+			(
+				# receive controllable signals
+				var t : t_time :
+				receive_external_signal_Close_at_InstanceSpecification_0(t)
+				[]
+				var t : t_time :
+				receive_external_signal_Lock_at_InstanceSpecification_0(t)
+				[]
+				var t : t_time :
+				receive_external_signal_Open_at_InstanceSpecification_0(t)
+				[]
+				var t : t_time :
+				receive_external_signal_Unlock_at_InstanceSpecification_0(t)
+			)
+		)
+		;
+			enable_receptions_check
+		//
+			enable_wait
+	od
+]|;
+
+
+AlarmSystem = system |[
+	var
+		# reference to central "housekeeping" OOAS;
+		__m : __model = nil;
+		# instance index;
+		# Warning, no instance!;
+		__instance : int [0..0] = 0;
+		__globalInstance : int [0..1] = 0;
+		# initialization flag;
+		initialized : bool = false;
+		# type, kinds;
+		__type : t_class = _class_AlarmSystem;
+		__kinds : list [2] of t_class = [_class_AlarmSystem];
+			# class state variables
+		AlarmSystem_StateMachine_reg_Region_0 : AlarmSystem_AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Initial_0
+		;AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 : AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Quiet;
+		AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 : AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_FlashAndSound;
+		AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 : AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed;
+			# event consumed flags per region
+		__consumed_AlarmSystem_StateMachine_reg_Region_0 : bool = false;
+		__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 : bool = false;
+		__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 : bool = false;
+		__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 : bool = false;
+			# object event queue
+		__events : list[16] of t_event_AlarmSystem = [nil];
+			# change trigger buffer flags
+		__last_oclIsInStateArmedArmedOpen : bool = false
+	methods
+		__init_AlarmSystem (model : __model, index : int [0..0],globalindex : int [0..1]) =
+				# change trigger buffer flags initializations
+			__last_oclIsInStateArmedArmedOpen := ((self.get_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen) and (self.get_AlarmSystem_StateMachine_reg_Region_0() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed));
+			__type := _class_AlarmSystem;
+			self.__m := model;
+			self.__globalInstance := globalindex;
+			self.__instance := index
+			;
+			self.__m.__register_AlarmSystem_rcv_Close(self);
+			self.__m.__register_AlarmSystem_rcv_Lock(self);
+			self.__m.__register_AlarmSystem_rcv_Open(self);
+			self.__m.__register_AlarmSystem_rcv_Unlock(self)
+		end;
+			# oclIsTypeOf, oclIsKindOf
+		__isTypeOf(c : t_class) : bool =
+			result := (c = __type)
+		end;
+		__isKindOf(c : t_class) : bool =
+			result := (c in __kinds)
+		end;
+			# Getters for class state variables
+		get_AlarmSystem_StateMachine_reg_Region_0 : AlarmSystem_AlarmSystem_StateMachine_reg_Region_0 =
+			result := self.AlarmSystem_StateMachine_reg_Region_0
+		end;
+		get_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 : AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 =
+			result := self.AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0
+		end;
+		get_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 : AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 =
+			result := self.AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0
+		end;
+		get_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 : AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 =
+			result := self.AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1
+		end;
+		__rcv_Close =
+			self.__events := self.__events ^ [t_event_AlarmSystem(__received_AlarmSystem_Close)]
+		end;
+		__rcv_Lock =
+			self.__events := self.__events ^ [t_event_AlarmSystem(__received_AlarmSystem_Lock)]
+		end;
+		__rcv_Open =
+			self.__events := self.__events ^ [t_event_AlarmSystem(__received_AlarmSystem_Open)]
+		end;
+		__rcv_Unlock =
+			self.__events := self.__events ^ [t_event_AlarmSystem(__received_AlarmSystem_Unlock)]
+		end;
+		# time trigger "receptions"
+		__trigger_ClosedAndLocked_TE20_Armed =
+			self.__events := self.__events ^ [t_event_AlarmSystem(__time_trigger_ClosedAndLocked_TE20_Armed)]
+		end;
+		__trigger_Alarm_TE300_Quiet =
+			self.__events := self.__events ^ [t_event_AlarmSystem(__time_trigger_Alarm_TE300_Quiet)]
+		end;
+		__trigger_FlashAndSound_TE30_Flash =
+			self.__events := self.__events ^ [t_event_AlarmSystem(__time_trigger_FlashAndSound_TE30_Flash)]
+		end;
+		__set_enabled_flags =
+			__m.enable_Unlock_at_AlarmSystem(__instance,( __m.Unlock_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed) and (((self.get_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen) and (self.get_AlarmSystem_StateMachine_reg_Region_0() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed))))));
+			__m.enable_Unlock_at_AlarmSystem(__instance,( __m.Unlock_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed) and (((self.get_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed) and (self.get_AlarmSystem_StateMachine_reg_Region_0() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed))))));
+			__m.enable_Open_at_AlarmSystem(__instance,( __m.Open_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndLocked))));
+			__m.enable_Unlock_at_AlarmSystem(__instance,( __m.Unlock_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndLocked))));
+			__m.enable_Lock_at_AlarmSystem(__instance,( __m.Lock_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndUnlocked))));
+			__m.enable_Open_at_AlarmSystem(__instance,( __m.Open_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndUnlocked))));
+			__m.enable_Unlock_at_AlarmSystem(__instance,( __m.Unlock_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndLocked))));
+			__m.enable_Close_at_AlarmSystem(__instance,( __m.Close_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndLocked))));
+			__m.enable_Close_at_AlarmSystem(__instance,( __m.Close_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndUnlocked))));
+			__m.enable_Lock_at_AlarmSystem(__instance,( __m.Lock_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndUnlocked))));
+			__m.enable_Open_at_AlarmSystem(__instance,( __m.Open_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed) and (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed))));
+			__m.enable_Close_at_AlarmSystem(__instance,( __m.Close_is_enabled_at_AlarmSystem(__instance) or ((AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen) and (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed))))
+			
+		end
+	 actions
+		initialize = requires (not self.initialized) and (__m.get_instancesReady() = self.__globalInstance) :
+				AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndUnlocked
+		;	initialized := true;
+			__m.set_instancesReady(1 + self.__globalInstance)
+		end;
+		__mark_AlarmSystem_StateMachine_reg_Region_0_conditional_consumed =
+				requires (__consumed_AlarmSystem_StateMachine_reg_Region_0 = false) and (__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 or __consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1) :
+			__consumed_AlarmSystem_StateMachine_reg_Region_0 := true
+		end;
+		__mark_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_conditional_consumed =
+				requires (__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 = false) and (__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0) :
+			__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true
+		end;
+		__mark_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_conditional_consumed =
+				requires (__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 = false) and (false) :
+			__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 := true
+		end;
+		__mark_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_conditional_consumed =
+				requires (__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 = false) and (false) :
+			__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+		end;
+		# (Armed) ---> (OpenAndUnlocked) [Transition: Armed_From_Armed_to_Junction_0_Transition_0_From_Junction_0_to_OpenAndUnlocked_Transition_0_OpenAndUnlocked_0_0]
+		transition_Armed_From_Armed_to_Junction_0_Transition_0_From_Junction_0_to_OpenAndUnlocked_Transition_0_OpenAndUnlocked_0_0 =
+			requires ( ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Unlock)) ) and (((self.get_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen) and (self.get_AlarmSystem_StateMachine_reg_Region_0() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed))) ):
+						# deregister timer(s) of exited state: Alarm
+						__m.deregister_transition_AlarmSystem(self, Alarm_TE300_Quiet);
+						# deregister timer(s) of exited state: FlashAndSound
+						__m.deregister_transition_AlarmSystem(self, FlashAndSound_TE30_Flash);
+						AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndUnlocked
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (Armed) ---> (ClosedAndUnlocked) [Transition: Armed_From_Armed_to_Junction_0_Transition_0_From_Junction_0_to_ClosedAndUnlocked_Transition_0_ClosedAndUnlocked_1_0]
+		transition_Armed_From_Armed_to_Junction_0_Transition_0_From_Junction_0_to_ClosedAndUnlocked_Transition_0_ClosedAndUnlocked_1_0 =
+			requires ( ((AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Unlock)) ) and (((self.get_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed) and (self.get_AlarmSystem_StateMachine_reg_Region_0() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed))) ):
+						# deregister timer(s) of exited state: Alarm
+						__m.deregister_transition_AlarmSystem(self, Alarm_TE300_Quiet);
+						# deregister timer(s) of exited state: FlashAndSound
+						__m.deregister_transition_AlarmSystem(self, FlashAndSound_TE30_Flash);
+						AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndUnlocked
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (ClosedAndLocked) ---> (Armed) [Transition: ClosedAndLocked_From_ClosedAndLocked_to_Armed_Transition_0_Armed_2_0]
+		transition_ClosedAndLocked_From_ClosedAndLocked_to_Armed_Transition_0_Armed_2_0 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndLocked) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __time_trigger_ClosedAndLocked_TE20_Armed))  ):
+						# deregister timer(s) of exited state: ClosedAndLocked
+						__m.deregister_transition_AlarmSystem(self, ClosedAndLocked_TE20_Armed);
+						AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed
+				;AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Quiet;
+						
+				AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (ClosedAndLocked) ---> (OpenAndLocked) [Transition: ClosedAndLocked_From_ClosedAndLocked_to_OpenAndLocked_Transition_0_OpenAndLocked_3_0]
+		transition_ClosedAndLocked_From_ClosedAndLocked_to_OpenAndLocked_Transition_0_OpenAndLocked_3_0 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndLocked) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Open))  ):
+						# deregister timer(s) of exited state: ClosedAndLocked
+						__m.deregister_transition_AlarmSystem(self, ClosedAndLocked_TE20_Armed);
+						AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndLocked
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (ClosedAndLocked) ---> (ClosedAndUnlocked) [Transition: ClosedAndLocked_From_ClosedAndLocked_to_ClosedAndUnlocked_Transition_0_ClosedAndUnlocked_4_0]
+		transition_ClosedAndLocked_From_ClosedAndLocked_to_ClosedAndUnlocked_Transition_0_ClosedAndUnlocked_4_0 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndLocked) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Unlock))  ):
+						# deregister timer(s) of exited state: ClosedAndLocked
+						__m.deregister_transition_AlarmSystem(self, ClosedAndLocked_TE20_Armed);
+						AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndUnlocked
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (ClosedAndUnlocked) ---> (ClosedAndLocked) [Transition: ClosedAndUnlocked_From_ClosedAndUnlocked_to_ClosedAndLocked_Transition_0_ClosedAndLocked_5_0]
+		transition_ClosedAndUnlocked_From_ClosedAndUnlocked_to_ClosedAndLocked_Transition_0_ClosedAndLocked_5_0 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndUnlocked) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Lock))  ):
+						# register timer(s) for entered state: ClosedAndLocked
+						__m.register_transition_AlarmSystem(20, self, ClosedAndLocked_TE20_Armed);
+						AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndLocked
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (ClosedAndUnlocked) ---> (OpenAndUnlocked) [Transition: ClosedAndUnlocked_From_ClosedAndUnlocked_to_OpenAndUnlocked_Transition_0_OpenAndUnlocked_6_0]
+		transition_ClosedAndUnlocked_From_ClosedAndUnlocked_to_OpenAndUnlocked_Transition_0_OpenAndUnlocked_6_0 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndUnlocked) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Open))  ):
+						AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndUnlocked
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (OpenAndLocked) ---> (OpenAndUnlocked) [Transition: OpenAndLocked_From_OpenAndLocked_to_OpenAndUnlocked_Transition_0_OpenAndUnlocked_7_0]
+		transition_OpenAndLocked_From_OpenAndLocked_to_OpenAndUnlocked_Transition_0_OpenAndUnlocked_7_0 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndLocked) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Unlock))  ):
+						AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndUnlocked
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (OpenAndLocked) ---> (ClosedAndLocked) [Transition: OpenAndLocked_From_OpenAndLocked_to_ClosedAndLocked_Transition_0_ClosedAndLocked_8_0]
+		transition_OpenAndLocked_From_OpenAndLocked_to_ClosedAndLocked_Transition_0_ClosedAndLocked_8_0 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndLocked) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Close))  ):
+						# register timer(s) for entered state: ClosedAndLocked
+						__m.register_transition_AlarmSystem(20, self, ClosedAndLocked_TE20_Armed);
+						AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndLocked
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (OpenAndUnlocked) ---> (ClosedAndUnlocked) [Transition: OpenAndUnlocked_From_OpenAndUnlocked_to_ClosedAndUnlocked_Transition_0_ClosedAndUnlocked_9_0]
+		transition_OpenAndUnlocked_From_OpenAndUnlocked_to_ClosedAndUnlocked_Transition_0_ClosedAndUnlocked_9_0 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndUnlocked) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Close))  ):
+						AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndUnlocked
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (OpenAndUnlocked) ---> (OpenAndLocked) [Transition: OpenAndUnlocked_From_OpenAndUnlocked_to_OpenAndLocked_Transition_0_OpenAndLocked_10_0]
+		transition_OpenAndUnlocked_From_OpenAndUnlocked_to_OpenAndLocked_Transition_0_OpenAndLocked_10_0 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndUnlocked) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Lock))  ):
+						AlarmSystem_StateMachine_reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndLocked
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (Alarm) ---> (Quiet) [Transition: Alarm_From_Alarm_to_Quiet_Transition_0_Quiet_0_1]
+		transition_Alarm_From_Alarm_to_Quiet_Transition_0_Quiet_0_1 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Alarm) and (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __time_trigger_Alarm_TE300_Quiet))  ):
+						# deregister timer(s) of exited state: Alarm
+						__m.deregister_transition_AlarmSystem(self, Alarm_TE300_Quiet);
+						# deregister timer(s) of exited state: FlashAndSound
+						__m.deregister_transition_AlarmSystem(self, FlashAndSound_TE30_Flash);
+						AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Quiet
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 := true
+			end
+		;
+		# (Quiet) ---> (Alarm) [Transition: Quiet_From_Quiet_to_Alarm_Transition_0_Alarm_1_1]
+		transition_Quiet_From_Quiet_to_Alarm_Transition_0_Alarm_1_1 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Quiet) and (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __change_trigger_AlarmSystem_oclIsInStateArmedArmedOpen))  ):
+						# register timer(s) for entered state: Alarm
+						__m.register_transition_AlarmSystem(300, self, Alarm_TE300_Quiet);
+						# register timer(s) for entered state: FlashAndSound
+						__m.register_transition_AlarmSystem(30, self, FlashAndSound_TE30_Flash);
+						AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Alarm
+				;AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_FlashAndSound
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := true;
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 := true
+			end
+		;
+		# (FlashAndSound) ---> (Flash) [Transition: FlashAndSound_From_FlashAndSound_to_Flash_Transition_0_Flash_0_2]
+		transition_FlashAndSound_From_FlashAndSound_to_Flash_Transition_0_Flash_0_2 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_FlashAndSound) and (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Alarm) and (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0) and (self.__events <> [nil]) and (((hd self.__events)[0] = __time_trigger_FlashAndSound_TE30_Flash))  ):
+						# deregister timer(s) of exited state: FlashAndSound
+						__m.deregister_transition_AlarmSystem(self, FlashAndSound_TE30_Flash);
+						AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_Flash
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 := true
+			end
+		;
+		# (ArmedClosed) ---> (ArmedOpen) [Transition: ArmedClosed_From_ArmedClosed_to_Armedopen_Transition_0_ArmedOpen_0_3]
+		transition_ArmedClosed_From_ArmedClosed_to_Armedopen_Transition_0_ArmedOpen_0_3 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed) and (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Open))  ):
+						AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end
+		;
+		# (ArmedOpen) ---> (ArmedClosed) [Transition: ArmedOpen_From_Armedopen_to_ArmedClosed_Transition_0_ArmedClosed_1_3]
+		transition_ArmedOpen_From_Armedopen_to_ArmedClosed_Transition_0_ArmedClosed_1_3 =
+			requires ( (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen) and (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed) and (not __consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1) and (self.__events <> [nil]) and (((hd self.__events)[0] = __received_AlarmSystem_Close))  ):
+						AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed
+				;			# set consumed flags
+						__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := true
+			end;
+		
+		exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed = requires (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed) : skip end;
+		exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndLocked = requires (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndLocked) : skip end;
+		exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndUnlocked = requires (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_ClosedAndUnlocked) : skip end;
+		exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndLocked = requires (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndLocked) : skip end;
+		exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndUnlocked = requires (AlarmSystem_StateMachine_reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_OpenAndUnlocked) : skip end;
+		exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Alarm = requires (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Alarm) : skip end;
+		exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Quiet = requires (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Quiet) : skip end;
+		exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_Flash = requires (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_Flash) : skip end;
+		exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_FlashAndSound = requires (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_FlashAndSound) : skip end;
+		exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed = requires (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed) : skip end;
+		exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen = requires (AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen) : skip end;
+		__dequeue =
+			requires (self.__events <> [nil]) :
+				self.__events := (tl self.__events);
+				__consumed_AlarmSystem_StateMachine_reg_Region_0 := false;
+				__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0 := false;
+				__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0 := false;
+				__consumed_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1 := false
+		end;
+			# change trigger checks
+		__chg_oclIsInStateArmedArmedOpen_on =
+			requires not __last_oclIsInStateArmedArmedOpen and (((self.get_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen) and (self.get_AlarmSystem_StateMachine_reg_Region_0() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed))) :
+					# queue change trigger
+				__events := __events ^ [t_event_AlarmSystem(__change_trigger_AlarmSystem_oclIsInStateArmedArmedOpen)];
+				__last_oclIsInStateArmedArmedOpen := true
+		end;
+		__chg_oclIsInStateArmedArmedOpen_off =
+			requires __last_oclIsInStateArmedArmedOpen and ( not (((self.get_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen) and (self.get_AlarmSystem_StateMachine_reg_Region_0() = AlarmSystem_AlarmSystem_StateMachine_reg_Region_0_Armed)))) :
+				__last_oclIsInStateArmedArmedOpen := false
+		end;
+			# environment calls
+		obs __call_AlarmArmed_SetOn(c_wait_time : t_time) = requires __m.get_wait_time() = c_wait_time : __m.reset_wait_time() end;
+		obs __call_AlarmArmed_SetOff(c_wait_time : t_time) = requires __m.get_wait_time() = c_wait_time : __m.reset_wait_time() end;
+		obs __call_AcousticAlarm_SetOn(c_wait_time : t_time) = requires __m.get_wait_time() = c_wait_time : __m.reset_wait_time() end;
+		obs __call_AcousticAlarm_SetOff(c_wait_time : t_time) = requires __m.get_wait_time() = c_wait_time : __m.reset_wait_time() end;
+		obs __call_OpticalAlarm_SetOn(c_wait_time : t_time) = requires __m.get_wait_time() = c_wait_time : __m.reset_wait_time() end;
+		obs __call_OpticalAlarm_SetOff(c_wait_time : t_time) = requires __m.get_wait_time() = c_wait_time : __m.reset_wait_time() end
+	do
+	initialize()
+	[]
+		(
+			(
+				(
+						__chg_oclIsInStateArmedArmedOpen_on()
+					//
+						__chg_oclIsInStateArmedArmedOpen_off()
+				)
+			)
+		)
+		//
+		(
+			(
+				(
+					__mark_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_conditional_consumed()
+				)
+			//
+				(
+			# Transition: (FlashAndSound) ----> (Flash) [ TE30 ] 
+			(
+				transition_FlashAndSound_From_FlashAndSound_to_Flash_Transition_0_Flash_0_2
+				;
+				# exit actions for state FlashAndSound
+				 (  	(var __t0 : t_time : __call_AcousticAlarm_SetOff(__t0))
+				)
+			)
+				)// #4341
+				(
+					__mark_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_conditional_consumed()
+				)
+				//
+				(
+					__mark_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_conditional_consumed()
+				)
+			//
+				(
+			# Transition: (Alarm) ----> (Quiet) [ TE300 ] 
+			(
+				transition_Alarm_From_Alarm_to_Quiet_Transition_0_Quiet_0_1
+				;
+				# SubRegion: Region_0
+				(
+					# SubState: Flash
+					(
+						exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_Flash
+					)
+					[]
+					# SubState: FlashAndSound
+					(
+						exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_FlashAndSound;
+						# exit actions for state FlashAndSound
+						 (  	(var __t0 : t_time : __call_AcousticAlarm_SetOff(__t0))
+						)
+					)
+				);
+				# exit actions for state Alarm
+				 (  	(var __t0 : t_time : __call_OpticalAlarm_SetOff(__t0))
+				)
+			)
+					[]
+			# Transition: (Quiet) ----> (Alarm) [ ChangeEvent_1 ] 
+			(
+				transition_Quiet_From_Quiet_to_Alarm_Transition_0_Alarm_1_1
+				;
+				# entry actions for state "Alarm"
+				 (  	(var __t0 : t_time : __call_OpticalAlarm_SetOn(__t0));
+					(var __t0 : t_time : __call_AcousticAlarm_SetOn(__t0))
+				)
+			)
+					[]
+			# Transition: (ArmedClosed) ----> (ArmedOpen) [ SignalEvent_2 ] 
+			(
+				transition_ArmedClosed_From_ArmedClosed_to_Armedopen_Transition_0_ArmedOpen_0_3
+			)
+					[]
+			# Transition: (ArmedOpen) ----> (ArmedClosed) [ SignalEvent_3 ] 
+			(
+				transition_ArmedOpen_From_Armedopen_to_ArmedClosed_Transition_0_ArmedClosed_1_3
+			)
+				)// #4341
+				(
+					__mark_AlarmSystem_StateMachine_reg_Region_0_conditional_consumed()
+				)
+			//
+				(
+			# Transition: (Armed) ----> (OpenAndUnlocked) [ SEUnlock ] 
+			(
+				transition_Armed_From_Armed_to_Junction_0_Transition_0_From_Junction_0_to_OpenAndUnlocked_Transition_0_OpenAndUnlocked_0_0
+				;
+				# SubRegion: Region_0
+				(
+					# SubState: Alarm
+					(
+						# SubRegion: Region_0
+						(
+							# SubState: Flash
+							(
+								exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_Flash
+							)
+							[]
+							# SubState: FlashAndSound
+							(
+								exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_FlashAndSound;
+								# exit actions for state FlashAndSound
+								 (  	(var __t0 : t_time : __call_AcousticAlarm_SetOff(__t0))
+								)
+							)
+						);
+						exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Alarm;
+						# exit actions for state Alarm
+						 (  	(var __t0 : t_time : __call_OpticalAlarm_SetOff(__t0))
+						)
+					)
+					[]
+					# SubState: Quiet
+					(
+						exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Quiet
+					)
+				);
+				# SubRegion: Region_1
+				(
+					# SubState: ArmedClosed
+					(
+						exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed
+					)
+					[]
+					# SubState: ArmedOpen
+					(
+						exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen
+					)
+				);
+				# exit actions for state Armed
+				 (  	(var __t0 : t_time : __call_AlarmArmed_SetOff(__t0))
+				)
+			)
+					[]
+			# Transition: (Armed) ----> (ClosedAndUnlocked) [ SEUnlock ] 
+			(
+				transition_Armed_From_Armed_to_Junction_0_Transition_0_From_Junction_0_to_ClosedAndUnlocked_Transition_0_ClosedAndUnlocked_1_0
+				;
+				# SubRegion: Region_0
+				(
+					# SubState: Alarm
+					(
+						# SubRegion: Region_0
+						(
+							# SubState: Flash
+							(
+								exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_Flash
+							)
+							[]
+							# SubState: FlashAndSound
+							(
+								exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0__Alarm__reg_Region_0_FlashAndSound;
+								# exit actions for state FlashAndSound
+								 (  	(var __t0 : t_time : __call_AcousticAlarm_SetOff(__t0))
+								)
+							)
+						);
+						exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Alarm;
+						# exit actions for state Alarm
+						 (  	(var __t0 : t_time : __call_OpticalAlarm_SetOff(__t0))
+						)
+					)
+					[]
+					# SubState: Quiet
+					(
+						exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_0_Quiet
+					)
+				);
+				# SubRegion: Region_1
+				(
+					# SubState: ArmedClosed
+					(
+						exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedClosed
+					)
+					[]
+					# SubState: ArmedOpen
+					(
+						exit_AlarmSystem_AlarmSystem_StateMachine_reg_Region_0__Armed__reg_Region_1_ArmedOpen
+					)
+				);
+				# exit actions for state Armed
+				 (  	(var __t0 : t_time : __call_AlarmArmed_SetOff(__t0))
+				)
+			)
+					[]
+			# Transition: (ClosedAndLocked) ----> (Armed) [ TE20 ] 
+			(
+				transition_ClosedAndLocked_From_ClosedAndLocked_to_Armed_Transition_0_Armed_2_0
+				;
+				# entry actions for state "Armed"
+				 (  	(var __t0 : t_time : __call_AlarmArmed_SetOn(__t0))
+				)
+			)
+					[]
+			# Transition: (ClosedAndLocked) ----> (OpenAndLocked) [ SignalEvent_2 ] 
+			(
+				transition_ClosedAndLocked_From_ClosedAndLocked_to_OpenAndLocked_Transition_0_OpenAndLocked_3_0
+			)
+					[]
+			# Transition: (ClosedAndLocked) ----> (ClosedAndUnlocked) [ SignalEvent_0 ] 
+			(
+				transition_ClosedAndLocked_From_ClosedAndLocked_to_ClosedAndUnlocked_Transition_0_ClosedAndUnlocked_4_0
+			)
+					[]
+			# Transition: (ClosedAndUnlocked) ----> (ClosedAndLocked) [ SignalEvent_1 ] 
+			(
+				transition_ClosedAndUnlocked_From_ClosedAndUnlocked_to_ClosedAndLocked_Transition_0_ClosedAndLocked_5_0
+			)
+					[]
+			# Transition: (ClosedAndUnlocked) ----> (OpenAndUnlocked) [ SignalEvent_2 ] 
+			(
+				transition_ClosedAndUnlocked_From_ClosedAndUnlocked_to_OpenAndUnlocked_Transition_0_OpenAndUnlocked_6_0
+			)
+					[]
+			# Transition: (OpenAndLocked) ----> (OpenAndUnlocked) [ SignalEvent_0 ] 
+			(
+				transition_OpenAndLocked_From_OpenAndLocked_to_OpenAndUnlocked_Transition_0_OpenAndUnlocked_7_0
+			)
+					[]
+			# Transition: (OpenAndLocked) ----> (ClosedAndLocked) [ SignalEvent_3 ] 
+			(
+				transition_OpenAndLocked_From_OpenAndLocked_to_ClosedAndLocked_Transition_0_ClosedAndLocked_8_0
+			)
+					[]
+			# Transition: (OpenAndUnlocked) ----> (ClosedAndUnlocked) [ SignalEvent_3 ] 
+			(
+				transition_OpenAndUnlocked_From_OpenAndUnlocked_to_ClosedAndUnlocked_Transition_0_ClosedAndUnlocked_9_0
+			)
+					[]
+			# Transition: (OpenAndUnlocked) ----> (OpenAndLocked) [ SignalEvent_1 ] 
+			(
+				transition_OpenAndUnlocked_From_OpenAndUnlocked_to_OpenAndLocked_Transition_0_OpenAndLocked_10_0
+			)
+				)
+			//
+				__dequeue()
+			)
+		)
+	od
+]|
+
+system
+	__model
+	//
+		(
+			AlarmSystem
+		)
+	//
+		__environment
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/SkipStatement.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/SkipStatement.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/statements/SkipStatement.java	(revision 2)
@@ -0,0 +1,58 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.statements;
+
+import org.momut.ooas.ast.IAstVisitor;
+
+///////////////////////////////////////////////
+///  Simple Statements
+///
+public final class SkipStatement extends Statement
+{
+	public SkipStatement(int aline, int apos)
+	{
+		super (StatementKind.Skip, aline, apos);
+	}
+
+	public SkipStatement(SkipStatement copy)
+	{
+		super (copy);
+	}
+
+	@Override
+	public /*override*/ Statement Clone()
+	{
+		return new SkipStatement(this);
+	}
+
+	@Override
+	public /*override*/ void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+}
Index: trunk/compiler/ooasCompiler_tests/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/compiler/ooasCompiler_tests/.settings/org.eclipse.jdt.ui.prefs	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/.settings/org.eclipse.jdt.ui.prefs	(revision 2)
@@ -0,0 +1,54 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
Index: trunk/compiler/ooasCompiler_tests/.classpath
===================================================================
--- trunk/compiler/ooasCompiler_tests/.classpath	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/.classpath	(revision 2)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/OOASCompiler"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/AnyType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/AnyType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/AnyType.java	(revision 2)
@@ -0,0 +1,60 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+
+///////////////////////////////////////////////
+///  Special type: any  (used for free variables)
+///
+public final class AnyType extends UlyssesType
+{
+	private final ExpressionVariableIdentifier m_variableIdentifier;
+
+	public ExpressionVariableIdentifier VariableIdentifier() { return m_variableIdentifier; }
+
+	public AnyType(ExpressionVariableIdentifier freeVariable)
+	{
+		super(TypeKind.Any, null);
+		m_variableIdentifier = freeVariable;
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public String AnonymousName()
+	{
+		return "any";
+	}
+
+}
Index: trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/simpletest.ooas
===================================================================
--- trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/simpletest.ooas	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/simpletest.ooas	(revision 2)
@@ -0,0 +1,62 @@
+types
+	t_myInt = int [1..9];
+	t_myBigInt = int [2..100];
+	t_innerTuple = (int[0..100], t_daysOfWeek);
+	t_myTuple = (t_myInt, t_innerTuple);
+	t_eventname_AlarmSystem = {__received_AlarmSystem_Close, __received_AlarmSystem_Lock, __received_AlarmSystem_Open, __received_AlarmSystem_Unlock, __time_trigger_ClosedAndLocked_TE20_Armed, __change_trigger_AlarmSystem_oclIsInStateArmedArmedOpen, __time_trigger_Alarm_TE300_Quiet, __time_trigger_FlashAndSound_TE30_Flash};
+	t_daysOfWeek = {__Sunday=3, __Monday=1};
+	t_tupleOfLists = (list[10] of t_myInt, list[2] of t_myInt);
+	
+	__model = autocons system |[
+		var
+			alarmSysInstance : AlarmSystem = new(AlarmSystem, "AlarmSystemInstance_1");
+			backupSysInstance_1 : BackupSystem = new(BackupSystem, "BackupInstance_1");
+			subSystemInstance : SubSystem = new (SubSystem, "SubInstance_1");
+			subsubSystemInstance : SubSystem = new (SubSubSystem, "SubSubInstance_1")
+	]|;
+	
+	BackupSystem = system |[
+		var
+			u : t_myInt = 3;
+			y : int [8..8] = 8;
+			list1 : list[4] of t_myInt = [8, 3, 2, 1];
+			list2 : list[4] of t_myInt = [nil];
+			listOfLists : list[22] of list[3] of t_myInt = [[3,8,7],[1],[2,3]];
+			listOfListsOfLists : list[22] of list[3] of list[3] of t_myInt = [[[3,7,9],[1],[2,3]], [[1],[1,2],[7,3]]];
+			listOfTuples : list[10] of t_innerTuple = [t_innerTuple(3, __Sunday), t_innerTuple(4, __Monday)];
+			tupleOfLists : t_tupleOfLists = t_tupleOfLists([1,2],[9]);
+			metuple : t_myTuple = t_myTuple(1,t_innerTuple(1,__Monday));
+			letuple : t_innerTuple = t_innerTuple(1,__Sunday);
+			event : t_eventname_AlarmSystem = __received_AlarmSystem_Close;
+			initialized : bool = true or false;
+			#primes : list[40] of t_myBigInt = [x | var x: t_myBigInt & (forall tmp : t_myBigInt : (tmp < x => (x mod tmp <> 0)))];
+			#concatList : list[2] of t_myInt = [1] ^ [1];
+			alarmSysRef : AlarmSystem = nil
+		methods
+			mulSum (N : t_myInt, M : t_myInt) : int[-20..100] =
+				result := N
+			end;
+			
+			isInList(x: t_myInt) : bool = 
+				result := x in list1
+			end
+	]|;
+	
+	AlarmSystem = system |[
+		var
+			x : t_myBigInt = 10
+			#backupSysRef : BackupSystem = nil
+	]|;
+	
+	SubSystem = system(AlarmSystem) |[
+		var
+			childspecificvar : int[22..33] = 30
+	]|;
+	
+	SubSubSystem = system(SubSystem) |[
+		var
+			zzz : int[22..33] = 30
+	]|
+	
+system
+	__model	// AlarmSystem // BackupSystem
Index: trunk/compiler/ooasCompiler_tests/build.xml
===================================================================
--- trunk/compiler/ooasCompiler_tests/build.xml	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/build.xml	(revision 2)
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="MoMuT Test" default="buildTests" basedir=".">
+	<!-- The directory containing the executable MoMuT jar file -->
+	<property name="momutDir"       value="../momut/MoMuT"  />
+	<!-- The name of the destination .jar file copied from the MoMuT project. -->
+	<property name="momutJar"       value="MoMuT.jar"    />
+	<property name="libs"           value="lib"          />
+	<property name="src"            value="src"          />	
+	<property name="bin"            value="bin"          />
+	<property name="build.number"   value="default"      />
+	<property name="reports.dir"    value="reports"      />
+	<property name="reports"        value="${reports.dir}/build-${build.number}"      />
+	<property name="temp.dir"       value="temp"                                    />
+	<property name="momut.temp.dir" value="${temp.dir}/build-${build.number}"       />
+	
+	<path id="classpath">
+		<fileset dir="${libs}">
+			<include name="**/*.jar" />
+		</fileset>
+		<fileset dir="${bin}">
+			<include name="**/*.jar" />	
+		</fileset>
+		<pathelement location="${bin}" />
+	</path>
+
+	<!-- Target to initialize common resources (e.g. create directories, timestamps, etc.) -->
+	<target name="init" description="Initialize build process">
+		<echo>Initilize build process...</echo>
+		<echo>MoMuT temp directory set to ${momut.temp.dir}</echo>
+		<mkdir dir="${bin}"             />
+		<mkdir dir="${reports}"                 />
+		<mkdir dir="${temp.dir}"                />
+		
+		<!-- Copy the .jar file of the MoMuT project into current workspaces ${lib} directory. -->
+		<copy tofile="${libs}/${momutJar}" overwrite="yes">
+			<fileset dir="${momutDir}" includes="*.jar"/>
+		</copy>
+	</target>
+
+	<!-- Target to build all the junit test environment -->
+	<target name="buildTests" depends="init" description="Build the java test classes">
+		<javac srcdir="${src}" destdir="${bin}" debug="false" deprecation="true" optimize="true" includeantruntime="false">
+			<classpath refid="classpath"/>	
+		</javac>
+		<copyResources/>
+	</target>
+
+	<!-- Target to execute all UML2OOAS test -->
+	<target name="testUml2OoasSuite" depends="buildTests" description="Run all UML2OOAS tests as suite">
+		<echo>Running Uml2Ooas tests (working directory: ${basedir})</echo>
+		<mkdir dir="${reports}/uml2ooas/" />
+		<junit haltonfailure="no" printsummary="yes" showoutput="true">
+			<classpath refid="classpath"/>
+			<!-- Avoid using showoutput="true" and formatters..?. -->
+			<!-- <formatter type="plain"  />  to screen -->
+			<formatter type="xml" /> <!-- to file -->
+			<batchtest fork="true" todir="${reports}/uml2ooas/">
+				<fileset dir="${src}">
+					<include name="**/uml2ooas/AllUml2OoasTests.java" />
+				</fileset>
+			</batchtest>
+			<jvmarg value="-Dmomut.temp.dir=${momut.temp.dir}"/>
+		</junit>
+	</target>
+	
+	<!-- Target to execute all tests -->
+	<target name="testAllSuite" depends="buildTests" description="Run all tests as suite">
+		<mkdir dir="${reports}/all/" />
+		<junit haltonfailure="no" printsummary="yes" showoutput="true">
+			<classpath refid="classpath"/>
+			<!-- Avoid using showoutput="true" and formatters...? -->
+			<!--  <formatter type="plain" /> to screen -->
+			<formatter type="xml" />   <!-- to file -->
+			<batchtest fork="true" todir="${reports}/all/">
+				<fileset dir="${src}">
+					<include name="**/uml/AllUmlTests.java" />
+				</fileset>
+			</batchtest>
+			<jvmarg value="-Dmomut.temp.dir=${momut.temp.dir}"/>
+		</junit>
+	</target>
+	
+	<!-- Target to execute all smoke tests -->
+	<target name="testAllSmoke" depends="buildTests" description="Run all tests as suite">
+		<mkdir dir="${reports}/all-smoke/" />
+		<junit haltonfailure="no" printsummary="yes" showoutput="true">
+			<classpath refid="classpath"/>
+			<!-- Avoid using showoutput="true" and formatters...? -->
+			<!--  <formatter type="plain" /> to screen -->
+			<formatter type="xml" />   <!-- to file -->
+			<batchtest fork="true" todir="${reports}/all-smoke/">
+				<fileset dir="${src}">
+					<include name="**/uml/SmokeUmlTests.java" />
+				</fileset>
+			</batchtest>
+			<jvmarg value="-Dmomut.temp.dir=${momut.temp.dir}"/>
+		</junit>
+	</target>
+
+	<!-- Macro to copy the resources from the ${src} directory into the ${bin} directory -->
+	<macrodef name="copyResources">
+		<sequential>
+			<copy todir="${bin}">
+				<fileset dir="${src}">
+					<exclude name="**/*.java"/>
+				</fileset>
+			</copy>
+		</sequential>
+	</macrodef>
+
+	<!-- Target to clean all the resources created by a build process -->
+	<target name="clean">
+		<echo>Cleanup directories...</echo>
+		<delete dir="${bin}"               />
+		<delete dir="${ant.libs}"          />
+		<delete dir="${reports.dir}"       />
+		<delete dir="${momut.temp.dir}"    />
+		<delete dir="${temp.dir}"          />
+		<delete file="${libs}/${momutJar}" />
+	</target>
+	
+	<target name="emptyTest" depends="buildTests" description="Run an empty test (Useful for testing dependencies)">
+		<echo>Empty Test</echo>
+	</target>
+
+</project>
\ No newline at end of file
Index: trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/inlinetest.ooas
===================================================================
--- trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/inlinetest.ooas	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/inlinetest.ooas	(revision 2)
@@ -0,0 +1,114 @@
+types
+	t_myInt = int [1..9];
+	t_eventname_MainSignal = {__received_MainSignal_esp_v_zi, __received_MainSignal_esp_z_zi, __received_MainSignal_esp_zv_zi, __received_MainSignal_mas_esp, __received_MainSignal_mas_lp1_in, __received_MainSignal_mas_lp1_out, __received_MainSignal_mas_lp2_in, __received_MainSignal_mas_lp2_out, __received_MainSignal_mas_sp, __received_MainSignal_mas_stoe_lg1, __received_MainSignal_mas_stoe_lg1_beh, __received_MainSignal_mas_stoe_lg2, __received_MainSignal_mas_stoe_lg2_beh, __received_MainSignal_mas_stoe_lo, __received_MainSignal_mas_stoe_lo_beh, __received_MainSignal_mas_stoe_lr, __received_MainSignal_mas_stoe_lr_beh, __received_MainSignal_sig_halt, __received_MainSignal_sp_v_zi, __received_MainSignal_sp_z_zi, __received_MainSignal_sp_zv_zi};
+	t_event_MainSignal = (t_eventname_MainSignal);
+	t_myList = list[34] of t_event_MainSignal;
+	MySystem = autocons system |[
+		var
+			a : t_myInt = 1
+		methods
+			func(x: t_myInt, y: t_myInt) : t_myInt =
+				result := x 
+				// 
+					( result := 9 
+					[]
+					  result := y )
+#				//
+#				result := 8
+			end
+		actions
+			a0 (b: t_myInt, c: t_myInt) = requires b = 1 and c = 3:
+				skip
+#				break
+			end;
+			a1 = requires a > 0:
+				a := 8;
+				requires a >= 8:
+					a := 7
+				end
+			end;
+			a2 (b: t_myInt, c: int[-2..5]) = requires b = func(a,1):
+				skip
+#				break
+			end;
+			a3 = requires a >= 7:
+				a := 1
+			end;
+			f1 = requires forall x:t_myInt, b:int[-2..5]: (x+b < 10000):
+				skip
+			end
+		do
+			f1
+			[]
+			var v: t_myInt; v2: int[-2..5]: a2(v, v2)
+			[]
+			var x: t_myInt; y: t_myInt : a0(x,y)
+			[]
+			a3
+			[]
+			a1; a3
+			[]
+			a3
+		od
+	]|
+	;
+	OtherSystem = autocons system |[
+		var zz: MySystem = nil;
+			__events : t_myList = [nil];
+			l2: t_myList = [nil];
+			l3: list[3] of int[-2..2] = [0,1,2]
+		methods
+			__rcv_mas_lp2_out =
+				self.__events := self.__events ^ [t_event_MainSignal(__received_MainSignal_mas_lp2_out)]
+			end;
+			getlist: t_myList = result := self.__events ^ [t_event_MainSignal(__received_MainSignal_esp_v_zi)] end;
+			setlist(input:t_myList) = var tmp: t_myList begin tmp := input; self.__events := tmp end
+		actions
+			x = requires zz = nil:
+				__rcv_mas_lp2_out();
+				l2 := getlist();
+				setlist(__events)
+#				;break
+			end
+		do
+			x; requires 1 in l3: skip end
+		od
+	]|;
+	t_time = int [0..300];
+	t_AlarmSystem_time_triggers = {
+		AlarmSystem_notimetrigger,
+		ClosedAndLocked_TE20_Armed,
+		Alarm_TE300_Quiet,
+		FlashAndSound_TE30_Flash
+	};
+	t_AlarmSystem_timers = (ListComprehensionTest, t_AlarmSystem_time_triggers);
+	t_timer_classentries = (t_AlarmSystem_timers);
+	t_timer = (t_time, t_timer_classentries);
+	
+	ListComprehensionTest = autocons system |[
+	var
+		timers : list [3] of t_timer = [t_timer(10,t_timer_classentries(t_AlarmSystem_timers(nil,Alarm_TE300_Quiet)))];
+		timers_due : list [10] of t_timer_classentries = [nil] #;
+#		test: t_timer_classentries = t_timer_classentries(t_AlarmSystem_timers(nil,Alarm_TE300_Quiet))
+	actions
+		test(aTime: t_time) = requires t_timer(aTime,t_timer_classentries(t_AlarmSystem_timers(nil,Alarm_TE300_Quiet))) in timers:
+#			break;
+			timers_due := [x | var x : t_timer_classentries & t_timer(aTime,x) in timers] #;
+#			break
+		end
+#		test2(input:t_timer_classentries) = requires true:
+#			test := input;
+#			break
+#		end
+	do
+		var t: t_time: test(t)
+#		var x: t_timer_classentries: test2(x)
+	od
+	]|
+	
+system
+	OtherSystem [] MySystem [] ListComprehensionTest
+#	OtherSystem [] MySystem
+#	MySystem [] OtherSystem
+#	OtherSystem // MySystem
+#	MySystem // OtherSystem
Index: trunk/compiler/serialization/run_protoc.sh
===================================================================
--- trunk/compiler/serialization/run_protoc.sh	(nonexistent)
+++ trunk/compiler/serialization/run_protoc.sh	(revision 2)
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+#           DO NOT MODIFY THIS SCRIPT         !!
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+# This script will compile all .proto files found in serialization/src
+# Invocation: ./run_protoc.sh /path/to/protoc
+
+PROTOC="$1"
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+INCLUDE=${DIR}/src
+MOMUT=${DIR}/..
+JAVA_OUT=${MOMUT}/src
+CPP_OUT=${MOMUT}/executor/source/runtime/serialize/gen
+
+if [[ -z PROTOC ]]; then
+	echo usage: $0 '/path/to/yourProtocExecutable';
+	exit 1;
+fi
+
+${PROTOC} -I=${INCLUDE} --java_out=${JAVA_OUT} --cpp_out=${CPP_OUT} ${INCLUDE}/*.proto
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/FloatType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/FloatType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/FloatType.java	(revision 2)
@@ -0,0 +1,70 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+
+///////////////////////////////////////////////
+///  Simple Type: Float (fixed point)
+///
+public final class FloatType extends UlyssesType
+{
+	private final double m_low;
+	private final double m_high;
+	private final double m_precision;
+
+	public double low() { return m_low; }
+	public double high() { return m_high; }
+	public double precision() { return m_precision; }
+	public static double defaultPrecision() { return Double.MIN_VALUE; } /// fixme
+
+	public FloatType(double low, double high, double precision, TypeIdentifier anIdentifier)
+	{
+		super(TypeKind.FloatType, anIdentifier);
+		m_low = low;
+		m_high = high;
+		m_precision = precision;
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public /*override*/ String AnonymousName()
+	{
+		String name = String.format("float_%s_%s_%s",
+			m_low < 0 ? "m" + Double.toString(Math.abs(m_low)) : Double.toString(m_low),
+			Double.toString(m_high),
+			Double.toString(m_precision));
+		return name.replace(".", "");
+	}
+}
Index: trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/mostbasic.ooas
===================================================================
--- trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/mostbasic.ooas	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/mostbasic.ooas	(revision 2)
@@ -0,0 +1,44 @@
+types
+	t_myInt = int[1..40];
+	t_myList = list[4] of t_myInt;
+	
+	__model = autocons system |[
+		var
+			a : int[1..10] = 3;
+			x : t_myList = [1,2,3,4];
+			y : bool = false
+		methods
+			lesumme(valA : t_myInt, valB : t_myInt) : t_myInt =
+				result := valA + valB
+			end;
+			
+			leconcat(valA : t_myList, valB : t_myInt) : t_myList =
+				result := valA ^ [valB]
+			end
+			
+		actions
+			check = requires true :
+				y := forall tmp : t_myInt, tmp2 : t_myInt : (tmp in x and tmp < 5 and tmp2 < 10)
+			end;
+			after = requires (
+					(forall i : int [0..5] : (((i >= 0) and (i<4)) => (a <= 5 )))
+					and (exists i : int [0..5] : (((i >= 0) and (i<4)) => (a <= 5 )))
+				) :
+					y := true
+			end;
+			
+			foldCat = requires true :
+				x := leconcat() :: ([nil]) :>: (x)
+			end;
+			
+			foldSum = requires true :
+				a := lesumme() :: (0) :>: (x)
+			end
+			
+		do
+			check
+		od
+	]|
+	
+system
+	__model
Index: trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/slicetest.ooas
===================================================================
--- trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/slicetest.ooas	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/slicetest.ooas	(revision 2)
@@ -0,0 +1,84 @@
+
+#
+# Test the slicing
+#
+
+types
+int32 = int [0..32];
+__model = autocons system |[
+	var
+		sut : TestOoas = new (TestOoas);
+		env : __environment = new(__environment, "__Environment");
+		initialized: bool = false;
+		a: int32 = 0;
+		b: int32 = 0;
+		c: int32 = 0
+	methods
+		get_sut : TestOoas =
+			result := self.sut
+		end
+	actions
+		initialize = requires (not self.initialized) :
+			env.init(self);
+			self.initialized := true
+		end;
+		multiRequires =
+			requires a > 10:
+				a := 3;
+				c := 12;
+				requires b > 5 and a = 3:
+					sut.dosomeA.dosomeB(c)
+					[]
+					sut.dosomeB(20)
+				end
+			end
+			
+/*
+		Depends on:  __model: self.a, self.b, 
+		            TestOoas: self.sut.z
+
+		inlining all the stuff:
+		multiRequires =
+			requires a>10:
+				a1 := 3;
+				c1 := 12;
+				requires b > 5 and a1 = 3:
+					TestOoas tmp1;
+					requires sut.z = 10: tmp1 := sut end; # tmp1 := sut.dosomeA
+					requires c1 > 10: skip end            # tmp1.dosomeB(c)
+				end
+			end
+		
+		optimization:
+		multiRequires =
+			requires a>10:
+				requires b > 5:
+					requires sut.z = 10: skip end
+				end
+			end
+*/
+	do
+		initialize
+	od
+]|;
+
+TestOoas = system |[
+	var
+		z: int32 = 10
+	methods
+		dosomeA: TestOoas = requires z = 10: result := self end end;
+		dosomeB(x:int32) = requires x>10: skip end end 
+]|;
+
+__environment = system |[
+	var
+		model: __model = nil
+	methods
+		init(m: __model) = 
+			model := m
+		end
+]|
+
+
+system
+	__model // TestOoas // __environment
\ No newline at end of file
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/MapType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/MapType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/MapType.java	(revision 2)
@@ -0,0 +1,83 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+
+///////////////////////////////////////////////
+///  Complex Type: Map
+///
+public final class MapType extends UlyssesType
+{
+	private UlyssesType m_fromType;
+	private UlyssesType m_toType;
+	private final int m_maxNumberOfElements;
+
+	public UlyssesType fromType() { return m_fromType; }
+	public UlyssesType toType() { return m_toType; }
+	public int maxNumberOfElements() { return m_maxNumberOfElements; }
+
+	public MapType(UlyssesType from, UlyssesType to, int max, TypeIdentifier anIdentifier)
+	{
+		super(TypeKind.MapType, anIdentifier);
+		m_fromType = from;
+		m_toType = to;
+		m_maxNumberOfElements = max;
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	public void SetFromType(UlyssesType newType)
+	{
+		if (newType == null)
+			throw new ArgumentException();
+		m_fromType = newType;
+	}
+
+	public void SetToType(UlyssesType newType)
+	{
+		if (newType == null)
+			throw new ArgumentException();
+		m_toType = newType;
+	}
+
+	@Override
+	public /*override*/ String AnonymousName()
+	{
+		return String.format("map_%s_%s_%s",
+				m_maxNumberOfElements,
+				m_fromType != null ? m_fromType.toString() : "uninit",
+				m_toType != null ? m_toType.toString() : "uninit");
+	}
+}
Index: trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/utils/OoasTest.java
===================================================================
--- trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/utils/OoasTest.java	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/utils/OoasTest.java	(revision 2)
@@ -0,0 +1,104 @@
+package org.momut.ooas.test.utils;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+import org.junit.Assert;
+import org.momut.ooas.Compiler;
+import org.momut.ooas.Compiler.ILogCallBack;
+import org.momut.ooas.CompilerConfiguration.Backend;
+
+
+
+/**
+ * Base class for MoMuT Test classes
+ * @author DemetzM
+ * @author KrennW
+ *
+ */
+public abstract class OoasTest {
+	/// static stuff
+	private static final String  s_COMPILER_TEMP_DIR = "ooasComp.temp.dir";
+	private static final String  s_tempDir        = System.getProperty(OoasTest.s_COMPILER_TEMP_DIR);
+	private static final boolean s_hasTempDir     = s_tempDir != null && !s_tempDir.isEmpty();
+
+	protected static final String s_modelsDir = "org/momut/ooas/test/models";
+	protected static final String s_standardDir = s_modelsDir + "/standard/";
+	protected static final String s_complexDir = s_modelsDir + "/complex/";
+
+	protected static File createTempDirectory(String dirName) throws IOException {
+		return Files.createTempDirectory(dirName).toFile();
+	}
+
+	protected static File createTempDirectory(String prefix, String directoryName) throws IOException {
+		final File file = new File(prefix);
+		if (!file.exists())
+			file.mkdirs();
+
+		return Files.createTempDirectory(Paths.get(prefix), directoryName).toFile();
+	}
+
+
+	/**
+	 * Creates an temporary directory either in the system's default
+	 * temp directory or in the directory specified via the "momut.temp.dir"
+	 * environment variable.
+	 * @param clazz A class. Used to name the directory: "MoMuT_" + clazz.getSimpleName()
+	 * @return file object pointing to the newly created temp. dir.
+	 * @throws IOException
+	 */
+	protected static File createOutputDirectory(Class<?> clazz) throws IOException {
+		final String dirName = "MoMuT_" + clazz.getSimpleName() + "_";
+		if (s_hasTempDir)
+			return createTempDirectory(s_tempDir, dirName);
+		return createTempDirectory(dirName);
+	}
+
+
+	/// instance stuff
+	public final String m_testName;
+	public final String m_model;
+
+
+	public OoasTest(String testName, String model) {
+		m_testName = testName;
+		m_model = model;
+	}
+
+
+	/** Run the OOAS Compiler and check whether there were any errors during compilation.
+	 * @param outputDir
+	 * @throws IOException */
+	private static void runOoasCompiler(String testName, File ooasFile, Backend backend, File outputDir) throws IOException {
+		final byte[] ooasInput = Files.readAllBytes(ooasFile.toPath());// ooasCode.getBytes("UTF-8");
+		final FileOutputStream compilerFileOutput = new FileOutputStream(new File(outputDir, String.format("%s.compiler", testName.replace("/", "."))));
+		final Compiler compiler = new Compiler(
+				testName,
+				new ByteArrayInputStream(ooasInput),
+				compilerFileOutput,
+				backend);
+		final int errors = compiler.compile( new ILogCallBack(){
+			@Override
+			public void logError(boolean toConsole, String message) {
+				System.out.println(message);
+			}} );
+		compilerFileOutput.flush();
+		compilerFileOutput.close();
+		if (errors != 0) {
+			System.out.println("##Faulty OOAS produced for " + testName);
+		}
+		Assert.assertEquals(
+				String.format("Errors during ooas compiler run: %s", compiler.toString()),
+				0,
+				errors);
+	}
+
+	public static void runOoasCompiler(String testName, File ooasFile, File outputDir, Backend backend) throws IOException {
+		runOoasCompiler(testName, ooasFile, backend, outputDir);
+	}
+
+}
Index: trunk/compiler/serialization/src/FunctionNames.proto
===================================================================
--- trunk/compiler/serialization/src/FunctionNames.proto	(nonexistent)
+++ trunk/compiler/serialization/src/FunctionNames.proto	(revision 2)
@@ -0,0 +1,89 @@
+package serialize;
+
+option java_package = "org.momut.ooas.codegen.ast.protobuf.gen";
+option java_outer_classname = "FunctionNames";
+
+enum PBAdd {
+	TIRESIAS_ADD_IDENTIFIERTOLIST           = 0;
+	TIRESIAS_ADD_TYPETOLIST                 = 1;
+	TIRESIAS_ADD_STATEMENTTOLIST            = 2;
+	TIRESIAS_ADD_EXPRESSIONTOLIST           = 3;
+	TIRESIAS_ADD_IDTOSYMBTAB                = 4;
+	TIRESIAS_ADD_PARAMTOLIST                = 5;
+	TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST = 6;
+	TIRESIAS_ADD_IDENTIFIERTOBLOCK          = 7;
+}
+
+enum PBAllocation {
+	TIRESIAS_CREATE_IDENTIFIER               = 0;
+	TIRESIAS_CREATE_TYPE                     = 1;
+	TIRESIAS_CREATE_STATEMENT                = 2;
+	TIRESIAS_CREATE_EXPRESSION               = 3;
+	TIRESIAS_CREATE_STATEMENTLIST            = 4;
+	TIRESIAS_CREATE_EXPRESSIONLIST           = 5;
+	TIRESIAS_CREATE_IDENTIFIERLIST           = 6;
+	TIRESIAS_CREATE_SYMBTAB                  = 7;
+	TIRESIAS_CREATE_PARAMLIST                = 8;
+	TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE     = 9;
+	TIRESIAS_CREATE_TYPELIST                 = 10;
+	TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST = 11;
+	TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE       = 12;
+}
+
+enum PBIdentifiers {
+	TIRESIAS_INIT_ENUMIDENTIFIER    = 1;
+	TIRESIAS_INIT_CONSTIDENTIFIER   = 2;
+	TIRESIAS_INIT_ATTRIDENTIFIER    = 3;
+	TIRESIAS_INIT_EXPRVARIDENTIFIER = 4;
+	TIRESIAS_INIT_PARAMIDENTIFIER   = 5;
+	TIRESIAS_INIT_LOCVARIDENTIFIER  = 6;
+	TIRESIAS_INIT_TYPEIDENTIFIER    = 7;
+	TIRESIAS_INIT_SELFIDENTIFIER    = 8;
+	TIRESIAS_INIT_METHODIDENTIFIER  = 9;
+	TIRESIAS_INIT_MODULE            = 10;
+	TIRESIAS_INIT_MAINMODULE        = 0;
+}
+
+enum PBTypes {
+	TIRESIAS_INIT_INTTYPE              = 1;
+	TIRESIAS_INIT_BOOLTYPE             = 2;
+	TIRESIAS_INIT_VALUEDENUMTYPE       = 3;
+	TIRESIAS_INIT_ENUMTYPE             = 4;
+	TIRESIAS_INIT_LISTTYPE             = 5;
+	TIRESIAS_INIT_TUPLETYPE            = 6;
+	TIRESIAS_INIT_FUNCTIONTYPE         = 7;
+	TIRESIAS_INIT_ACTIONSYSTEMINSTANCE = 8;
+	TIRESIAS_INIT_ACTIONSYSTEMTYPE     = 9;
+	TIRESIAS_INIT_NULLTYPE             = 0;
+}
+
+enum PBStatements{
+	TIRESIAS_INIT_SKIP           = 3;
+	TIRESIAS_INIT_BREAK          = 4;
+	TIRESIAS_INIT_ABORT          = 5;
+	TIRESIAS_INIT_NONDETBLOCK    = 6;
+	TIRESIAS_INIT_SEQBLOCK       = 7;
+	TIRESIAS_INIT_PRIOBLOCK      = 8;
+	TIRESIAS_INIT_GUARDEDCOMMAND = 2;
+	TIRESIAS_INIT_ASSIGNMENT     = 1;
+	TIRESIAS_INIT_CALL           = 0;
+}
+
+enum PBExpressions{
+	TIRESIAS_INIT_TYPEEXPRESSION           = 4;
+	TIRESIAS_INIT_IDENTIFIEREXPRESSION     = 5;
+	TIRESIAS_INIT_UNARYEXPRESSION          = 6;
+	TIRESIAS_INIT_BINARYEXPRESSION         = 7;
+	TIRESIAS_INIT_TERNARYEXPRESSION        = 8;
+	TIRESIAS_INIT_INTVALUEEXPRESSION       = 9;
+	TIRESIAS_INIT_BOOLVALUEEXPRESSION      = 10;
+	TIRESIAS_INIT_REFVALUEEXPRESSION       = 11;
+	TIRESIAS_INIT_LISTCONSTRUCTOR          = 12;
+	TIRESIAS_INIT_SETCONSTRUCTOR           = 13;
+	TIRESIAS_INIT_TUPLECONSTRUCTOR         = 14;
+	TIRESIAS_INIT_ACCESSEXPRESSION         = 15;
+	TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION = 3;
+	TIRESIAS_INIT_CALLEXPRESSION           = 2;
+	TIRESIAS_INIT_QUANTIFIEREXPRESSION     = 1;
+	TIRESIAS_INIT_OBJECTCONSTRUCTOR        = 0;
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/OpaqueType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/OpaqueType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/OpaqueType.java	(revision 2)
@@ -0,0 +1,66 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+
+///////////////////////////////////////////////
+///  Opaque Type..
+///
+public class OpaqueType extends UlyssesType
+{
+	private UlyssesType m_resolvedType;
+
+	public UlyssesType resolvedType() { return m_resolvedType; }
+
+	public OpaqueType(TypeIdentifier reference)
+	{
+		super(TypeKind.OpaqueType, reference);
+	}
+
+	public void SetResolvedType(UlyssesType aType)
+	{
+		m_resolvedType = aType;
+	}
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		visitor.visit(this);
+	}
+
+	@Override
+	public /*override*/ String AnonymousName()
+	{
+		if (m_resolvedType == null)
+			return "undef";
+		else
+			return m_resolvedType.toString();
+	}
+}
Index: trunk/compiler/serialization/src/Record.proto
===================================================================
--- trunk/compiler/serialization/src/Record.proto	(nonexistent)
+++ trunk/compiler/serialization/src/Record.proto	(revision 2)
@@ -0,0 +1,41 @@
+import "FunctionNames.proto";
+
+package serialize;
+
+option java_package = "org.momut.ooas.codegen.ast.protobuf.gen";
+option java_outer_classname = "RecordedAstTraversal";
+
+message PBParameter {
+	optional uint64 uint64_value   = 1; // meant for references, but may be used for actual uint64 values too (if they're needed in the future)
+	optional string literal_value  = 2;
+	optional bool bool_value       = 3;
+	optional int32 int32_value     = 4;
+	optional uint32 uint32_value   = 5;
+}
+
+enum PBReturnType {
+	type_voidPointer = 1;
+	type_boolean     = 2;
+}
+
+message PBReturnValue {
+	required PBReturnType return_type = 1;
+	optional uint64 return_id         = 2;
+}
+
+message PBFunctionCall {
+	optional PBAdd add                  = 1;
+	optional PBAllocation allocate      = 2;
+	optional PBIdentifiers identifier   = 3;
+	optional PBTypes type               = 4;
+	optional PBStatements statement     = 5;
+	optional PBExpressions expression   = 6;
+	
+	repeated PBParameter parameters     = 7;
+	required PBReturnValue return_value = 8;
+}
+
+message PBAstTraversal {
+	repeated PBFunctionCall calls = 1;
+	required uint64 main_module   = 2;
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/UlyssesType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/UlyssesType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/UlyssesType.java	(revision 2)
@@ -0,0 +1,591 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.ast.types;
+
+import java.util.Iterator;
+
+import org.momut.ooas.ast.AstNode;
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.utils.exceptions.OoasCompilerRuntimeException;
+
+public abstract class UlyssesType extends AstNode implements IAst
+{
+	private String m_origAnonName;
+	protected TypeKind m_kind;
+	protected TypeIdentifier m_identifier;
+	protected int m_hash;
+	//    protected long TimeStamp = DateTime.Now.Ticks;
+
+
+	public TypeKind kind() { return m_kind; }
+
+	public TypeIdentifier identifier() {
+		synchronized(this) {
+			if (m_identifier == null)
+				SetupAnonymousName();
+		}
+		return m_identifier;
+	}
+
+	public boolean isAnonymousType() {
+		final String anonName = AnonymousName();
+		if (!m_origAnonName.equals(anonName))
+			throw new OoasCompilerRuntimeException("Internal Error: Anonymous Name changed from '%s' to '%s'.", m_origAnonName, anonName);
+		return anonName.equals(m_identifier.tokenText());
+	}
+
+	protected UlyssesType(TypeKind aKind, TypeIdentifier anIdentifier)
+	{
+		m_kind = aKind;
+		m_identifier = anIdentifier;
+		m_hash = aKind.toString().hashCode(); //Enum.GetName(typeof(TypeKind), aKind).GetHashCode();
+	}
+
+	@Override
+	public /*override*/ String toString()
+	{
+		return identifier().tokenText();
+	}
+
+	public /*virtual*/ String AnonymousName()
+	{
+		throw new NotImplementedException();
+	}
+
+
+	public void SetTypeIdentifier(TypeIdentifier anId)
+	{
+		m_identifier = anId;
+	}
+
+	public void SetupAnonymousName()
+	{
+		if (m_identifier == null)
+		{
+			final String anonymousName = this.AnonymousName();
+			m_identifier = new TypeIdentifier(anonymousName, this, null);
+			m_origAnonName = anonymousName;
+		}
+	}
+
+
+	@Override
+	public AstNodeTypeEnum nodeType() { return AstNodeTypeEnum.type; }
+
+	@Override
+	public void Accept(IAstVisitor visitor)
+	{
+		throw new NotImplementedException();
+	}
+
+
+
+	public boolean IsNumeric()
+	{
+		final Object o = this;
+		return (m_kind == TypeKind.IntType) ||
+				(m_kind == TypeKind.FloatType) ||
+				(m_kind == TypeKind.EnumeratedType && o instanceof ValuedEnumType);
+	}
+
+	public boolean IsQualitative()
+	{
+		return (m_kind == TypeKind.QrType);
+	}
+
+
+
+	public static String High(UlyssesType atype)
+	{
+		switch (atype.kind())
+		{
+			case BoolType:
+				return "1";
+			case EnumeratedType:
+				return Integer.toString((((EnumType)atype).listOfEnumSymbols().size() - 1));
+			case IntType:
+				return Integer.toString(((IntType)atype).rangeHigh());
+			case FloatType:
+				return Double.toString(((FloatType)atype).high());
+//			case TypeKind.QrType:
+//				return (((QrType)atype).landmarks.Count - 1).ToString();
+			default:
+				throw new NotImplementedException();
+		}
+	}
+
+	public static String Low(UlyssesType atype)
+	{
+		switch (atype.kind())
+		{
+			case BoolType:
+				return "0";
+			case EnumeratedType:
+				return "0";
+			case IntType:
+				return Integer.toString(((IntType)atype).rangeLow());
+			case FloatType:
+				return Double.toString(((FloatType)atype).low());
+//			case TypeKind.QrType:
+//				return "0";
+			default:
+				throw new NotImplementedException();
+		}
+	}
+
+
+	/// <summary>
+	///  Returns a cover for two types (if possible).
+	///  note the cover type for two ints, floats, etc. will have max/min values
+	///  that reflect the maximum of the two operands.
+	/// </summary>
+
+	public static UlyssesType CoverType(UlyssesType type1, UlyssesType type2)
+	{
+		/*first some sanity checks*/
+		if (type1 == null)
+			throw new ArgumentException("type1 null");
+		if (type2 == null)
+			throw new ArgumentException("type2 null");
+
+		if (type1.kind() == TypeKind.OpaqueType)
+			throw new ArgumentException("type1 opaque type");
+		if (type2.kind() == TypeKind.OpaqueType)
+			throw new ArgumentException("type2 opaque type");
+
+		if (type1 == type2)
+			return type1;
+		if (UlyssesType.TypeEqual(type1, type2))
+			return type1;
+
+		final TypeKind tk1 = type1.kind();
+		final TypeKind tk2 = type2.kind();
+
+
+
+		if (tk1 != tk2)
+		{
+			// the only notion we support here is int->float and valenum -> int
+			if ((tk1 == TypeKind.IntType || tk2 == TypeKind.IntType)
+					&& (tk1 == TypeKind.FloatType || tk2 == TypeKind.FloatType))
+			{
+				final IntType aInt = tk1 == TypeKind.IntType ? (IntType)type1 : (IntType)type2;
+				final FloatType aFloat = tk1 == TypeKind.IntType ? (FloatType)type2 : (FloatType)type1;
+
+				final double low = aInt.rangeLow() < aFloat.low() ? (double)aInt.rangeLow() : aFloat.low();
+				final double high = aInt.rangeHigh() < aFloat.high() ? aFloat.high() : (double)aInt.rangeHigh();
+				final double precision = aFloat.precision() > 1 ? 1.0 : aFloat.precision();
+
+				return new FloatType(low, high, precision, null);
+
+			}
+			else if ((tk1 == TypeKind.IntType || tk2 == TypeKind.IntType)
+					&& (tk1 == TypeKind.EnumeratedType || tk2 == TypeKind.EnumeratedType))
+			{
+				final IntType intt1 = tk1 == TypeKind.IntType ? (IntType)type1 : (IntType)type2;
+				final EnumType anEnum = tk1 == TypeKind.IntType ? (EnumType)type2 : (EnumType)type1;
+
+				if (anEnum instanceof ValuedEnumType)
+				{
+					final IntType intt2 = ((ValuedEnumType)anEnum).getIntType();
+					final int low = intt1.rangeLow() < intt2.rangeLow() ? intt1.rangeLow() : intt2.rangeLow();
+					final int high = intt1.rangeHigh() > intt2.rangeHigh() ? intt1.rangeHigh() : intt2.rangeHigh();
+					return new IntType(low, high, null);
+				}
+				else
+					return null;
+			}
+			else if (tk1 == TypeKind.Any || tk2 == TypeKind.Any)
+			{
+				final AnyType freeVar = tk1 == TypeKind.Any ? (AnyType)type1 : (AnyType)type2;
+				final UlyssesType fixedType = tk1 == TypeKind.Any ? type2 : type1;
+				final UlyssesType newcover = freeVar.VariableIdentifier().type().kind() == TypeKind.Any
+						? fixedType : CoverType(fixedType, freeVar.VariableIdentifier().type());
+				freeVar.VariableIdentifier().SetType(newcover);
+				return newcover;
+			}
+			else if (tk1 == TypeKind.OoActionSystemType && tk2 == TypeKind.Null)
+			{
+				return type1;
+			}
+			else if (tk2 == TypeKind.OoActionSystemType && tk1 == TypeKind.Null)
+			{
+				return type2;
+			}
+
+			else
+				return null;
+		}
+		else
+		{
+			switch (tk1)
+			{
+				case Any:
+					return type1;
+
+				case IntType:
+					final IntType intt1 = (IntType)type1;
+					final IntType intt2 = (IntType)type2;
+					final int low = intt1.rangeLow() < intt2.rangeLow() ? intt1.rangeLow() : intt2.rangeLow();
+					final int high = intt1.rangeHigh() > intt2.rangeHigh() ? intt1.rangeHigh() : intt2.rangeHigh();
+					return new IntType(low, high, null);
+				case BoolType:
+					return type1;
+				case FloatType:
+					final FloatType floatt1 = (FloatType)type1;
+					final FloatType floatt2 = (FloatType)type2;
+					final double flow = floatt1.low() < floatt2.low() ? floatt1.low() : floatt2.low();
+					final double fhigh = floatt1.high() > floatt2.high() ? floatt1.high() : floatt2.high();
+					final double fprec = floatt1.precision() < floatt2.precision() ? floatt1.precision() : floatt2.precision();
+					return new FloatType(flow, fhigh, fprec, null);
+				case EnumeratedType:
+					return null;
+				case ListType:
+					final ListType listt1 = (ListType)type1;
+					final ListType listt2 = (ListType)type2;
+					int maxelems = listt1.maxNumberOfElements() > listt2.maxNumberOfElements() ?
+						listt1.maxNumberOfElements() : listt2.maxNumberOfElements();
+					// empty lists lack type, so take the other one
+					if ((listt1.innerType().kind() == TypeKind.Null) && (listt2.innerType().kind() != TypeKind.Null))
+						return listt2;
+					else if ((listt2.innerType().kind() == TypeKind.Null) && (listt1.innerType().kind() != TypeKind.Null))
+						return listt1;
+					else if (listt1.innerType().kind() == TypeKind.Null && listt2.innerType().kind() == TypeKind.Null)
+						return listt1;
+					else
+					{
+						final UlyssesType subtype = UlyssesType.CoverType(listt1.innerType(), listt2.innerType());
+						if (subtype != null)
+							return new ListType(subtype, maxelems, null);
+						else
+							return null;
+					}
+				case MapType:
+					final MapType mapt1 = (MapType)type1;
+					final MapType mapt2 = (MapType)type2;
+					// empty maps lack type, so take the other one.
+					if ((mapt1.fromType().kind() == TypeKind.Null && mapt1.toType().kind() == TypeKind.Null)
+					   && (mapt2.fromType().kind() != TypeKind.Null && mapt2.toType().kind() != TypeKind.Null))
+						return mapt2;
+					else if ((mapt2.fromType().kind() == TypeKind.Null && mapt2.toType().kind() == TypeKind.Null)
+					   && (mapt1.fromType().kind() != TypeKind.Null && mapt1.toType().kind() != TypeKind.Null))
+						return mapt1;
+					else if ((mapt2.fromType().kind() == TypeKind.Null && mapt2.toType().kind() == TypeKind.Null)
+					   && (mapt1.fromType().kind() == TypeKind.Null && mapt1.toType().kind() == TypeKind.Null))
+						return mapt1;
+					else
+					{
+						final UlyssesType sub1 = UlyssesType.CoverType(mapt1.fromType(), mapt2.fromType());
+						final UlyssesType sub2 = UlyssesType.CoverType(mapt2.toType(), mapt2.toType());
+						maxelems = mapt1.maxNumberOfElements() > mapt2.maxNumberOfElements() ?
+							mapt1.maxNumberOfElements() : mapt2.maxNumberOfElements();
+						if (sub1 != null && sub2 != null)
+							return new MapType(sub1, sub2, maxelems, null);
+						else
+							return null;
+					}
+				case QrType:
+					return null; /*if refs are equal, we do not reach this statement! see above..*/
+				case TupleType:
+					final TupleType tuplet1 = (TupleType)type1;
+					final TupleType tuplet2 = (TupleType)type2;
+					final TupleType result = new TupleType(null);
+					final Iterator<UlyssesType> innert1 = tuplet1.innerTypes().iterator();
+					final Iterator<UlyssesType> innert2 = tuplet2.innerTypes().iterator();
+					while (innert1.hasNext())
+					{
+						final UlyssesType newinner = UlyssesType.CoverType(innert1.next(), innert2.next());
+						if (newinner == null)
+							return null;
+						result.AddType(newinner);
+					}
+					return result;
+				case OoActionSystemType:
+					if (type1.kind() == TypeKind.Null && type2.kind() != TypeKind.Null)
+						return type2;
+					else if (type2.kind() == TypeKind.Null && type1.kind() != TypeKind.Null)
+						return type1;
+					else if (type1.kind() == TypeKind.Null && type2.kind() == TypeKind.Null)
+						return type2;
+					else if (type1 == type2) // ref equals!
+						return type1;
+					else
+						return ClassBaseType((OoActionSystemType)type1, (OoActionSystemType)type2);
+				case OpaqueType:
+					assert(false);
+					return null;
+				default:
+					throw new NotImplementedException();
+			}
+		}
+	}
+
+	private static UlyssesType ClassBaseType(OoActionSystemType type1, OoActionSystemType type2)
+	{
+		// this is rather inefficient.. should be done differently
+		final OoActionSystemType typea = type1;
+		final OoActionSystemType typeb = type2;
+		OoActionSystemType basea = type1;
+		OoActionSystemType baseb = type2;
+		while (basea != null)
+		{
+			if (basea == typeb)  // ref equals
+				return basea;
+			basea = basea.baseType();
+		}
+		while (baseb != null)
+		{
+			if (baseb == typea) // ref equals
+				return baseb;
+			baseb = baseb.baseType();
+		}
+		return null;
+	}
+
+	public static boolean FirstTypeLessRange(UlyssesType type1, UlyssesType type2)
+	{
+		final TypeKind tk1 = type1.kind();
+		final TypeKind tk2 = type2.kind();
+
+		if (tk1 != tk2)
+			throw new ArgumentException("Types need to be equal");
+
+		switch (tk1)
+		{
+			case Any:
+				return false;
+			case IntType:
+				final IntType Int1 = (IntType)type1;
+				final IntType Int2 = (IntType)type2;
+				return Int1.rangeLow() > Int2.rangeLow() ||
+					Int1.rangeHigh() < Int2.rangeHigh();
+			case BoolType:
+				return false;
+			case FloatType:
+				final FloatType Float1 = (FloatType)type1;
+				final FloatType Float2 = (FloatType)type2;
+				return Float1.low() > Float2.low()
+					|| Float1.high() < Float2.high()
+					|| Float1.precision() > Float2.precision();
+			case EnumeratedType:
+				return false;
+			case ListType:
+				final ListType listt1 = (ListType)type1;
+				final ListType listt2 = (ListType)type2;
+				return (listt1.maxNumberOfElements() < listt2.maxNumberOfElements()) ||
+					UlyssesType.FirstTypeLessRange(listt1.innerType(), listt2.innerType());
+			case MapType:
+				final MapType mapt1 = (MapType)type1;
+				final MapType mapt2 = (MapType)type2;
+				return (mapt1.maxNumberOfElements() < mapt2.maxNumberOfElements()) ||
+					UlyssesType.FirstTypeLessRange(mapt1.fromType(), mapt2.fromType()) ||
+					UlyssesType.FirstTypeLessRange(mapt1.toType(), mapt2.toType());
+			case QrType:
+				return false;
+			case TupleType:
+				final TupleType tuplet1 = (TupleType)type1;
+				final TupleType tuplet2 = (TupleType)type2;
+				if (tuplet1.innerTypes().size() != tuplet2.innerTypes().size())
+					return false;
+				final Iterator<UlyssesType> innert1 = tuplet1.innerTypes().iterator();
+				final Iterator<UlyssesType> innert2 = tuplet2.innerTypes().iterator();
+				while (innert1.hasNext())
+				{
+					if (UlyssesType.FirstTypeLessRange(innert1.next(), innert2.next()))
+						return true;
+				}
+				return false;
+			case OoActionSystemType:
+				return false;
+			case OpaqueType:
+				assert(false);
+				return false;
+			default:
+				throw new NotImplementedException();
+		}
+	}
+
+	public static boolean TypeEqualByKind(UlyssesType type1, UlyssesType type2)
+	{
+		if ((type1 == null) || (type2 == null))
+			return false;
+
+		final TypeKind tk1 = type1.kind();
+		final TypeKind tk2 = type2.kind();
+
+		// if of different kind, then return false..
+		if (tk1 != tk2)
+			return false;
+
+		// if same kind, make a rigorous check
+		switch (tk1)
+		{
+			case Any:
+				return true;
+
+			case IntType:
+			case BoolType:
+			case FloatType:
+				return true;
+			case EnumeratedType:
+				return type1 == type2; // ref equals
+			case ListType:
+				final ListType listt1 = (ListType)type1;
+				final ListType listt2 = (ListType)type2;
+				return UlyssesType.TypeEqualByKind(listt1.innerType(), listt2.innerType());
+			case MapType:
+				final MapType mapt1 = (MapType)type1;
+				final MapType mapt2 = (MapType)type2;
+				return UlyssesType.TypeEqualByKind(mapt1.fromType(), mapt2.fromType()) &&
+					UlyssesType.TypeEqualByKind(mapt1.toType(), mapt2.toType());
+			case QrType:
+				final QrType qr1 = (QrType)type1;
+				final QrType qr2 = (QrType)type2;
+				return qr1 == qr2; // ref equals
+			case TupleType:
+				final TupleType tuplet1 = (TupleType)type1;
+				final TupleType tuplet2 = (TupleType)type2;
+				if (tuplet1.innerTypes().size() != tuplet2.innerTypes().size())
+					return false;
+				final Iterator<UlyssesType> innert1 = tuplet1.innerTypes().iterator();
+				final Iterator<UlyssesType> innert2 = tuplet2.innerTypes().iterator();
+				while (innert1.hasNext())
+				{
+					if (!UlyssesType.TypeEqualByKind(innert1.next(), innert2.next()))
+						return false;
+				}
+				return true;
+			case OoActionSystemType:
+				return type1 == type2; // ref equ.
+			case OpaqueType:
+				assert(false);
+				return false;
+			default:
+				throw new NotImplementedException();
+		}
+	}
+
+
+	public static boolean TypeEqual(UlyssesType type1, UlyssesType type2)
+	{
+		// this will also work with opaque types...
+		while (type1 instanceof OpaqueType)
+			type1 = ((OpaqueType)type1).resolvedType();
+		while (type2 instanceof OpaqueType)
+			type2 = ((OpaqueType)type2).resolvedType();
+
+		if ((type1 == null) || (type2 == null))
+			return false;
+
+		final TypeKind tk1 = type1.kind();
+		final TypeKind tk2 = type2.kind();
+
+		// if of different kind, then return false..
+		if (tk1 != tk2)
+			return false;
+
+		// if same kind, make a rigorous check
+		switch (tk1)
+		{
+			case IntType:
+				final IntType intt1 = (IntType)type1;
+				final IntType intt2 = (IntType)type2;
+				return intt1.rangeLow() == intt2.rangeLow() &&
+					intt1.rangeHigh() == intt2.rangeHigh();
+			case BoolType:
+				return true;
+			case FloatType:
+				final FloatType floatt1 = (FloatType)type1;
+				final FloatType floatt2 = (FloatType)type2;
+				return floatt1.low() == floatt2.low() &&
+					floatt1.high() == floatt2.high() &&
+					floatt1.precision() == floatt2.precision();
+			case EnumeratedType:
+				return type1 == type2; // ref equ
+			case ListType:
+				final ListType listt1 = (ListType)type1;
+				final ListType listt2 = (ListType)type2;
+				// an empty list can be of any type..
+				/*if ((listt1.innerType.kind == TypeKind.Null) || (listt2.innerType.kind == TypeKind.Null))
+					return true;
+				else*/
+				return UlyssesType.TypeEqual(listt1.innerType(), listt2.innerType()) &&
+						listt1.maxNumberOfElements() == listt2.maxNumberOfElements(); // need this because of covertype
+			case MapType:
+				final MapType mapt1 = (MapType)type1;
+				final MapType mapt2 = (MapType)type2;
+				return UlyssesType.TypeEqual(mapt1.fromType(), mapt2.fromType()) &&
+					UlyssesType.TypeEqual(mapt1.toType(), mapt2.toType()) &&
+					mapt1.maxNumberOfElements() == mapt2.maxNumberOfElements(); // need this because of covertype
+			case QrType:
+				final QrType qr1 = (QrType)type1;
+				final QrType qr2 = (QrType)type2;
+				return qr1 == qr2; // ref equ.
+			case TupleType:
+				final TupleType tuplet1 = (TupleType)type1;
+				final TupleType tuplet2 = (TupleType)type2;
+				if (tuplet1.innerTypes().size() != tuplet2.innerTypes().size())
+					return false;
+				final Iterator<UlyssesType> innert1 = tuplet1.innerTypes().iterator();
+				final Iterator<UlyssesType> innert2 = tuplet2.innerTypes().iterator();
+				while (innert1.hasNext())
+				{
+					if (!UlyssesType.TypeEqual(innert1.next(), innert2.next()))
+						return false;
+				}
+				return true;
+			case OoActionSystemType:
+				return type1 == type2; // ref equ. // || Covariance((OoActionSystemType)type1, (OoActionSystemType)type2);
+			case OpaqueType:
+				assert(false);
+				return false;
+			case Null:
+			case Any:
+				return true;
+			default:
+				throw new NotImplementedException();
+		}
+	}
+
+	/// <summary>
+	/// checks if type 2 is a desc. of type 1
+	/// </summary>
+	public static boolean Covariance(OoActionSystemType ooActionSystemType, OoActionSystemType ooActionSystemType_2)
+	{
+		// check if type 2 is a desc. of type 1
+		while (ooActionSystemType != ooActionSystemType_2 && ooActionSystemType_2.baseType() != null) // ref equ.
+			ooActionSystemType_2 = ooActionSystemType_2.baseType();
+
+		return ooActionSystemType == ooActionSystemType_2; // ref equ.
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/OoaAstEmitter.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/OoaAstEmitter.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/OoaAstEmitter.java	(revision 2)
@@ -0,0 +1,1480 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.ast;
+
+import java.util.HashSet;
+import java.util.IdentityHashMap;
+
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.IAstVisitor;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.ExistsQuantifier;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ForallQuantifier;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.LeafExpression;
+import org.momut.ooas.ast.expressions.ListConstructor;
+import org.momut.ooas.ast.expressions.MapConstructor;
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+import org.momut.ooas.ast.expressions.QValConstructor;
+import org.momut.ooas.ast.expressions.Quantifier;
+import org.momut.ooas.ast.expressions.SetConstructor;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.TypeExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.UnresolvedIdentifierExpression;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.ConstantIdentifier;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.IdentifierList;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.identifiers.LocalVariableIdentifier;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.Module;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.NondetIdentifierList;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.identifiers.PrioIdentifierList;
+import org.momut.ooas.ast.identifiers.SelfTypeIdentifier;
+import org.momut.ooas.ast.identifiers.SeqIdentifierList;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.identifiers.UnspecIdentifierList;
+import org.momut.ooas.ast.statements.AbortStatement;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.BreakStatement;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.KillStatement;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.QualitativeConstraintStatement;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.SkipStatement;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.types.AnyType;
+import org.momut.ooas.ast.types.BoolType;
+import org.momut.ooas.ast.types.CharType;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.NullType;
+import org.momut.ooas.ast.types.OoActionSystemInstance;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.ast.types.ValuedEnumType;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.utils.exceptions.OoasCompilerRuntimeException;
+
+public class OoaAstEmitter<T> implements IAstVisitor {
+
+
+	final IAstDuplicator<T> m_copier;
+	final ParserState m_state;
+	protected HashSet<Object> m_visited = new HashSet<Object>();
+	final IdentityHashMap<Identifier,T> m_convertedIdentifiers;
+	final IdentityHashMap<UlyssesType,T> m_convertedTypes;
+	final IdentityHashMap<Expression,T> m_convertedExpressions;
+	final IdentityHashMap<Statement,T> m_convertedStatements;
+	final IdentityHashMap<IScope,T> m_convertedScopes;
+	final IdentityHashMap<OoActionSystemInstance, T> m_convertedInstances;
+
+	public OoaAstEmitter(ParserState aState, IAstDuplicator<T> copier) {
+		m_copier = copier;
+		m_state = aState;
+		m_convertedIdentifiers = new IdentityHashMap<>();
+		m_convertedTypes = new IdentityHashMap<>();
+		m_convertedExpressions = new IdentityHashMap<>();
+		m_convertedStatements = new IdentityHashMap<>();
+		m_convertedScopes = new IdentityHashMap<>();
+		m_convertedInstances = new IdentityHashMap<>();
+	}
+
+	@Override
+	public String returnVisitorName() {
+		return this.getClass().getName();
+	}
+
+	@Override
+	public void done() {
+	}
+
+	protected final void VisitSub(IAst subElement, IAst parent)
+	{
+		if (subElement == null || m_visited.contains(subElement))
+			return;
+		m_visited.add(subElement);
+		subElement.Accept(this);
+	}
+
+	/**
+	 * Tells the underlying IAstDuplicator to create an
+	 * identifier T. Also checks for duplicate instantiations
+	 * @param id Identifier to map
+	 * @return some opaque T
+	 */
+	private final T createIdentifier(Identifier id) {
+		IdentifierKind kind = id.kind();
+		if (id instanceof MainModule)
+			kind = IdentifierKind.MainModule;
+		final int subOrd =  (id instanceof IdentifierList)
+				? ((IdentifierList)id).listType().integerValue
+				: 0;
+		final T result = m_copier.createIdentifier(kind, subOrd);
+		if (m_convertedIdentifiers.put(id, result) != null)
+			throw new OoasCompilerRuntimeException("Identifier %s already has been copied.", id.toString());
+		if (id instanceof IScope) {
+			if (m_convertedScopes.put((IScope)id, m_copier.castToIScope(result)) != null)
+				throw new OoasCompilerRuntimeException("Scope %s already has been copied.", id.toString());
+		}
+		return result;
+	}
+
+	private final T createType(UlyssesType type) {
+		TypeKind kind = type.kind();
+		if (type instanceof ValuedEnumType)
+			kind = TypeKind.ValuedEnumeratedType;
+		final T result = m_copier.createType(kind);
+		if (m_convertedTypes.put(type, result) != null)
+			throw new OoasCompilerRuntimeException("Type %s already has been copied.", type.toString());
+		if (type instanceof IScope) {
+			if (m_convertedScopes.put((IScope)type, m_copier.castToIScope(result)) != null)
+				throw new OoasCompilerRuntimeException("Scope %s already has been copied.", type.toString());
+		}
+		return result;
+	}
+
+	private final T createExpression(Expression expression) {
+		final int subOrd =  (expression instanceof LeafExpression)
+				? ((LeafExpression)expression).valueType().integerValue
+				: 0;
+		final T result = m_copier.createExpression(expression.kind(), subOrd);
+		if (m_convertedExpressions.put(expression, result) != null)
+			throw new OoasCompilerRuntimeException("Expression %s already has been copied.", expression.toString());
+		if (expression instanceof IScope) {
+			if (m_convertedScopes.put((IScope)expression, m_copier.castToIScope(result)) != null)
+				throw new OoasCompilerRuntimeException("Scope %s already has been copied.", expression.toString());
+		}
+		return result;
+	}
+
+	private final T createStatement(Statement statement) {
+		final T result = m_copier.createStatement(statement.kind());
+		if (m_convertedStatements.put(statement, result) != null)
+			throw new OoasCompilerRuntimeException("Statement %s already has been copied.", statement.toString());
+		if (statement instanceof IScope) {
+			if (m_convertedScopes.put((IScope)statement, m_copier.castToIScope(result)) != null)
+				throw new OoasCompilerRuntimeException("Scope %s already has been copied.", statement.toString());
+		}
+		return result;
+	}
+
+	@Override
+	public void visit(EnumIdentifier enumIdentifier)
+	{
+		final T id = createIdentifier(enumIdentifier);
+
+		// create all referenced subs
+		VisitSub(enumIdentifier.definingScope(), enumIdentifier);
+		VisitSub(enumIdentifier.type(), enumIdentifier);
+
+		// create the identifier and initialize it.
+		m_copier.initEnumIdentifier(
+				id,
+				enumIdentifier.line(),
+				enumIdentifier.column(),
+				enumIdentifier.tokenText(),
+				m_convertedScopes.get(enumIdentifier.definingScope()),
+				m_convertedTypes.get(enumIdentifier.type()),
+				enumIdentifier.HaveValue(),
+				enumIdentifier.Value());
+	}
+
+
+	@Override
+	public void visit(ConstantIdentifier constantIdentifier)
+	{
+		final T constId = createIdentifier(constantIdentifier);
+
+		// make sure all the sub elements are created.
+		VisitSub(constantIdentifier.definingScope(), constantIdentifier);
+		VisitSub(constantIdentifier.type(), constantIdentifier);
+		VisitSub(constantIdentifier.Value(), constantIdentifier);
+
+		// create the identifier and initialize it.
+		m_copier.initConstantIdentifier(
+				constId,
+				constantIdentifier.line(),
+				constantIdentifier.column(),
+				constantIdentifier.tokenText(),
+				m_convertedScopes.get(constantIdentifier.definingScope()),
+				m_convertedTypes.get(constantIdentifier.type()),
+				m_convertedExpressions.get(constantIdentifier.Value()));
+	}
+
+	@Override
+	public void visit(AttributeIdentifier attributeIdentifier)
+	{
+		final T id = createIdentifier(attributeIdentifier);
+
+		// make sure all the sub elements are created.
+		VisitSub(attributeIdentifier.definingScope(), attributeIdentifier);
+		VisitSub(attributeIdentifier.type(), attributeIdentifier);
+		VisitSub(attributeIdentifier.initializer(), attributeIdentifier);
+
+		// create the identifier and initialize it.
+		m_copier.initAttributeIdentifier(
+				id,
+				attributeIdentifier.line(),
+				attributeIdentifier.column(),
+				attributeIdentifier.tokenText(),
+				m_convertedScopes.get(attributeIdentifier.definingScope()),
+				m_convertedTypes.get(attributeIdentifier.type()),
+				m_convertedExpressions.get(attributeIdentifier.initializer()),
+				attributeIdentifier.isStatic(),
+				attributeIdentifier.isControllable(),
+				attributeIdentifier.isObservable());
+	}
+
+	@Override
+	public void visit(ExpressionVariableIdentifier expressionVariableIdentifier)
+	{
+		final T id = createIdentifier(expressionVariableIdentifier);
+
+		// make sure all the sub elements are created.
+		VisitSub(expressionVariableIdentifier.definingScope(), expressionVariableIdentifier);
+		VisitSub(expressionVariableIdentifier.type(), expressionVariableIdentifier);
+
+		// create the identifier and initialize it.
+		m_copier.initExprVarIdentifier(
+				id,
+				expressionVariableIdentifier.line(),
+				expressionVariableIdentifier.column(),
+				expressionVariableIdentifier.tokenText(),
+				m_convertedScopes.get(expressionVariableIdentifier.definingScope()),
+				m_convertedTypes.get(expressionVariableIdentifier.type()),
+				expressionVariableIdentifier.initialized());
+	}
+
+	@Override
+	public void visit(ParameterIdentifier parameterIdentifier)
+	{
+		final T id = createIdentifier(parameterIdentifier);
+
+		// create sub elements.
+		VisitSub(parameterIdentifier.definingScope(), parameterIdentifier);
+		VisitSub(parameterIdentifier.type(), parameterIdentifier);
+
+		// create the identifier and initialize it.
+		m_copier.initParamIdentifier(
+				id,
+				parameterIdentifier.line(),
+				parameterIdentifier.column(),
+				parameterIdentifier.tokenText(),
+				m_convertedScopes.get(parameterIdentifier.definingScope()),
+				m_convertedTypes.get(parameterIdentifier.type()));
+	}
+
+	@Override
+	public void visit(LocalVariableIdentifier localVariableIdentifier)
+	{
+		final T id = createIdentifier(localVariableIdentifier);
+
+		// create sub elements.
+		VisitSub(localVariableIdentifier.definingScope(), localVariableIdentifier);
+		VisitSub(localVariableIdentifier.type(), localVariableIdentifier);
+
+		// create the identifier and initialize it.
+		m_copier.initLocalVarIdentifier(
+				id,
+				localVariableIdentifier.line(),
+				localVariableIdentifier.column(),
+				localVariableIdentifier.tokenText(),
+				m_convertedScopes.get(localVariableIdentifier.definingScope()),
+				m_convertedTypes.get(localVariableIdentifier.type()));
+}
+
+	@Override
+	public void visit(TypeIdentifier typeIdentifier)
+	{
+		final T id = createIdentifier(typeIdentifier);
+
+		// create sub elements.
+		VisitSub(typeIdentifier.definingScope(), typeIdentifier);
+		VisitSub(typeIdentifier.type(), typeIdentifier);
+
+		// create the identifier and initialize it.
+		m_copier.initTypeIdentifier(
+				id,
+				typeIdentifier.line(),
+				typeIdentifier.column(),
+				typeIdentifier.tokenText(),
+				m_convertedScopes.get(typeIdentifier.definingScope()),
+				m_convertedTypes.get(typeIdentifier.type()),
+				typeIdentifier.prefix);
+	}
+
+	@Override
+	public void visit(SelfTypeIdentifier aself)
+	{
+		final T id = createIdentifier(aself);
+
+		// create sub elements.
+		VisitSub(aself.definingScope(), aself);
+		VisitSub(aself.type(), aself);
+
+		// create the identifier and initialize it. (selftypeid extends typeid..)
+		m_copier.initSelfIdentifier(
+				id,
+				aself.line(),
+				aself.column(),
+				aself.tokenText(),
+				m_convertedScopes.get(aself.definingScope()),
+				m_convertedTypes.get(aself.type()),
+				aself.prefix);
+	}
+
+	@Override
+	public void visit(MethodIdentifier methodIdentifier)
+	{
+		final T id = createIdentifier(methodIdentifier);
+
+		// create sub elements.
+		VisitSub(methodIdentifier.definingScope(), methodIdentifier);
+		VisitSub(methodIdentifier.type(), methodIdentifier);
+		for (final Identifier sym: methodIdentifier.symbolTable().symbolList())
+			VisitSub(sym, methodIdentifier);
+		for (final ParameterIdentifier par: methodIdentifier.parameter())
+			VisitSub(par, methodIdentifier);
+		VisitSub(methodIdentifier.body(), methodIdentifier);
+
+		// create the identifier and initialize it.
+		final T symbolTable = m_copier.createSymbolTable();
+		for (final Identifier sym: methodIdentifier.symbolTable().symbolList())
+			m_copier.addIdentifierToSymbolTable(symbolTable, m_convertedIdentifiers.get(sym));
+		final T parameterList = m_copier.createParameterList();
+		for (final ParameterIdentifier par: methodIdentifier.parameter())
+			m_copier.addParameterIdentifierToList(parameterList, m_convertedIdentifiers.get(par));
+
+		m_copier.initMethodIdentifier(
+				id,
+				methodIdentifier.line(),
+				methodIdentifier.column(),
+				methodIdentifier.tokenText(),
+				m_convertedScopes.get(methodIdentifier.definingScope()),
+				m_convertedTypes.get(methodIdentifier.type()),
+				methodIdentifier.prefix,
+				parameterList,
+				symbolTable,
+				m_convertedStatements.get(methodIdentifier.body()));
+	}
+
+	@Override
+	public void visit(NamedActionIdentifier namedActionIdentifier)
+	{
+		final T id = createIdentifier(namedActionIdentifier);
+
+		// create sub elements.
+		VisitSub(namedActionIdentifier.definingScope(), namedActionIdentifier);
+		VisitSub(namedActionIdentifier.type(), namedActionIdentifier);
+		for (final Identifier sym : namedActionIdentifier.symbolTable().symbolList())
+			VisitSub(sym, namedActionIdentifier);
+		for (final ParameterIdentifier par: namedActionIdentifier.parameter())
+			VisitSub(par, namedActionIdentifier);
+		VisitSub(namedActionIdentifier.body(), namedActionIdentifier);
+
+		// create the identifier and initialize it.
+		final T symbolTable = m_copier.createSymbolTable();
+		for (final Identifier sym: namedActionIdentifier.symbolTable().symbolList())
+			m_copier.addIdentifierToSymbolTable(symbolTable, m_convertedIdentifiers.get(sym));
+		final T parameterList = m_copier.createParameterList();
+		for (final ParameterIdentifier par: namedActionIdentifier.parameter())
+			m_copier.addParameterIdentifierToList(parameterList, m_convertedIdentifiers.get(par));
+
+		m_copier.initMethodIdentifier(
+				id,
+				namedActionIdentifier.line(),
+				namedActionIdentifier.column(),
+				namedActionIdentifier.tokenText(),
+				m_convertedScopes.get(namedActionIdentifier.definingScope()),
+				m_convertedTypes.get(namedActionIdentifier.type()),
+				namedActionIdentifier.prefix,
+				parameterList,
+				symbolTable,
+				m_convertedStatements.get(namedActionIdentifier.body()));
+	}
+
+	@Override
+	public void visit(Module module)
+	{
+		final T id = createIdentifier(module);
+
+		VisitSub(module.definingScope(), module);
+		VisitSub(module.type(), module);
+		for (final Identifier sym: module.symbolTable().symbolList())
+			VisitSub(sym, module);
+
+		final T symTab = m_copier.createSymbolTable();
+		for (final Identifier sym: module.symbolTable().symbolList())
+			m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(sym));
+
+		m_copier.initModule(
+				id,
+				module.line(),
+				module.column(),
+				module.tokenText(),
+				m_convertedScopes.get(module.definingScope()),
+				m_convertedTypes.get(module.type()),
+				module.prefix,
+				symTab);
+	}
+
+	/**
+	 * Emit the main module. Notice that even though we run the
+	 * Instantiation Visitor, we DO NOT emit the flattened AS here
+	 * but the normal classes etc. That said, we include the information
+	 * about the instantiated objects (how many etc..)
+	 */
+	@Override
+	public void visit(MainModule mainModule)
+	{
+		m_visited.add(mainModule);
+
+		final T id = createIdentifier(mainModule);
+
+		VisitSub(mainModule.definingScope(), mainModule);
+		VisitSub(mainModule.type(), mainModule);
+		for (final Identifier sym: mainModule.symbolTable().symbolList())
+			VisitSub(sym, mainModule);
+		VisitSub(mainModule.systemDescription(), mainModule);
+
+		final T symTab = m_copier.createSymbolTable();
+		for (final Identifier sym: mainModule.symbolTable().symbolList())
+			m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(sym));
+
+		m_copier.initMainModule(
+				id,
+				mainModule.line(),
+				mainModule.column(),
+				mainModule.tokenText(),
+				m_convertedScopes.get(mainModule.definingScope()),
+				m_convertedTypes.get(mainModule.type()),
+				mainModule.prefix,
+				symTab,
+				m_convertedIdentifiers.get(mainModule.systemDescription()));
+
+		m_copier.setMainModule(mainModule, id);
+	}
+
+
+	@Override
+	public void visit(NondetIdentifierList nondetIdentifierList)
+	{
+		final T idList = createIdentifier(nondetIdentifierList);
+
+//		VisitSub(nondetIdentifierList.definingScope(), nondetIdentifierList);
+//		VisitSub(nondetIdentifierList.type(), nondetIdentifierList);
+		for (final Identifier id: nondetIdentifierList.identifiers())
+			VisitSub(id, nondetIdentifierList);
+
+		for (final Identifier id: nondetIdentifierList.identifiers())
+			m_copier.addIdentifierToBlock(idList, m_convertedIdentifiers.get(id));
+	}
+
+	@Override
+	public void visit(SeqIdentifierList seqIdentifierList)
+	{
+		final T idList = createIdentifier(seqIdentifierList);
+
+//		VisitSub(nondetIdentifierList.definingScope(), nondetIdentifierList);
+//		VisitSub(nondetIdentifierList.type(), nondetIdentifierList);
+		for (final Identifier id: seqIdentifierList.identifiers())
+			VisitSub(id, seqIdentifierList);
+
+		for (final Identifier id: seqIdentifierList.identifiers())
+			m_copier.addIdentifierToBlock(idList, m_convertedIdentifiers.get(id));
+	}
+
+	@Override
+	public void visit(PrioIdentifierList prioIdentifierList)
+	{
+		final T idList = createIdentifier(prioIdentifierList);
+
+//		VisitSub(nondetIdentifierList.definingScope(), nondetIdentifierList);
+//		VisitSub(nondetIdentifierList.type(), nondetIdentifierList);
+		for (final Identifier id: prioIdentifierList.identifiers())
+			VisitSub(id, prioIdentifierList);
+
+		for (final Identifier id: prioIdentifierList.identifiers())
+			m_copier.addIdentifierToBlock(idList, m_convertedIdentifiers.get(id));
+	}
+
+	@Override
+	public void visit(UnspecIdentifierList unspecIdentifierList)
+	{
+		final T idList = createIdentifier(unspecIdentifierList);
+
+//		VisitSub(nondetIdentifierList.definingScope(), nondetIdentifierList);
+//		VisitSub(nondetIdentifierList.type(), nondetIdentifierList);
+		for (final Identifier id: unspecIdentifierList.identifiers())
+			VisitSub(id, unspecIdentifierList);
+
+		for (final Identifier id: unspecIdentifierList.identifiers())
+			m_copier.addIdentifierToBlock(idList, m_convertedIdentifiers.get(id));
+	}
+
+
+
+
+	@Override
+	public void visit(IntType intType)
+	{
+		final T type = createType(intType);
+
+		final Identifier id = intType.identifier();
+		VisitSub(id, intType);
+
+		m_copier.initIntType(
+				type,
+				m_convertedIdentifiers.get(id),
+				intType.isAnonymousType(),
+				intType.rangeLow(),
+				intType.rangeHigh());
+	}
+
+	@Override
+	public void visit(BoolType boolType)
+	{
+		final T type = createType(boolType);
+
+		final Identifier id = boolType.identifier();
+		VisitSub(id, boolType);
+
+		m_copier.initBoolType(
+				type,
+				m_convertedIdentifiers.get(id),
+				boolType.isAnonymousType());
+	}
+
+	@Override
+	public void visit(EnumType enumType)
+	{
+		final T type = createType(enumType);
+
+		final Identifier id = enumType.identifier();
+		VisitSub(id, enumType);
+		for (final Identifier sym: enumType.listOfEnumSymbols())
+			VisitSub(sym, enumType);
+
+		// initialize
+		final T symTab = m_copier.createSymbolTable();
+		for (final Identifier sym: enumType.listOfEnumSymbols())
+			m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(sym));
+
+		// FIXME: fix the visitor to have a separate method for ValuedEnumTypes..
+		if (enumType instanceof ValuedEnumType) {
+			final ValuedEnumType t = (ValuedEnumType) enumType;
+			VisitSub(t.getIntType(), t);
+			m_copier.initValuedEnumType(
+					type,
+					m_convertedIdentifiers.get(id),
+					enumType.isAnonymousType(),
+					symTab,
+					m_convertedTypes.get(t.getIntType()));
+		} else
+			m_copier.initEnumType(
+				type,
+				m_convertedIdentifiers.get(id),
+				enumType.isAnonymousType(),
+				symTab);
+	}
+
+	@Override
+	public void visit(ListType listType)
+	{
+		final T type = createType(listType);
+
+		final Identifier id = listType.identifier();
+		VisitSub(id, listType);
+		VisitSub(listType.innerType(), listType);
+
+		m_copier.initListType(
+				type,
+				m_convertedIdentifiers.get(id),
+				listType.isAnonymousType(),
+				m_convertedTypes.get(listType.innerType()),
+				listType.maxNumberOfElements());
+	}
+
+
+	@Override
+	public void visit(TupleType tupleType)
+	{
+		final T type = createType(tupleType);
+
+		final Identifier id = tupleType.identifier();
+		VisitSub(id, tupleType);
+		for (final UlyssesType t: tupleType.innerTypes())
+			VisitSub(t, tupleType);
+
+		final T list = m_copier.createTypeList();
+		for (final UlyssesType t: tupleType.innerTypes())
+			m_copier.addTypeToList(list, m_convertedTypes.get(t));
+
+		m_copier.initTupleType(
+				type,
+				m_convertedIdentifiers.get(id),
+				tupleType.isAnonymousType(),
+				list);
+	}
+
+	@Override
+	public void visit(FunctionType functionType)
+	{
+		final T type = createType(functionType);
+
+		final Identifier id = functionType.identifier();
+		VisitSub(id, functionType);
+		for (final UlyssesType a: functionType.parameter())
+			VisitSub(a, functionType);
+		VisitSub(functionType.returnType(), functionType);
+
+
+		final T list = m_copier.createTypeList();
+		for (final UlyssesType t: functionType.parameter())
+			m_copier.addTypeToList(list, m_convertedTypes.get(t));
+
+		m_copier.initFunctionType(
+				type,
+				m_convertedIdentifiers.get(id),
+				functionType.isAnonymousType(),
+				list,
+				m_convertedTypes.get(functionType.returnType()),
+				functionType.functionType().integerValue,
+				functionType.isPureFunction());
+			// we ignore the isMiracleSafe property here.
+	}
+
+	private void convertActionSystemInstance(OoActionSystemInstance i, IAst ooActionSystemType) {
+		if (i == null || m_convertedInstances.containsKey(i))
+			return;
+		final T instance = m_copier.createActionSystemInstance();
+		m_convertedInstances.put(i, instance);
+
+		VisitSub(i.Type, ooActionSystemType);
+		convertActionSystemInstance(i.ParentObject, ooActionSystemType);
+
+		m_copier.initActionSystemInstance(
+				instance,
+				m_convertedTypes.get(i.Type),
+				i.Name,
+				i.numberOfCreatedObjects,
+				m_convertedInstances.get(i.ParentObject));
+	}
+
+	@Override
+	public void visit(OoActionSystemType ooActionSystemType)
+	{
+		final T type = createType(ooActionSystemType);
+
+		final Identifier id = ooActionSystemType.identifier();
+		VisitSub(id, ooActionSystemType);
+		for (final Identifier s: ooActionSystemType.symbols().symbolList())
+			VisitSub(s, ooActionSystemType);
+		VisitSub(ooActionSystemType.doOdBlock(), ooActionSystemType);
+		VisitSub(ooActionSystemType.baseType(), ooActionSystemType);
+		for (final OoActionSystemInstance i: ooActionSystemType.objects())
+			convertActionSystemInstance(i, ooActionSystemType);
+		for (final OoActionSystemInstance i: ooActionSystemType.derivedObjects())
+			convertActionSystemInstance(i, ooActionSystemType);
+
+		final T symTab = m_copier.createSymbolTable();
+		for (final Identifier s: ooActionSystemType.symbols().symbolList())
+			m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(s));
+
+		final T objectsList = m_copier.createActionSystemInstanceList();
+		for (final OoActionSystemInstance i: ooActionSystemType.objects())
+			m_copier.addActionSystemInstanceToList(objectsList, m_convertedInstances.get(i));
+		final T derivedObjectsList = m_copier.createActionSystemInstanceList();
+		for (final OoActionSystemInstance i: ooActionSystemType.derivedObjects())
+			m_copier.addActionSystemInstanceToList(objectsList, m_convertedInstances.get(i));
+
+
+		m_copier.initActionSystemType(
+				type,
+				m_convertedIdentifiers.get(id),
+				ooActionSystemType.isAnonymousType(),
+				m_convertedTypes.get(ooActionSystemType.baseType()),
+				m_convertedScopes.get(ooActionSystemType.GetParentScope()),
+				m_convertedStatements.get(ooActionSystemType.doOdBlock()),
+				symTab,
+				objectsList,
+				derivedObjectsList,
+				ooActionSystemType.autoConstruction(),
+				ooActionSystemType.isInSystemDescription());
+	}
+
+	@Override
+	public void visit(NullType nullType)
+	{
+		final T type = createType(nullType);
+
+		final Identifier id = nullType.identifier();
+		VisitSub(id, nullType);
+
+		m_copier.initNullType(
+				type,
+				m_convertedIdentifiers.get(id),
+				nullType.isAnonymousType());
+	}
+
+
+	// Statements..
+	@Override
+	public void visit(SkipStatement skipStatement)
+	{
+		m_copier.initSkipStatement(
+				createStatement(skipStatement),
+				skipStatement.line(),
+				skipStatement.pos());
+	}
+
+
+	@Override
+	public void visit(BreakStatement breakStatement)
+	{
+		m_copier.initBreakStatement(
+				createStatement(breakStatement),
+				breakStatement.line(),
+				breakStatement.pos());
+	}
+
+	@Override
+	public void visit(AbortStatement abortStatement)
+	{
+		m_copier.initAbortStatement(
+				createStatement(abortStatement),
+				abortStatement.line(),
+				abortStatement.pos());
+	}
+
+	@Override
+	public void visit(NondetBlock nondetBlock)
+	{
+		final T stmt = createStatement(nondetBlock);
+
+		// make sure all elements are allocated
+		VisitSub(nondetBlock.GetParentScope(), nondetBlock);
+		for (final Identifier id: nondetBlock.symbols().symbolList())
+			VisitSub(id, nondetBlock);
+		for (final Statement stmnt: nondetBlock.statements())
+			VisitSub(stmnt, nondetBlock);
+
+		// assemble data and initialize the block
+		final T symTab = m_copier.createSymbolTable();
+		for (final Identifier id: nondetBlock.symbols().symbolList())
+			m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(id));
+
+		final T stmtList = m_copier.createStatementList();
+		for (final Statement stmnt: nondetBlock.statements())
+			m_copier.addStatementToList(stmtList, m_convertedStatements.get(stmnt));
+
+		m_copier.initNondetBlock(
+				stmt,
+				nondetBlock.line(),
+				nondetBlock.pos(),
+				symTab,
+				stmtList,
+				m_convertedScopes.get(nondetBlock.GetParentScope()));
+	}
+
+	@Override
+	public void visit(SeqBlock seqBlock)
+	{
+		final T stmt = createStatement(seqBlock);
+
+		// make sure all elements are allocated
+		VisitSub(seqBlock.GetParentScope(), seqBlock);
+		for (final Identifier id: seqBlock.symbols().symbolList())
+			VisitSub(id, seqBlock);
+		if (seqBlock.filter() != null)
+			VisitSub(seqBlock.filter(), seqBlock);
+		for (final Statement stmnt: seqBlock.statements())
+			VisitSub(stmnt, seqBlock);
+
+		// assemble data and initialize the block
+		final T symTab = m_copier.createSymbolTable();
+		for (final Identifier id: seqBlock.symbols().symbolList())
+			m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(id));
+
+		final T stmtList = m_copier.createStatementList();
+		for (final Statement stmnt: seqBlock.statements())
+			m_copier.addStatementToList(stmtList, m_convertedStatements.get(stmnt));
+
+		m_copier.initSeqBlock(
+				stmt,
+				seqBlock.line(),
+				seqBlock.pos(),
+				symTab,
+				stmtList,
+				m_convertedScopes.get(seqBlock.GetParentScope()),
+				m_convertedExpressions.get(seqBlock.filter()));
+	}
+
+	@Override
+	public void visit(PrioBlock prioBlock)
+	{
+		final T stmt = createStatement(prioBlock);
+
+		// make sure all elements are allocated
+		VisitSub(prioBlock.GetParentScope(), prioBlock);
+		for (final Identifier id: prioBlock.symbols().symbolList())
+			VisitSub(id, prioBlock);
+		for (final Statement stmnt: prioBlock.statements())
+			VisitSub(stmnt, prioBlock);
+
+		// assemble data and initialize the block
+		final T symTab = m_copier.createSymbolTable();
+		for (final Identifier id: prioBlock.symbols().symbolList())
+			m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(id));
+
+		final T stmtList = m_copier.createStatementList();
+		for (final Statement stmnt: prioBlock.statements())
+			m_copier.addStatementToList(stmtList, m_convertedStatements.get(stmnt));
+
+		m_copier.initPrioBlock(
+				stmt,
+				prioBlock.line(),
+				prioBlock.pos(),
+				symTab,
+				stmtList,
+				m_convertedScopes.get(prioBlock.GetParentScope()));
+	}
+
+	@Override
+	public void visit(GuardedCommand guardedCommand)
+	{
+		final T stmt = createStatement(guardedCommand);
+
+		// make sure all elements are allocated
+		VisitSub(guardedCommand.GetParentScope(), guardedCommand);
+		VisitSub(guardedCommand.guard(), guardedCommand);
+		VisitSub(guardedCommand.body(), guardedCommand);
+
+		m_copier.initGuardedCommand(
+				stmt,
+				guardedCommand.line(),
+				guardedCommand.pos(),
+				m_convertedScopes.get(guardedCommand.GetParentScope()),
+				m_convertedExpressions.get(guardedCommand.guard()),
+				m_convertedStatements.get(guardedCommand.body()));
+	}
+
+	@Override
+	public void visit(Assignment assignment)
+	{
+		final T stmt = createStatement(assignment);
+
+		// make sure all elements are allocated
+		VisitSub(assignment.GetParentScope(), assignment);
+		for (final Identifier id: assignment.symbols().symbolList())
+			VisitSub(id, assignment);
+		for (final Expression vexp: assignment.places())
+			VisitSub(vexp, assignment);
+		for (final Expression expr: assignment.values())
+			VisitSub(expr, assignment);
+		VisitSub(assignment.nondetExpression(), assignment);
+
+
+		final T symTab = m_copier.createSymbolTable();
+		for (final Identifier id: assignment.symbols().symbolList())
+			m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(id));
+		final T places = m_copier.createExpressionList();
+		for (final Expression vexp: assignment.places())
+			m_copier.addExpressionToList(places,m_convertedExpressions.get(vexp));
+		final T values = m_copier.createExpressionList();
+		for (final Expression expr: assignment.values())
+			m_copier.addExpressionToList(values,m_convertedExpressions.get(expr));
+
+		m_copier.initAssignment(
+				stmt,
+				assignment.line(),
+				assignment.pos(),
+				m_convertedScopes.get(assignment.GetParentScope()),
+				m_convertedExpressions.get(assignment.nondetExpression()),
+				places,
+				values,
+				symTab);
+	}
+
+	@Override
+	public void visit(Call call)
+	{
+		final T stmt = createStatement(call);
+
+		// make sure all elements are allocated
+		VisitSub(call.callExpression(), call);
+
+		m_copier.initCall(
+				stmt,
+				call.line(),
+				call.pos(),
+				m_convertedExpressions.get(call.callExpression()));
+	}
+
+
+
+	// Expressions
+
+	private final class ExprData {
+		public final T typeRef;
+		public final T callTargetsIdentifierListRef;
+		public final T symbTabRef;
+		public final int line;
+		public final int pos;
+
+		public ExprData(T type, T callTgts, T symbTabRef, int line, int pos) {
+			typeRef = type;
+			callTargetsIdentifierListRef = callTgts;
+			this.symbTabRef = symbTabRef;
+			this.line = line;
+			this.pos = pos;
+		}
+	}
+
+	private ExprData visitBasicExpression(Expression e) {
+		final T list = m_copier.createIdentifierList();
+		final T symTab = m_copier.createSymbolTable();
+
+		VisitSub(e.type(), e);
+		for (final FunctionIdentifier i: e.callTargets())
+			VisitSub(i, e);
+		if (e.freeVariables() != null) {
+			for (final Identifier id: e.freeVariables().symbolList())
+				VisitSub(id, e);
+			for (final Identifier id: e.freeVariables().symbolList())
+				m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(id));
+		}
+
+		for (final FunctionIdentifier i: e.callTargets())
+			m_copier.addIdentifierToList(list, m_convertedIdentifiers.get(i));
+
+		return new ExprData(m_convertedTypes.get(e.type()), list, symTab,
+				e.line(), e.pos());
+	}
+
+	@Override
+	public void visit(TypeExpression typeExpression)
+	{
+		final T expr = createExpression(typeExpression);
+		final ExprData d = visitBasicExpression(typeExpression);
+		m_copier.initTypeExpression(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef);
+	}
+
+	@Override
+	public void visit(IdentifierExpression identifierExpression)
+	{
+		final T expr = createExpression(identifierExpression);
+
+		final ExprData d = visitBasicExpression(identifierExpression);
+		VisitSub(identifierExpression.identifier(), identifierExpression);
+
+		m_copier.initIdentifierExpression(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				m_convertedIdentifiers.get(identifierExpression.identifier()),
+				identifierExpression.isSelf());
+	}
+
+	@Override
+	public void visit(UnaryOperator unaryOperator)
+	{
+		final T expr = createExpression(unaryOperator);
+
+		final ExprData d = visitBasicExpression(unaryOperator);
+		VisitSub(unaryOperator.child(), unaryOperator);
+
+		m_copier.initUnaryExpression(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				m_convertedExpressions.get(unaryOperator.child()));
+	}
+
+	@Override
+	public void visit(BinaryOperator binaryOperator)
+	{
+		final T expr = createExpression(binaryOperator);
+
+		final ExprData d = visitBasicExpression(binaryOperator);
+		VisitSub(binaryOperator.left(), binaryOperator);
+		VisitSub(binaryOperator.right(), binaryOperator);
+
+		m_copier.initBinaryExpression(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				m_convertedExpressions.get(binaryOperator.left()),
+				m_convertedExpressions.get(binaryOperator.right()));
+	}
+
+	@Override
+	public void visit(TernaryOperator ternaryOperator)
+	{
+		final T expr = createExpression(ternaryOperator);
+
+		final ExprData d = visitBasicExpression(ternaryOperator);
+		VisitSub(ternaryOperator.left(), ternaryOperator);
+		VisitSub(ternaryOperator.mid(), ternaryOperator);
+		VisitSub(ternaryOperator.right(), ternaryOperator);
+		VisitSub(ternaryOperator.definingScope(), ternaryOperator);
+
+		m_copier.initTernaryExpression(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				m_convertedExpressions.get(ternaryOperator.left()),
+				m_convertedExpressions.get(ternaryOperator.mid()),
+				m_convertedExpressions.get(ternaryOperator.right()),
+				m_convertedScopes.get(ternaryOperator.definingScope()));
+	}
+
+
+
+	@Override
+	public <U>void visit(ValueExpression<U> valueExpression)
+	{
+		final T expr = createExpression(valueExpression);
+
+		final ExprData d = visitBasicExpression(valueExpression);
+		switch (valueExpression.valueType()) {
+		case integer:
+			@SuppressWarnings("unchecked")
+			final int value = ((ValueExpression<Integer>) valueExpression).value();
+			m_copier.initIntValueExpression(
+					expr,
+					d.line,
+					d.pos,
+					d.typeRef,
+					d.callTargetsIdentifierListRef,
+					d.symbTabRef,
+					value);
+			break;
+		case bool:
+			@SuppressWarnings("unchecked")
+			final boolean bvalue = ((ValueExpression<Boolean>) valueExpression).value();
+			m_copier.initBoolValueExpression(
+					expr,
+					d.line,
+					d.pos,
+					d.typeRef,
+					d.callTargetsIdentifierListRef,
+					d.symbTabRef,
+					bvalue);
+			break;
+		case reference:
+			@SuppressWarnings("unchecked")
+			final Object ovalue = ((ValueExpression<Object>) valueExpression).value();
+			if (ovalue != null)
+				throw new NotImplementedException();
+			m_copier.initNullValueExpression(
+					expr,
+					d.line,
+					d.pos,
+					d.typeRef,
+					d.callTargetsIdentifierListRef,
+					d.symbTabRef);
+			break;
+
+		case qval:
+		case real:
+		case chr:
+			throw new NotImplementedException();
+
+		case identifier:
+		case complex:
+		case type:
+		case unset:
+		default:
+			throw new IllegalArgumentException();
+		}
+	}
+
+
+	@Override
+	public void visit(ListConstructor listConstructor)
+	{
+		final T expr = createExpression(listConstructor);
+
+		final ExprData d = visitBasicExpression(listConstructor);
+		for (final Identifier lvar: listConstructor.comprehensionVariables().symbolList())
+			VisitSub(lvar, listConstructor);
+		for (final Expression elems: listConstructor.elements())
+			VisitSub(elems, listConstructor);
+		VisitSub(listConstructor.comprehension(), listConstructor);
+		VisitSub(listConstructor.GetParentScope(), listConstructor);
+
+		final T symTab = m_copier.createSymbolTable();
+		for (final Identifier lvar: listConstructor.comprehensionVariables().symbolList())
+			m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(lvar));
+		final T exprList = m_copier.createExpressionList();
+		for (final Expression elems: listConstructor.elements())
+			m_copier.addExpressionToList(exprList, m_convertedExpressions.get(elems));
+
+		m_copier.initListConstructor(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				exprList,
+				symTab,
+				m_convertedScopes.get(listConstructor.GetParentScope()),
+				m_convertedExpressions.get(listConstructor.comprehension()),
+				listConstructor.hasComprehension());
+	}
+
+	@Override
+	public void visit(SetConstructor setConstructor)
+	{
+		final T expr = createExpression(setConstructor);
+
+		final ExprData d = visitBasicExpression(setConstructor);
+		for (final Identifier svar: setConstructor.comprehensionVariables().symbolList())
+			VisitSub(svar, setConstructor);
+		for (final Expression elems: setConstructor.items())
+			VisitSub(elems, setConstructor);
+		VisitSub(setConstructor.comprehension(), setConstructor);
+		VisitSub(setConstructor.GetParentScope(), setConstructor);
+
+
+		final T symTab = m_copier.createSymbolTable();
+		for (final Identifier lvar: setConstructor.comprehensionVariables().symbolList())
+			m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(lvar));
+		final T exprList = m_copier.createExpressionList();
+		for (final Expression elems: setConstructor.items())
+			m_copier.addExpressionToList(exprList, m_convertedExpressions.get(elems));
+
+		m_copier.initSetConstructor(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				exprList,
+				symTab,
+				m_convertedScopes.get(setConstructor.GetParentScope()),
+				m_convertedExpressions.get(setConstructor.comprehension()),
+				setConstructor.hasComprehension());
+	}
+
+	@Override
+	public void visit(TupleConstructor tupleConstructor)
+	{
+		final T expr = createExpression(tupleConstructor);
+
+		final ExprData d = visitBasicExpression(tupleConstructor);
+		for (final Expression elem: tupleConstructor.values())
+			VisitSub(elem, tupleConstructor);
+		VisitSub(tupleConstructor.tupleType(), tupleConstructor);
+
+
+		final T exprList = m_copier.createExpressionList();
+		for (final Expression elems: tupleConstructor.values())
+			m_copier.addExpressionToList(exprList, m_convertedExpressions.get(elems));
+
+		m_copier.initTupleConstructor(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				exprList,
+				m_convertedIdentifiers.get(tupleConstructor.tupleType()),
+				tupleConstructor.isMatcher());
+	}
+
+	@Override
+	public void visit(AccessExpression accessExpression)
+	{
+		final T expr = createExpression(accessExpression);
+
+		final ExprData d = visitBasicExpression(accessExpression);
+		VisitSub(accessExpression.left(), accessExpression);
+		VisitSub(accessExpression.right(), accessExpression);
+
+		m_copier.initAccessExpression(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				m_convertedExpressions.get(accessExpression.left()),
+				m_convertedExpressions.get(accessExpression.right()));
+	}
+
+	@Override
+	public void visit(TupleMapAccessExpression tupleMapAccessExpression)
+	{
+		final T expr = createExpression(tupleMapAccessExpression);
+
+		final ExprData d = visitBasicExpression(tupleMapAccessExpression);
+		VisitSub(tupleMapAccessExpression.argument(), tupleMapAccessExpression);
+		VisitSub(tupleMapAccessExpression.child(), tupleMapAccessExpression);
+
+		m_copier.initTupleMapAccessExpression(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				m_convertedExpressions.get(tupleMapAccessExpression.child()),
+				m_convertedExpressions.get(tupleMapAccessExpression.argument()));
+	}
+
+	@Override
+	public void visit(CallExpression callExpression)
+	{
+		final T expr = createExpression(callExpression);
+
+		final ExprData d = visitBasicExpression(callExpression);
+		VisitSub(callExpression.child(), callExpression);
+		VisitSub(callExpression.scope(), callExpression);
+
+		final T exprList = m_copier.createExpressionList();
+		if (callExpression.arguments() != null) {
+			for (final Expression arg: callExpression.arguments())
+				VisitSub(arg, callExpression);
+			for (final Expression elems: callExpression.arguments())
+				m_copier.addExpressionToList(exprList, m_convertedExpressions.get(elems));
+		}
+
+		m_copier.initCallExpression(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				m_convertedExpressions.get(callExpression.child()),
+				exprList,
+				m_convertedScopes.get(callExpression.scope()));
+	}
+
+	private void visitQuantifierExpression(Quantifier quantifier)
+	{
+		final T expr = createExpression(quantifier);
+
+		final ExprData d = visitBasicExpression(quantifier);
+		for (final Identifier lvar: quantifier.symbols().symbolList())
+			VisitSub(lvar, quantifier);
+		VisitSub(quantifier.child(), quantifier);
+		VisitSub(quantifier.GetParentScope(), quantifier);
+
+		final T symTab = m_copier.createSymbolTable();
+		for (final Identifier lvar: quantifier.symbols().symbolList())
+			m_copier.addIdentifierToSymbolTable(symTab, m_convertedIdentifiers.get(lvar));
+
+		m_copier.initQuantifierExpression(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				m_convertedExpressions.get(quantifier.child()),
+				symTab,
+				m_convertedScopes.get(quantifier.GetParentScope()));
+	}
+
+	@Override
+	public void visit(ForallQuantifier quantifier)
+	{
+		visitQuantifierExpression(quantifier);
+	}
+
+	@Override
+	public void visit(ExistsQuantifier quantifier)
+	{
+		visitQuantifierExpression(quantifier);
+	}
+
+	@Override
+	public void visit(ObjectConstructor objectConstructor)
+	{
+		final T expr = createExpression(objectConstructor);
+
+		final ExprData d = visitBasicExpression(objectConstructor);
+		for (final OoActionSystemInstance i: objectConstructor.instances())
+			convertActionSystemInstance(i, objectConstructor);
+
+		final T instanceList = m_copier.createActionSystemInstanceList();
+		for (final OoActionSystemInstance i: objectConstructor.instances())
+			m_copier.addActionSystemInstanceToList(instanceList, m_convertedInstances.get(i));
+
+		m_copier.initObjectConstructor(
+				expr,
+				d.line,
+				d.pos,
+				d.typeRef,
+				d.callTargetsIdentifierListRef,
+				d.symbTabRef,
+				instanceList,
+				objectConstructor.currentInstance(),
+				objectConstructor.givenObjectName());
+	}
+
+
+	/*
+	 * UNSUPPORTED METHODS BELOW
+	 */
+
+	@Override
+	public void visit(KillStatement killStatement)
+	{
+		// no support for kill right now..
+		throw new NotImplementedException();
+	}
+	@Override
+	public void visit(OpaqueType opaqueType)
+	{
+		// we must not hit this line - everything needs to be resolved at this point!
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(AnyType anyType)
+	{
+		// we must not hit this line - everything needs to be resolved at this point!
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(UnresolvedIdentifierExpression unresolvedIdentifierExpression)
+	{
+		// we must not hit this line - everything needs to be resolved at this point!
+		throw new NotImplementedException();
+	}
+	@Override
+	public void visit(MapConstructor mapConstructor)
+	{
+		// we do not support maps right now.
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(CharType charType)
+	{
+		// chars are not supported right now
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(FloatType floatType)
+	{
+		// floats are not supported right now
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(MapType mapType)
+	{
+		// maps are not supported right now
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public  void visit(QrType qrType)
+	{
+		// QR is never going to be supported again.
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(QValConstructor qValConstructor)
+	{
+		// we do not support qualitative systems anymore
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(QualitativeConstraintStatement qalitativeConstraintStatement)
+	{
+		// we do not support qualitative systems anymore
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(LandmarkIdentifier landmarkIdentifier)
+	{
+		// we do not support qualitative systems anymore
+		throw new NotImplementedException();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpActionInfo.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpActionInfo.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpActionInfo.java	(revision 2)
@@ -0,0 +1,60 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.cadp;
+
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+
+public final class CadpActionInfo
+{
+	public FunctionIdentifier action;
+	public int actionNumber;
+	public final int splitBlockSize;
+
+	public String toDoListString;
+	public String doneListString;
+	public String stateVariableString;
+
+	public final OoasCodeEmitter m_helperMethods = new OoasCodeEmitter();
+
+	public CadpActionInfo(
+			FunctionIdentifier anAction,
+			int aSplitSize,
+			int anActionNumber,
+			String toDoIdentifier,
+			String doneIdentifier,
+			String aStateVariableString)
+	{
+		action = anAction;
+		actionNumber = anActionNumber;
+		toDoListString = toDoIdentifier;
+		doneListString = doneIdentifier;
+		stateVariableString = aStateVariableString;
+		splitBlockSize = aSplitSize;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpType.java	(revision 2)
@@ -0,0 +1,913 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.cadp;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.types.BoolType;
+import org.momut.ooas.ast.types.CharType;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.NullType;
+import org.momut.ooas.ast.types.OoActionSystemInstance;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.ast.types.ValuedEnumType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.parser.SymbolTable;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+/// <summary>
+/// Knows how to construct a C-CADP type from a UlyssesType
+/// (only defined for basic types!)
+/// </summary>
+public final class CadpType extends OoaCompleteAstTraversalVisitor
+{
+	private static HashMap<String, Integer> m_typesizes;
+	public static HashMap<String, Integer> sizeOfTypes() {return m_typesizes; }
+
+	private final OoasCodeEmitter m_emitter = new OoasCodeEmitter();
+//	private int m_typesize;
+
+	public static final String constructorString = "constr_";
+	public static final String destructorString = "destr_";
+	public static final String lowString = "low_";
+	public static final String highString = "count_";
+	public static final String enumString = "enum_";
+	public static final String printString = "print_";
+
+
+	@Override
+	public void visit(CharType charType)
+	{
+		m_emitter.Append("char");
+//		m_typesize += m_typesizes.get("char");
+	}
+
+	@Override
+	public  void visit(IntType intType)
+	{
+		m_emitter.Append("int");
+//		m_typesize += m_typesizes.get("int");
+	}
+
+	@Override
+	public  void visit(BoolType boolType)
+	{
+		m_emitter.Append("unsigned char");
+//		m_typesize += m_typesizes.get("char");
+	}
+
+	@Override
+	public  void visit(FloatType floatType)
+	{
+		m_emitter.Append("double");
+//		m_typesize += m_typesizes.get("double");
+	}
+
+	@Override
+	public  void visit(EnumType enumType)
+	{
+		m_emitter.Append("unsigned int");
+//		m_typesize += m_typesizes.get("int");
+	}
+
+
+	@Override
+	public  void visit(TupleType tupleType)
+	{
+		// we map a tuple to a struct
+		m_emitter.Append(GetIdentifierString(tupleType.identifier()));
+	}
+
+	@Override
+	public  void visit(ListType listType)
+	{
+		m_emitter.Append(GetIdentifierString(listType.identifier()));
+	}
+
+	@Override
+	public  void visit(NullType nullType)
+	{
+		m_emitter.Append("int");
+	}
+
+	private static String GetIdentifierString(TypeIdentifier typeIdentifier)
+	{
+		return CadpIdentifier.GetIdentifierString(typeIdentifier);
+	}
+
+	@Override
+	public  void visit(OoActionSystemType ooActionSystemType)
+	{
+		// output: pointer to jump table type
+		m_emitter.Append(String.format("%s", CadpIdentifier.GetIdentifierString(ooActionSystemType.identifier())));
+	}
+
+
+	// the following types are not supported.
+	@Override
+	public  void visit(MapType mapType)
+	{
+		throw new UnsupportedOperationException();
+	}
+	@Override
+	public  void visit(QrType qrType)
+	{
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public  void visit(FunctionType functionType)
+	{
+		throw new UnsupportedOperationException();
+	}
+	@Override
+	public  void visit(OpaqueType opaqueType)
+	{
+		throw new UnsupportedOperationException();
+	}
+
+
+	@Override
+	protected  void VisitAstElement(IAst element, IAst parent)
+	{
+		if (element.nodeType() == AstNodeTypeEnum.type)
+			super.VisitAstElement(element, parent);
+	}
+
+	public  String ToString()
+	{
+		return m_emitter.toString();
+	}
+
+	public CadpType()
+	{
+		super(null);
+	}
+
+	public static String DumpType(UlyssesType atype)
+	{
+		final CadpType newtype = new CadpType();
+		atype.Accept(newtype);
+		return newtype.ToString();
+	}
+
+
+	private static HashSet<String> emittedTypes = new HashSet<String>();
+
+	private static void EmitType(UlyssesType aType, OoasCodeEmitter emitter)
+	{
+		final String typename = CadpIdentifier.GetIdentifierString(aType.identifier());
+		if (!emittedTypes.contains(typename))
+			switch (aType.kind())
+			{
+			case BoolType:
+				emittedTypes.add(typename);
+				EmitDefinition((BoolType)aType, emitter);
+				break;
+
+			case EnumeratedType:
+				emittedTypes.add(typename);
+				EmitDefinition((EnumType)aType, emitter);
+				break;
+
+			case FloatType:
+				emittedTypes.add(typename);
+				EmitDefinition((FloatType)aType, emitter);
+				break;
+
+			case IntType:
+				emittedTypes.add(typename);
+				EmitDefinition((IntType)aType, emitter);
+				break;
+
+			case MapType:
+				throw new UnsupportedOperationException();
+
+			case ListType:
+				emittedTypes.add(typename);
+				EmitDefinition((ListType)aType, emitter);
+				break;
+
+			case TupleType:
+				emittedTypes.add(typename);
+				EmitDefinition((TupleType)aType, emitter);
+				break;
+
+			case OoActionSystemType:
+				emittedTypes.add(typename);
+				EmitDefinition((OoActionSystemType)aType, emitter);
+				break;
+
+			case QrType:
+				throw new UnsupportedOperationException(); // does not make sense in CADP target.
+
+			case FunctionType:
+				emittedTypes.add(typename);
+				EmitDefinition((FunctionType)aType, emitter);
+				break;
+
+			case Null:
+			case Any:
+			case OpaqueType:
+				throw new UnsupportedOperationException(); // should throw invalid args exception
+
+			default:
+				throw new UnsupportedOperationException();
+			}
+	}
+
+	private static void EmitDefinition(FunctionType functionType, OoasCodeEmitter emitter)
+	{
+		final String typeName = CadpIdentifier.GetIdentifierString(functionType.identifier());
+		final String decl = OoaCADPVisitor.FunctionHeader(functionType, String.format("(* %s)", typeName));
+		m_functionForwardDefinitions.AppendLine(String.format("typedef %s;", decl));
+	}
+
+	private static void EmitDefinition(IntType intType, OoasCodeEmitter emitter)
+	{
+		final String typeName = GetIdentifierString(intType.identifier());
+
+		emitter.AppendLine(String.format("typedef %s %s;", DumpType(intType), typeName));
+
+		// low
+		emitter.AppendLine(String.format("/*%s%s*/", lowString, typeName));
+		emitter.Append(String.format("long long int %s%s (void) {", lowString, typeName));
+		emitter.AppendLine("return 0; }");
+
+		// high
+		emitter.AppendLine(String.format("/*%s%s*/", highString, typeName));
+		emitter.Append(String.format("long long int %s%s (void) { return %sLL; }", highString, typeName, ((long)intType.rangeHigh()) - intType.rangeLow() + 1));
+
+		// enumerator
+		emitter.AppendLine(String.format("/*%s%s*/", enumString, typeName));
+		emitter.Append(String.format("%s %s%s (long long int value) { ", typeName, enumString, typeName));
+		emitter.AppendLine(String.format("if (value >= %s%s()) { printf(\"Enum index out of range: %s\\n\"); abort();}", highString, typeName, typeName));
+		emitter.Append(String.format("return (%s) (%sLL + value);", typeName, intType.rangeLow()));
+		emitter.AppendLine("}");
+
+		// print
+		emitter.AppendLine(String.format("/*%s%s*/", printString, typeName));
+		emitter.AppendLine(String.format("void %s%s (CAESAR_TYPE_FILE CAESAR_FILE, %s A_VALUE)", printString, typeName, typeName));
+		emitter.AppendLine("{");
+		emitter.AppendLine("  fprintf(CAESAR_FILE,\"%d\",A_VALUE);");
+		emitter.AppendLine("}");
+	}
+
+	private static void EmitDefinition(FloatType floatType, OoasCodeEmitter emitter)
+	{
+		final String typeName = GetIdentifierString(floatType.identifier());
+
+		emitter.AppendLine(String.format("typedef %1$s %2$s;", DumpType(floatType), typeName));
+
+		// low
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", lowString, typeName));
+		emitter.Append(String.format("int %2$s%1$s (void) {", typeName, lowString)); emitter.AppendLine("return 0; }");
+
+		// high
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", highString, typeName));
+		final long count = (long) (((long)floatType.high() - (long)floatType.low()) / floatType.precision());
+		emitter.Append(String.format("long long int %2$s%1$s (void) { return %3$sLL; }", typeName, highString, count));
+
+		// enumerator
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", enumString, typeName));
+		emitter.Append(String.format("%1$s %2$s%1$s (long long int value) { ", typeName, enumString));
+		emitter.AppendLine(String.format("if (value >= %2$s%1$s()) { printf(\"Enum index out of range: %1$s\\n\"); abort();}", typeName, highString));
+		emitter.Append(String.format("return %1$sLL + (value * %2$s);", floatType.low(), floatType.precision()));
+		emitter.AppendLine("}");
+
+		// print
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", printString, typeName));
+		emitter.AppendLine(String.format("void %1$s%2$s (CAESAR_TYPE_FILE CAESAR_FILE, %2$s A_VALUE)", printString, typeName));
+		emitter.AppendLine("{");
+		emitter.AppendLine("  fprintf(CAESAR_FILE,\"%lf\",A_VALUE);");
+		emitter.AppendLine("}");
+	}
+
+	private static void EmitDefinition(EnumType enumType, OoasCodeEmitter emitter)
+	{
+		final String typeName = GetIdentifierString(enumType.identifier());
+
+		emitter.AppendLine(String.format("typedef %1$s %2$s;", DumpType(enumType), typeName));
+
+		// low
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", lowString, typeName));
+		emitter.Append(String.format("int %2$s%1$s (void) {", typeName, lowString)); emitter.AppendLine("return 0; }");
+
+		// high
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", highString, typeName));
+		emitter.Append(String.format("int %2$s%1$s (void) { return %3$s; }", typeName, highString, enumType.listOfEnumSymbols().size()));
+
+		if (enumType instanceof ValuedEnumType)
+			ValuedEnumType((ValuedEnumType)enumType, emitter, typeName);
+		else
+			NormalEnumType(enumType, emitter, typeName);
+
+	}
+
+	private static void ValuedEnumType(ValuedEnumType enumType, OoasCodeEmitter emitter, String typeName)
+	{
+		// enumerator
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", enumString, typeName));
+		emitter.AppendLine(String.format("%3$s %2$s%1$s (long long int value) { ", typeName, enumString, DumpType(enumType)));
+		emitter.AppendLine(String.format("if (value >= %2$s%1$s()) { printf(\"Enum index out of range: %1$s\\n\"); abort();}", typeName, highString));
+		int i = 0;
+		for (final Identifier sym : enumType.symbolTable().symbolList())
+		{
+			final EnumIdentifier id = (EnumIdentifier)sym;
+			emitter.AppendLine(String.format("if (value == %1$s) return (int) %2$s;", i++, id.Value()));
+		}
+		emitter.AppendLine("}");
+
+
+		// print
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", printString, typeName));
+		emitter.AppendLine(String.format("void %1$s%2$s (CAESAR_TYPE_FILE CAESAR_FILE, %2$s A_VALUE)", printString, typeName));
+		emitter.AppendLine("{");
+		i = 0;
+		for (final Identifier sym : enumType.symbolTable().symbolList())
+		{
+			final EnumIdentifier id = (EnumIdentifier)sym;
+			emitter.AppendLine(String.format("  if (A_VALUE == %1$s) fprintf(CAESAR_FILE,\"%2$s\");", id.Value(), id.tokenText()));
+		}
+		emitter.AppendLine("}");
+	}
+
+
+	private static void NormalEnumType(EnumType enumType, OoasCodeEmitter emitter, String typeName)
+	{
+
+		// enumerator
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", enumString, typeName));
+		emitter.AppendLine(String.format("%3$s %2$s%1$s (long long int value) { ", typeName, enumString, DumpType(enumType)));
+		emitter.AppendLine(String.format("if (value >= %2$s%1$s()) { printf(\"Enum index out of range: %1$s\\n\"); abort();}", typeName, highString));
+		emitter.AppendLine(String.format("return (int)value; /*enums are treated like ints*/"));
+		emitter.AppendLine("}");
+
+		// backtranslation of enum syms
+		emitter.AppendLine(String.format(" /* backtranslation of enum %1$s */ ", typeName));
+		emitter.Append(String.format("CAESAR_TYPE_STRING _%1$s_identifiers[%2$s] = {", typeName, enumType.listOfEnumSymbols().size()));
+		int i = 0;
+		for (final Identifier x : enumType.listOfEnumSymbols())
+		{
+			if (i != 0)
+				emitter.Append(", ");
+			else
+				i++;
+			emitter.Append(String.format("\"%1$s\"", x.tokenText()));
+		}
+		emitter.AppendLine("};");
+
+		// print
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", printString, typeName));
+		emitter.AppendLine(String.format("void %1$s%2$s (CAESAR_TYPE_FILE CAESAR_FILE, %2$s A_VALUE)", printString, typeName));
+		emitter.AppendLine("{");
+		emitter.AppendLine(String.format("  fprintf(CAESAR_FILE,\"%%s\", _%1$s_identifiers[A_VALUE]);", typeName));
+		emitter.AppendLine("}");
+
+	}
+
+	private static void EmitDefinition(BoolType boolType, OoasCodeEmitter emitter)
+	{
+		final String typeName = GetIdentifierString(boolType.identifier());
+
+		emitter.AppendLine(String.format("typedef %1$s %2$s;", DumpType(boolType), typeName));
+
+		// low
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", lowString, typeName));
+		emitter.Append(String.format("int %2$s%1$s (void) {", typeName, lowString)); emitter.AppendLine("return 0; }");
+
+		// high
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", highString, typeName));
+		emitter.Append(String.format("int %2$s%1$s (void) { return 2; }", typeName, highString));
+
+		// enumerator
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", enumString, typeName));
+		emitter.Append(String.format("%1$s %2$s%1$s (long long int value) { ", typeName, enumString));
+		emitter.AppendLine(String.format("if (value >= %2$s%1$s()) { printf(\"Enum index out of range: %1$s\\n\"); abort();}", typeName, highString));
+		emitter.Append("return (int) value;");
+		emitter.AppendLine("}");
+
+		// print
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", printString, typeName));
+		emitter.AppendLine(String.format("void %1$s%2$s (CAESAR_TYPE_FILE CAESAR_FILE, %2$s A_VALUE)", printString, typeName));
+		emitter.AppendLine("{");
+		emitter.AppendLine(String.format("  fprintf(CAESAR_FILE,\"%%s\", A_VALUE ? \"true\" : \"false\");"));
+		emitter.AppendLine("}");
+	}
+
+	/// <summary>
+	/// Emits type definition for list
+	/// </summary>
+	private static void EmitDefinition(ListType alistType, OoasCodeEmitter result)
+	{
+
+		if (alistType.innerType().kind() != TypeKind.Null &&
+				!emittedTypes.contains(CadpIdentifier.GetIdentifierString(alistType.innerType().identifier())))
+			EmitType(alistType.innerType(), result);
+
+		final OoasCodeEmitter emitter = new OoasCodeEmitter();
+		final String typeName = GetIdentifierString(alistType.identifier()).replaceAll(" ", "_");
+
+		// include a forward definition
+		m_typeForwardDefinitions.AppendLine(String.format("typedef struct list_%1$s %1$s;", typeName));
+
+		emitter.AppendLine("#ifdef WINDOWSPACK");
+		emitter.AppendLine("#pragma pack(1)");
+		emitter.AppendLine("#endif");
+		emitter.AppendLine(String.format("struct list_%1$s { int length; %2$s elements[%3$s];} UNIXPACK /*%1$s, * p%1$s*/;"
+				, typeName, DumpType(alistType.innerType()), alistType.maxNumberOfElements() == 0 ? 1 : alistType.maxNumberOfElements()));
+		emitter.AppendLine(String.format("#define MAX_%1$s %2$s", typeName, alistType.maxNumberOfElements()));
+		emitter.AppendLine("");
+
+
+		// -- constructor (non pointer)
+		emitter.AppendLine(String.format("/*%1$s*/", constructorString));
+		emitter.Append(String.format("%1$s %2$s%1$s (int length ", typeName, constructorString));
+		final String internalType = DumpType(alistType.innerType());
+		int i;
+		for (i = 0; i < alistType.maxNumberOfElements(); i++)
+		{
+			emitter.Append(", ");
+			emitter.Append(String.format("%1$s arg_%2$s", internalType, i));
+		}
+		emitter.AppendLineIncIndent(") {");
+		emitter.AppendLine(String.format("%1$s result;", typeName));
+		emitter.AppendLine(String.format(String.format("memset(&result,0,sizeof(%1$s));", typeName)));
+		emitter.AppendLine("result.length = length;");
+		for (i = 0; i < alistType.maxNumberOfElements(); i++)
+		{
+			emitter.AppendLine(String.format("result.elements[%1$s] = arg_%1$s;", i));
+			/*do range checking on ints and floats*/
+			switch (alistType.innerType().kind())
+			{
+			case IntType:
+				final IntType placetype_int = (IntType)alistType.innerType();
+				emitter.AppendLine(String.format("/*Range of arg_%3$s: %1$s..%2$s*/", placetype_int.rangeLow(), placetype_int.rangeHigh(), i));
+				emitter.AppendLine(String.format("if (arg_%1$s < %2$s || arg_%1$s > %3$s)", i, placetype_int.rangeLow(), placetype_int.rangeHigh()));
+				emitter.AppendLine(String.format("{CALC_INVALID = 1;}"));
+				break;
+			case FloatType:
+				final FloatType placetype_float = (FloatType)alistType.innerType();
+				emitter.AppendLine(String.format("/*Range of arg_%3$s: %1$s..%2$s*/", placetype_float.low(), placetype_float.high(), i));
+				emitter.AppendLine(String.format("if (arg_%1$s < %2$s || arg_%1$s > %3$s)", i, placetype_float.low(), placetype_float.high()));
+				emitter.AppendLine(String.format("{CALC_INVALID = 1;}"));
+				break;
+			default:
+				break;
+			}
+		}
+		emitter.AppendLine("return result;");
+		emitter.AppendLineDecIndent("}");
+		emitter.AppendLine("");
+
+
+		emitter.AppendLine("");
+
+		// low
+		emitter.AppendLine(String.format("/*%1$s*/", lowString));
+		emitter.Append(String.format("int %2$s%1$s (void) {", typeName, lowString)); emitter.AppendLine("return 0; }");
+
+		// high
+		emitter.AppendLine(String.format("/*%1$s*/", highString));
+		if (alistType.innerType().kind() == TypeKind.Null)
+			emitter.Append(String.format("int %2$s%1$s (void) { return 0; }", typeName, highString));
+		else
+			emitter.Append(String.format("long long int %2$s%1$s (void) { return MAX_%1$s * %2$s%3$s(); }", typeName, highString, GetIdentifierString(alistType.innerType().identifier())));
+
+		// enumerator
+		//emitter.AppendLine(String.format("/*%1$s*/", enumString));
+		//emitter.Append(String.format("%1$s %2$s%1$s (int value) { ", typeName, enumString));
+		//emitter.AppendLine(String.format("if (value >= %2$s%1$s()) { printf(\"Enum index out of range: %1$s\\n\"); abort();}", typeName, highString));
+		//emitter.AppendLine("abort();");
+		//emitter.Append("return value;");
+		//emitter.AppendLine("}");
+
+		// print
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", printString, typeName));
+		emitter.AppendLine(String.format("void %1$s%2$s (CAESAR_TYPE_FILE CAESAR_FILE, %2$s A_VALUE)", printString, typeName));
+		emitter.AppendLine("{");
+		emitter.AppendLine(String.format("  fprintf(CAESAR_FILE,\" [len: %%d \", A_VALUE.length);"));
+		for (i = 0; i < alistType.maxNumberOfElements(); i++)
+		{
+			emitter.AppendLine(String.format("if (A_VALUE.length > %1$s){", i));
+			emitter.AppendLine(String.format("fprintf(CAESAR_FILE,\" %1$s: \");", i));
+			emitter.AppendLine(String.format("%1$s%2$s (CAESAR_FILE, A_VALUE.elements[%3$s]);", printString, CadpIdentifier.GetIdentifierString(alistType.innerType().identifier()), i));
+			emitter.AppendLine("} /*if*/");
+		}
+		emitter.AppendLine("  fprintf(CAESAR_FILE,\"]\");");
+		emitter.AppendLine("}");
+
+		result.Append(emitter.toString());
+	}
+
+	private static void EmitDefinition(TupleType atupleType, OoasCodeEmitter result)
+	{
+		final String typeName = GetIdentifierString(atupleType.identifier());
+		final OoasCodeEmitter emitter = new OoasCodeEmitter();
+
+
+		// include a forward definition
+		m_typeForwardDefinitions.AppendLine(String.format("typedef struct struct_%1$s %1$s;", typeName));
+
+		emitter.AppendLine("#ifdef WINDOWSPACK");
+		emitter.AppendLine("#pragma pack(1)");
+		emitter.AppendLine("#endif");
+		emitter.AppendLineIncIndent(String.format("struct struct_%1$s {", typeName));
+		int i = 0;
+		for (final UlyssesType it: atupleType.innerTypes())
+		{
+			EmitType(it);
+			emitter.AppendLine(String.format("%1$s elem_%2$s;", DumpType(it), i));
+			i++;
+		}
+		emitter.AppendLineDecIndent(String.format("} UNIXPACK /*%1$s, * p%1$s*/;", typeName));
+
+
+
+		emitter.AppendLine("");
+
+		// -- constructor (non pointer)
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", constructorString, typeName));
+		emitter.Append(String.format("%1$s %2$s%1$s (", typeName, constructorString));
+		i = 0;
+		for (final UlyssesType it: atupleType.innerTypes())
+		{
+			if (!emittedTypes.contains(CadpIdentifier.GetIdentifierString(it.identifier())))
+				EmitType(it, result);
+			if (i != 0)
+				emitter.Append(",");
+			emitter.Append(String.format("%1$s arg_%2$s", DumpType(it), i));
+			i++;
+		}
+		emitter.AppendLineIncIndent(") {");
+		emitter.AppendLine(String.format("%1$s result;", typeName));
+		i = 0;
+		for (final UlyssesType it:  atupleType.innerTypes())
+		{
+			emitter.AppendLine(String.format("result.elem_%1$s = arg_%1$s;", i));
+			/*do range checking on ints and floats*/
+			switch (it.kind())
+			{
+			case IntType:
+				final IntType placetype_int = (IntType)it;
+				emitter.AppendLine(String.format("/*Range of arg_%3$s: %1$s..%2$s*/", placetype_int.rangeLow(), placetype_int.rangeHigh(), i));
+				emitter.AppendLine(String.format("if (arg_%1$s < %2$s || arg_%1$s > %3$s)", i, placetype_int.rangeLow(), placetype_int.rangeHigh()));
+				emitter.AppendLine(String.format("{CALC_INVALID = 1;}"));
+				break;
+			case FloatType:
+				final FloatType placetype_float = (FloatType)it;
+				emitter.AppendLine(String.format("/*Range of arg_%3$s: %1$s..%2$s*/", placetype_float.low(), placetype_float.high(), i));
+				emitter.AppendLine(String.format("if (arg_%1$s < %2$s || arg_%1$s > %3$s)", i, placetype_float.low(), placetype_float.high()));
+				emitter.AppendLine(String.format("{CALC_INVALID = 1;}"));
+				break;
+			default:
+				break;
+			}
+			i++;
+		}
+		emitter.AppendLine("return result;");
+		emitter.AppendLineDecIndent("}");
+		emitter.AppendLine("");
+
+
+		// low
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", lowString, typeName));
+		emitter.Append(String.format("int %2$s%1$s (void) {", typeName, lowString)); emitter.AppendLine("return 0; }");
+
+		// high
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", highString, typeName));
+		emitter.Append(String.format("long long int %2$s%1$s (void) { return ", typeName, highString));
+		i = 0;
+		for (final UlyssesType x : atupleType.innerTypes())
+		{
+			if (i != 0)
+				emitter.Append(" * ");
+			else
+				i++;
+			emitter.Append(String.format("%2$s%1$s()", GetIdentifierString(x.identifier()), highString));
+		}
+		emitter.AppendLine("; }");
+
+		// enumerator
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", enumString, typeName));
+		emitter.Append(String.format("%1$s %2$s%1$s (long long int value) { ", typeName, enumString));
+		emitter.AppendLine(String.format("if (value >= %2$s%1$s()) { printf(\"Enum index out of range: %1$s\\n\"); abort();}", typeName, highString));
+		emitter.Append(String.format("return %2$s%1$s (", typeName, constructorString));
+		i = 0;
+		final StringBuilder divisor = new StringBuilder("value");
+		for (final UlyssesType it: atupleType.innerTypes())
+		{
+			if (i != 0)
+				emitter.Append(",");
+			else i++;
+			emitter.Append(String.format("%2$s%1$s((%4$s) %% %3$s%1$s())", GetIdentifierString(it.identifier()), enumString, highString, divisor.toString()));
+			divisor.append(String.format(" / %2$s%1$s() ", GetIdentifierString(it.identifier()), highString));
+		}
+		emitter.AppendLine(");}");
+
+
+		// print
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", printString, typeName));
+		emitter.AppendLine(String.format("void %1$s%2$s (CAESAR_TYPE_FILE CAESAR_FILE, %2$s A_VALUE)", printString, typeName));
+		emitter.AppendLine("{");
+		emitter.AppendLine(String.format("  fprintf(CAESAR_FILE,\" (\");"));
+		final Iterator<UlyssesType> iter = atupleType.innerTypes().iterator();
+		for (i = 0; i < atupleType.innerTypes().size(); i++)
+		{
+			if (i != 0)
+				emitter.AppendLine("fprintf(CAESAR_FILE, \", \");");
+			emitter.AppendLine(String.format("%1$s%2$s (CAESAR_FILE, A_VALUE.elem_%3$s);", printString, CadpIdentifier.GetIdentifierString(iter.next().identifier()), i));
+		}
+		emitter.AppendLine("  fprintf(CAESAR_FILE,\")\");");
+		emitter.AppendLine("}");
+
+		emitter.AppendLine("");
+		result.Append(emitter.toString());
+	}
+
+	public static String GetNullConstant(OoActionSystemType anActionSystem)
+	{
+		return String.format("NULL_%1$s", CadpIdentifier.GetIdentifierString(anActionSystem.identifier()));
+	}
+
+	private static void EmitObjectJumpTable(OoActionSystemType instance)
+	{
+
+		final OoasCodeEmitter emitter = new OoasCodeEmitter();
+		final OoasCodeEmitter forwards = new OoasCodeEmitter();
+
+		// emit null
+		emitter.AppendLine(String.format("%1$s NULL_%2$s = {0, \"NULL_%2$s\"",
+				CadpIdentifier.GetIdentifierString(instance.identifier()),
+				CadpIdentifier.GetIdentifierString(instance.identifier())));
+		emitter.AppendLine(", NULL");
+		emitter.AppendLine("};");
+
+		// emit standard jump table
+
+		// emit objects
+		for (final OoActionSystemInstance ooainstance: instance.objects())
+		{
+			forwards.AppendLine(String.format("/* ==> Object %1$s <==*/", ooainstance.Name));
+
+			emitter.AppendLine(String.format("struct jump_%1$s methods_%2$s = {",
+					CadpIdentifier.GetIdentifierString(instance.identifier()), ooainstance.Name));
+			int i = 0;
+			final SymbolTable allSyms = instance.getAllSymbols();
+			for (final Identifier sym : allSyms.symbolList())
+			{
+				if (sym.kind() == IdentifierKind.MethodIdentifier)
+				{
+					if (i != 0)
+						emitter.AppendLine(", ");
+
+					// FIXME: this does not take the shortener into account...
+					final String method = String.format("%s_%s", ooainstance.Name, ((FunctionIdentifier)sym).tokenText());
+//					final String method = OoaObjectInstantiationVisitor.getInstanceFunctionName(ooainstance, (FunctionIdentifier)sym);
+
+					final String methoddef = OoaCADPVisitor.FunctionHeader((FunctionIdentifier)sym, method);
+					forwards.AppendLine(String.format("%1$s;", methoddef));
+					emitter.Append(String.format("&%1$s", method));
+					i++;
+				}
+			}
+			emitter.AppendLine();
+			emitter.AppendLine("};");
+
+
+			emitter.Append(String.format("%1$s %2$s = {1, \"%2$s\", & methods_%2$s",
+					CadpIdentifier.GetIdentifierString(ooainstance.Type.identifier()), ooainstance.Name));
+			emitter.AppendLine("};");
+		}
+
+
+
+		// enumerator
+		final String typeName = String.format("%1$s", CadpIdentifier.GetIdentifierString(instance.identifier()));
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", enumString, typeName));
+
+		// extern defs.
+		for (final OoActionSystemInstance inst: instance.derivedObjects())
+			emitter.AppendLine(String.format("extern %1$s %2$s;", CadpIdentifier.GetIdentifierString(inst.Type.identifier()),inst.Name));
+
+		emitter.AppendLine(String.format("%1$s %2$s%1$s (long long int value) { ", typeName, enumString));
+		m_functionForwardDefinitions.AppendLine(String.format("%1$s %2$s%1$s (long long int value);", typeName, enumString));
+		emitter.AppendLine(String.format("if (value >= %2$s%1$s()) { printf(\"Enum index out of range: %1$s\\n\"); abort();}", typeName, highString));
+		emitter.AppendLine(String.format("switch((int)value){"));
+
+		emitter.AppendLine(String.format(" case 0 : return NULL_%1$s;", CadpIdentifier.GetIdentifierString(instance.identifier())));
+
+		int u = 1;
+		for (final OoActionSystemInstance inst: instance.objects())
+		{
+			emitter.AppendLine(String.format("case %1$s:", u));
+			emitter.AppendLine(String.format("return %1$s;", inst.Name));
+			u++;
+		}
+		for (final OoActionSystemInstance inst: instance.derivedObjects())
+		{
+			emitter.AppendLine(String.format("case %1$s:", u));
+			emitter.AppendLine(String.format("return *(%2$s*)&(%1$s);", inst.Name, typeName));
+			u++;
+		}
+		emitter.AppendLine("}");
+		emitter.AppendLine("printf(\"bug during simulation:\\n     unknown object number\\n\"); CAESAR_TERMINATE(1);");
+		emitter.AppendLine(String.format("return NULL_%1$s;", CadpIdentifier.GetIdentifierString(instance.identifier())));
+		emitter.AppendLine("}");
+
+
+		m_typeDefinitions.AppendLine(forwards.toString());
+		m_typeDefinitions.AppendLine(emitter.toString());
+	}
+
+
+	private static void EmitDefinition(OoActionSystemType aClass, OoasCodeEmitter result)
+	{
+		/* ooa type gets translated into a jump table */
+		final String typeName = String.format("%1$s", CadpIdentifier.GetIdentifierString(aClass.identifier()));
+		final OoasCodeEmitter emitter = new OoasCodeEmitter();
+
+		final OoasCodeEmitter classStructure = new OoasCodeEmitter();
+		classStructure.AppendLine(String.format("/* jump table type for class %1$s */", aClass.identifier().tokenText()));
+
+		classStructure.AppendLine(String.format("struct jump_%1$s {", typeName));
+//		int i = 0;
+		final SymbolTable allSyms = aClass.getAllSymbols();
+		for (final Identifier sym: allSyms.symbolList())
+		{
+			if (sym.kind() == IdentifierKind.MethodIdentifier)
+			{
+				final MethodIdentifier method = (MethodIdentifier)sym;
+				EmitType(method.type());
+				classStructure.AppendLine(String.format("%1$s %2$s;", CadpIdentifier.GetIdentifierString(method), method.tokenText()));
+//				i++;
+			}
+		}
+		classStructure.AppendLine("};");
+
+		classStructure.AppendLine("#ifdef WINDOWSPACK");
+		classStructure.AppendLine("#pragma pack(1)");
+		classStructure.AppendLine("#endif");
+		classStructure.AppendLineIncIndent(String.format("struct struct_%1$s {", typeName));
+		classStructure.AppendLine("char __validinstance;");
+		classStructure.AppendLine("char* __object_name;");
+		classStructure.AppendLine(String.format("struct jump_%1$s *methods;", typeName));
+		classStructure.AppendLineDecIndent(String.format("} UNIXPACK /*%1$s*/;", typeName));
+
+		m_classTypeDefinitions.AppendLine(classStructure.toString());
+
+		emitter.AppendLine("");
+
+		// include a forward definition
+		m_typeForwardDefinitions.AppendLine(String.format("typedef struct struct_%1$s %1$s;", typeName));
+
+		// low
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", lowString, typeName));
+		emitter.Append(String.format("int %2$s%1$s (void) {", typeName, lowString)); emitter.AppendLine("return 0; }");
+		m_functionForwardDefinitions.AppendLine(String.format("int %2$s%1$s (void);", typeName, lowString));
+
+		// high
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", highString, typeName));
+		emitter.Append(String.format("int %2$s%1$s (void) { return %3$s; }", typeName, highString, aClass.objects().size() + 1 + aClass.derivedObjects().size()));
+		m_functionForwardDefinitions.AppendLine(String.format("int %2$s%1$s (void);", typeName, highString));
+
+		// print
+		emitter.AppendLine(String.format("/*%1$s%2$s*/", printString, typeName));
+		emitter.AppendLine(String.format("void %1$s%2$s (CAESAR_TYPE_FILE CAESAR_FILE, %2$s A_VALUE)", printString, typeName));
+		emitter.AppendLine("{");
+		emitter.AppendLine("  fprintf(CAESAR_FILE,\"object %s\", A_VALUE.__object_name);");
+		emitter.AppendLine("}");
+		m_functionForwardDefinitions.AppendLine(String.format("void %1$s%2$s (CAESAR_TYPE_FILE CAESAR_FILE, %2$s A_VALUE);", printString, typeName));
+		result.Append(emitter.toString());
+
+		EmitObjectJumpTable(aClass);
+	}
+
+
+
+
+	public static String GetMaxVal(UlyssesType atype)
+	{
+		return String.format(" (%2$s%1$s() - 1) ", GetIdentifierString(atype.identifier()), highString);
+	}
+
+	public static String GetMinVal(UlyssesType atype)
+	{
+		return String.format(" %2$s%1$s() ", GetIdentifierString(atype.identifier()), lowString);
+	}
+
+	public static String GetEnumVal(UlyssesType atype, String indexvar)
+	{
+		return String.format(" %2$s%1$s(%3$s)", GetIdentifierString(atype.identifier()), enumString, indexvar);
+	}
+	public static String GetEnumVal(UlyssesType atype)
+	{
+		return String.format(" %2$s%1$s", GetIdentifierString(atype.identifier()), enumString);
+	}
+
+
+	private static OoasCodeEmitter m_typeForwardDefinitions = new OoasCodeEmitter();
+	private static OoasCodeEmitter m_functionForwardDefinitions = new OoasCodeEmitter();
+	private static OoasCodeEmitter m_classTypeDefinitions = new OoasCodeEmitter();
+	private static OoasCodeEmitter m_typeDefinitions = new OoasCodeEmitter();
+
+	public static void EmitType(UlyssesType aType)
+	{
+		EmitType(aType, m_typeDefinitions);
+	}
+
+	public static String GetTypeDefintions()
+	{
+		final StringBuilder result = new StringBuilder();
+		result.append(m_typeForwardDefinitions.toString());
+		result.append(System.lineSeparator());
+		result.append(m_functionForwardDefinitions.toString());
+		result.append(System.lineSeparator());
+		result.append(m_classTypeDefinitions.toString());
+		result.append(System.lineSeparator());
+		result.append(m_typeDefinitions.toString());
+		result.append(System.lineSeparator());
+		return result.toString();
+	}
+
+	public static boolean IsNumeric(UlyssesType ulyssesType)
+	{
+		switch (ulyssesType.kind())
+		{
+		case BoolType:
+		case EnumeratedType:
+		case FloatType:
+		case IntType:
+			return true;
+		default:
+			return false;
+		}
+	}
+
+
+	static
+	{
+		// populate typesizes.
+		m_typesizes = new HashMap<String, Integer>();
+		m_typesizes.put("char", 1);
+		m_typesizes.put("int", 4);
+		m_typesizes.put("double", 8);
+		m_typesizes.put("pointer", 4);
+	}
+
+
+
+	public static void AddTypeDefinition(String listStruct)
+	{
+		if (!emittedTypes.contains(listStruct))
+		{
+			m_typeDefinitions.AppendLine(listStruct);
+			emittedTypes.add(listStruct);
+		}
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/caesar_graph.c
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/caesar_graph.c	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/c_runtime/caesar_graph.c	(revision 2)
@@ -0,0 +1,83 @@
+
+#include "caesar_graph.h"
+
+extern CAESAR_TYPE_NATURAL CAESAR_HINT_SIZE_STATE;
+extern CAESAR_TYPE_NATURAL CAESAR_HINT_SIZE_LABEL;
+
+CAESAR_TYPE_STATE ALLOCSTATE() {return (CAESAR_TYPE_STATE) malloc(CAESAR_HINT_SIZE_STATE);}
+CAESAR_TYPE_LABEL ALLOCLABEL() {return (CAESAR_TYPE_LABEL) malloc(CAESAR_HINT_SIZE_LABEL);}
+void FREESTATE(CAESAR_TYPE_STATE aState) {CAESAR_DELETE_STATE(&aState);}
+void FREELABEL(CAESAR_TYPE_LABEL aLabel) {CAESAR_DELETE(aLabel);}
+
+
+void FREE(CAESAR_TYPE_LABEL aString) 
+{
+	free(aString);
+}
+
+void* CAESAR_FILE_OPEN (char* afileName) 
+{
+	return fopen(afileName,"wb+");
+}
+
+
+
+void CAESAR_FILE_CLOSE(CAESAR_TYPE_FILE pFile, char* aFileName)
+{
+	fclose(pFile);
+	remove(aFileName);
+}
+
+int CAESAR_STRING_LEN(CAESAR_TYPE_FILE pFile)
+{
+  if (pFile==NULL) {return 0;}
+
+  // obtain file size:
+  fflush(pFile);
+  fseek (pFile , 0 , SEEK_END);
+  long lSize = ftell (pFile);
+  rewind (pFile);
+
+  // allocate memory to contain the whole file:
+  return sizeof(char)* lSize + 1;
+}
+
+int CAESAR_STRING_FROM_FILE(CAESAR_TYPE_FILE pFile, char* buffer, int buffer_size) 
+{
+  size_t result;
+  if (pFile==NULL) {return 0;}
+
+  if (buffer == NULL) {fputs ("Memory error",stderr); exit (2);}
+  memset(buffer,0,buffer_size);
+  // copy the file into the buffer:
+  result = fread (buffer,1,buffer_size,pFile);
+  if (result != (buffer_size-1)/sizeof(char)) {fputs ("Reading error",stderr); exit (3);}
+
+  /* the whole file is now loaded in the memory buffer. */
+  return result;
+}
+
+#if defined _WIN32 || defined __CYGWIN__
+extern CAESAR_TYPE_FILE CAESAR_BUFFER;
+#endif
+void Set_CAESAR_BUFFER(char* filename)
+{
+#if defined _WIN32 || defined __CYGWIN__
+	FILE* afile = (FILE*)CAESAR_FILE_OPEN(filename);
+	CAESAR_BUFFER = afile;
+#endif
+}
+
+
+void CAESAR_COPY_STATE(CAESAR_TYPE_STATE CAESAR_S1,CAESAR_TYPE_STATE CAESAR_S2) 
+{
+	memcpy ((char *) (CAESAR_S1), (char *) (CAESAR_S2), CAESAR_HINT_SIZE_STATE);
+}
+
+
+void CAESAR_COPY_LABEL(CAESAR_TYPE_LABEL CAESAR_L1,CAESAR_TYPE_LABEL CAESAR_L2) 
+{
+	memcpy ((char *) (CAESAR_L1), (char *) (CAESAR_L2), CAESAR_HINT_SIZE_LABEL);
+}
+
+
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaExpression.java	(revision 2)
@@ -0,0 +1,433 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.java;
+
+import java.util.ArrayList;
+
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.ExistsQuantifier;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ForallQuantifier;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.ListConstructor;
+import org.momut.ooas.ast.expressions.MapConstructor;
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+import org.momut.ooas.ast.expressions.QValConstructor;
+import org.momut.ooas.ast.expressions.SetConstructor;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.TypeExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.UnresolvedIdentifierExpression;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.expressions.QValConstructor.QValDeriv;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.utils.UnsignedHelper;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.utils.exceptions.OoasCompilerRuntimeException;
+import org.momut.ooas.visitors.OoaExpressionVisitor;
+
+public final class JavaExpression extends OoaExpressionVisitor
+{
+	private final OoasCodeEmitter m_emitter = new OoasCodeEmitter();
+	private final Scratchbook m_data;
+	private final StringBuilder m_helpers;
+
+	private String GetIdentifierString(String anIdentifier)
+	{
+		return JavaIdentifier.GetIdentifierString(anIdentifier);
+	}
+
+	public ArrayList<ObjectConstructor> constructors() { return m_data.m_constructors; }
+
+	// following calls must not happen
+	@Override
+	public void visit(UnresolvedIdentifierExpression unresolvedIdentifierExpression)
+	{
+		throw new OoasCompilerRuntimeException();
+	}
+	@Override
+	public void visit(CallExpression callExpression)
+	{
+		throw new OoasCompilerRuntimeException();
+//		System.Diagnostics.Debug.Assert(false);
+	}
+
+
+	// we need to map all other things to Java constructs
+	private String OperatorString(Expression expression)
+	{
+		switch (expression.kind())
+		{
+		case abs:    // T_ABS:
+		case card:   // T_CARD:
+		case dom:    // T_DOM:
+		case range:  // T_RNG:
+		case merge:  // T_MERGE:
+		case len:    // T_LEN:
+		case elems:  // T_ELEMS:
+		case head:   // T_HEAD:
+		case tail:   // T_TAIL:
+		case conc:   // T_CONC:
+		case inds:   // T_INDS:
+		case dinter: // T_DINTER:
+		case dunion: // T_DUNION:
+		case domresby:   // T_DOMRESBY:
+		case domresto:   // T_DOMRESTO:
+		case rngresby:   // T_RNGRESBY:
+		case rngresto:   // T_RNGRESTO:
+		case inter:  // T_INTER:
+		case union:  // T_UNION:
+		case diff:   // T_DIFF:
+		case munion: // T_MUNION:
+		case seqmod_mapoverride: // T_SEQMOD_MAPOVERRIDE:
+		case subset:
+		case elemin:
+		case notelemin:
+		case implies:    // T_IMPLIES:
+		case biimplies:  // T_BIIMPLIES:
+		case Primed:
+			throw new NotImplementedException();
+		case div:    // T_DIV:
+			return "/";
+		case idiv:   // T_IDIV:
+			return "/";
+		case mod:    // T_MOD:
+			return "%";
+		case prod:   // T_PROD:
+			return "*";
+		case sum:    // T_SUM:
+			return "+";
+		case minus:  // T_MINUS:
+			return "-";
+		case less:
+			return "<";
+		case lessequal:
+			return "<=";
+		case greater:
+			return ">";
+		case greaterequal:
+			return ">=";
+		case equal:
+			return "==";
+		case notequal:
+			return "!=";
+		case and:    // T_AND:
+			return "&&";
+		case or:     // T_OR:
+			return "||";
+		case not:
+			return "!";
+
+		case Cast:
+			JavaType ctype = new JavaType();
+			expression.type().Accept(ctype);
+			return String.format("(%s)", ctype.toString());
+
+		default:
+			return expression.kind().name(); //Enum.GetName(typeof(ExpressionKind), expression.kind);
+		}
+	}
+	@Override
+	public <T> void visit(ValueExpression<T> valueExpression)
+	{
+		if (valueExpression.value() == null)
+			m_emitter.Append("null");
+		else if (valueExpression.m_clazz.equals(Boolean.class))
+			m_emitter.Append(valueExpression.value().toString().toLowerCase());
+		else
+			m_emitter.Append(valueExpression.value().toString());
+	}
+	@Override
+	public void visit(IdentifierExpression identifierExpression)
+	{
+		if (identifierExpression.identifier().kind() == IdentifierKind.LandmarkIdentifier)
+		{
+			LandmarkIdentifier lmid = (LandmarkIdentifier)identifierExpression.identifier();
+			QrType qr = (QrType)lmid.type();
+			m_emitter.Append(qr.landmarks().indexOf(lmid));
+			return;
+		}
+
+		if (identifierExpression.identifier().kind() == IdentifierKind.EnumIdentifier)
+		{
+			m_emitter.Append(GetIdentifierString(((EnumIdentifier)identifierExpression.identifier()).type().identifier().tokenText()));
+			m_emitter.Append(".");
+		}
+
+		m_emitter.Append(GetIdentifierString(identifierExpression.identifier().tokenText()));
+	}
+
+	@Override
+	public void visit(TypeExpression typeExpression)
+	{
+		if (typeExpression.type().kind() != TypeKind.QrType &&
+				typeExpression.type().kind() != TypeKind.EnumeratedType)
+			m_emitter.Append(GetIdentifierString(typeExpression.type().identifier().tokenText()));
+	}
+
+
+	@Override
+	public void visit(ObjectConstructor objectConstructor)
+	{
+		int num = m_data.m_constructors.size();
+		m_data.m_constructors.add(objectConstructor);
+		if (objectConstructor.givenObjectName() != null)
+			m_emitter.Append(String.format("new %s(this,%s,%s)",
+					GetIdentifierString(objectConstructor.type().identifier().tokenText()),
+					num,
+					objectConstructor.givenObjectName()));
+		else
+			m_emitter.Append(String.format("new %s(this,%s)",
+					GetIdentifierString(objectConstructor.type().identifier().tokenText()),
+					num));
+	}
+
+	@Override
+	public void visit(ListConstructor listConstructor)
+	{
+		if (listConstructor.hasComprehension())
+		{
+			String helpername = String.format("list_constr_helper_%s", UnsignedHelper.toString(listConstructor.hashCode()));
+			m_emitter.Append(String.format("%s(new org.momut.ooas.codegen.java.runtime.CustomList<Object>())",
+					helpername));
+			OoasCodeEmitter helperEmitter = new OoasCodeEmitter();
+			helperEmitter.AppendLine(String.format(
+					"public org.momut.ooas.codegen.java.runtime.CustomList<Object> %s (org.momut.ooas.codegen.java.runtime.CustomList<Object> newList){",
+					helpername));
+
+
+			for (Identifier sym: listConstructor.comprehensionVariables().symbolList())
+			{
+				JavaType atype = new JavaType();
+				sym.type().Accept(atype);
+
+				if (sym.type().IsNumeric())
+					helperEmitter.AppendLine(String.format("for (%s %s = %s; %s <= %s; %s++) {",
+							atype.toString(),
+							JavaIdentifier.GetIdentifierString(sym.tokenText()),
+							UlyssesType.Low(sym.type()),
+							JavaIdentifier.GetIdentifierString(sym.tokenText()),
+							UlyssesType.High(sym.type()),
+							JavaIdentifier.GetIdentifierString(sym.tokenText())));
+				else
+					throw new NotImplementedException();
+			}
+
+			StringBuilder helperhelper = new StringBuilder();
+
+
+			String guardexpr = "true";
+			if (listConstructor.comprehension() != null)
+			{
+				JavaExpression expr = new JavaExpression(helperhelper, m_data);
+				listConstructor.comprehension().Accept(expr);
+				guardexpr = expr.toString();
+			}
+
+			JavaExpression expr2 = new JavaExpression(helperhelper, m_data);
+			listConstructor.elements().get(0).Accept(expr2);
+
+			helperEmitter.AppendLine(String.format("if (%s) {", guardexpr));
+			helperEmitter.AppendLine(String.format("newList.Add(%s);", expr2.toString()));
+			helperEmitter.AppendLine("}");
+
+			int count = listConstructor.comprehensionVariables().symbolList().size();
+			for (int i = 0; i< count; i++)
+				helperEmitter.AppendLine("}");
+
+			helperEmitter.AppendLineIncIndent("return newList;");
+			helperEmitter.AppendLine("}");
+			m_helpers.append(helperEmitter.toString());
+			m_helpers.append(helperhelper.toString());
+		}
+		else
+		{
+			m_emitter.Append("new org.momut.ooas.codegen.java.runtime.CustomList<Object>(");
+			int i = 0;
+			if (listConstructor.elements().size() > 0)
+			{
+				m_emitter.Append("new Object[] { ");
+				for (Expression x: listConstructor.elements())
+				{
+					if (i != 0)
+						m_emitter.Append(",");
+					else
+						i++;
+					x.Accept(this);
+				}
+				m_emitter.Append(" }");
+			}
+			m_emitter.Append(")");
+		}
+	}
+
+	@Override
+	public void visit(SetConstructor setConstructor)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(MapConstructor mapConstructor)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(TupleConstructor tupleConstructor)
+	{
+		m_emitter.Append(String.format("new %s(", GetIdentifierString(tupleConstructor.tupleType().tokenText())));
+		int i = 0;
+		for (Expression arg: tupleConstructor.values())
+		{
+			if (i != 0)
+				m_emitter.Append(",");
+			else
+				i++;
+			arg.Accept(this);
+		}
+		m_emitter.Append(")");
+	}
+
+	@Override
+	public void visit(QValConstructor qValConstructor)
+	{
+		StringBuilder helpers = new StringBuilder();
+
+		String landmarkOne = "null";
+		if (qValConstructor.value().length >= 1 && qValConstructor.value()[0] != null)
+		{
+			JavaExpression lndmrk1 = new JavaExpression(helpers, m_data);
+			qValConstructor.value()[0].Accept(lndmrk1);
+			landmarkOne = lndmrk1.toString();
+		}
+		String landmarkTwo = "null";
+		if (qValConstructor.value().length >= 2 && qValConstructor.value()[1] != null)
+		{
+			JavaExpression lndmrk = new JavaExpression(helpers, m_data);
+			qValConstructor.value()[1].Accept(lndmrk);
+			landmarkTwo = lndmrk.toString();
+		}
+		String derivation = "null";
+		if (qValConstructor.valueDeriv() != QValDeriv.DonTCare)
+		{
+			derivation = Integer.toString(qValConstructor.valueDeriv().ordinal());
+			//derivation = Enum.Format(typeof(QValDeriv), qValConstructor.valueDeriv, "d");
+		}
+
+		m_helpers.append(helpers.toString());
+		m_emitter.Append(String.format("new QualitativeValue(%s,%s,%s)", landmarkOne, landmarkTwo, derivation));
+	}
+
+	@Override
+	public void visit(AccessExpression accessExpression)
+	{
+		if (accessExpression.left().type().kind() != TypeKind.QrType &&
+				accessExpression.left().type().kind() != TypeKind.EnumeratedType)
+		{
+			// enums and qr types are directly (statically) converted to nums...
+			VisitSub(accessExpression.left(), accessExpression);
+			m_emitter.Append(".");
+		}
+		VisitSub(accessExpression.right(), accessExpression);
+	}
+
+	@Override
+	public void visit(BinaryOperator binaryOperator)
+	{
+		m_emitter.Append("(");
+		VisitSub(binaryOperator.left(), binaryOperator);
+		m_emitter.Append(") ");
+		m_emitter.Append(OperatorString(binaryOperator));
+		m_emitter.Append(" (");
+		VisitSub(binaryOperator.right(), binaryOperator);
+		m_emitter.Append(")");
+	}
+
+	@Override
+	public void visit(TernaryOperator ternaryOperator)
+	{
+		m_emitter.Append("(");
+		VisitSub(ternaryOperator.left(), ternaryOperator);
+		m_emitter.Append(" ? ");
+
+		VisitSub(ternaryOperator.mid(), ternaryOperator);
+		m_emitter.Append(" : ");
+
+		VisitSub(ternaryOperator.right(), ternaryOperator);
+		m_emitter.Append(")");
+	}
+	@Override
+	public void visit(TupleMapAccessExpression tupleMapAccessExpression)
+	{
+		throw new NotImplementedException();
+	}
+	@Override
+	public void visit(ForallQuantifier quantifier)
+	{
+		throw new NotImplementedException();
+	}
+	@Override
+	public void visit(ExistsQuantifier quantifier)
+	{
+		throw new NotImplementedException();
+	}
+	@Override
+	public void visit(UnaryOperator unaryOperator)
+	{
+		m_emitter.Append(" ");
+		m_emitter.Append(OperatorString(unaryOperator));
+		m_emitter.Append("(");
+		VisitSub(unaryOperator.child(), unaryOperator);
+		m_emitter.Append(")");
+	}
+
+	@Override
+	public String toString()
+	{
+		return m_emitter.toString();
+	}
+
+	public JavaExpression(StringBuilder helpers, Scratchbook data)
+	{
+		super ();
+		m_helpers = helpers;
+		m_data = data;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaType.java	(revision 2)
@@ -0,0 +1,137 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.java;
+
+import org.momut.ooas.ast.types.BoolType;
+import org.momut.ooas.ast.types.CharType;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.visitors.OoaTypeVisitor;
+
+public final class JavaType extends OoaTypeVisitor
+{
+	private final OoasCodeEmitter m_emitter = new OoasCodeEmitter();
+
+	private String GetIdentifierString(String anIdentifier)
+	{
+		return JavaIdentifier.GetIdentifierString(anIdentifier);
+	}
+
+
+
+	@Override
+	public void visit(CharType charType)
+	{
+		m_emitter.Append("int"); // ToDo: map to char?
+	}
+
+	@Override
+	public void visit(IntType intType)
+	{
+		m_emitter.Append("int");
+	}
+
+	@Override
+	public void visit(BoolType boolType)
+	{
+		m_emitter.Append("boolean");
+	}
+
+	@Override
+	public void visit(FloatType floatType)
+	{
+		m_emitter.Append("double");
+	}
+
+	@Override
+	public void visit(EnumType enumType)
+	{
+		m_emitter.Append(GetIdentifierString(enumType.identifier().tokenText()));
+	}
+
+	@Override
+	public void visit(ListType listType)
+	{
+		m_emitter.Append("org.momut.ooas.codegen.java.runtime.CustomList<Object>");
+	}
+
+	@Override
+	public void visit(MapType mapType)
+	{
+		throw new NotImplementedException();
+//		m_emitter.Append("UlyssesDictionary<Object,Object>");
+	}
+
+	@Override
+	public void visit(QrType qrType)
+	{
+		m_emitter.Append("QualitativeValue");
+	}
+
+	@Override
+	public void visit(TupleType tupleType)
+	{
+		// we map a tuple to a struct
+		m_emitter.Append(GetIdentifierString(tupleType.identifier().tokenText()));
+	}
+
+	@Override
+	public void visit(FunctionType functionType)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public void visit(OoActionSystemType ooActionSystemType)
+	{
+		m_emitter.Append(GetIdentifierString(ooActionSystemType.identifier().tokenText()));
+	}
+
+	@Override
+	public void visit(OpaqueType opaqueType)
+	{
+		throw new NotImplementedException();
+	}
+
+
+	@Override
+	public String toString()
+	{
+		return m_emitter.toString();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologExpression.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologExpression.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologExpression.java	(revision 2)
@@ -0,0 +1,901 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.prolog;
+
+import java.util.ArrayList;
+
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.ExistsQuantifier;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.ForallQuantifier;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.ListConstructor;
+import org.momut.ooas.ast.expressions.MapConstructor;
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+import org.momut.ooas.ast.expressions.QValConstructor;
+import org.momut.ooas.ast.expressions.SetConstructor;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.TypeExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.UnresolvedIdentifierExpression;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.ast.types.ValuedEnumType;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.visitors.OoaExpressionVisitor;
+
+public class OoaPrologExpression extends OoaExpressionVisitor
+{
+	public static class Factory
+	{
+		public final OoaPrologExpression create(OoaPrologIdentifier.Factory idFactory, OoaPrologType.Factory typeFactory, Scratchbook sb)
+		{ return create(idFactory, typeFactory, sb, false); }
+		public OoaPrologExpression create(OoaPrologIdentifier.Factory idFactory, OoaPrologType.Factory typeFactory, Scratchbook sb, boolean lhs)
+		{ return new OoaPrologExpression(idFactory, typeFactory, sb, this, lhs); }
+	}
+
+	protected OoasCodeEmitter m_emitter = new OoasCodeEmitter();
+	protected ArrayList<String> m_tmpVars = new ArrayList<String>();
+	protected final Scratchbook m_scratchbook;
+	private boolean m_LhsExpression = false;
+
+
+	public ArrayList<String> tmpVariables() { return m_tmpVars; }
+	public boolean isLhsExpression() { return m_LhsExpression; }
+
+//	private String GetPrologType(UlyssesType aType)
+//	{
+//		OoaPrologType pType = createTypeVisitor();
+//		aType.Accept(pType);
+//		return pType.toString();
+//	}
+
+	protected String GetIdentifierString(Identifier anIdentifier)
+	{
+		final OoaPrologIdentifier pIdent = createIdentifierVisitor();
+		anIdentifier.Accept(pIdent);
+		return pIdent.toString();
+	}
+
+
+	// following call must not happen
+	@Override
+	public void visit(UnresolvedIdentifierExpression unresolvedIdentifierExpression)
+	{
+		assert(false);
+	}
+
+	// call of method that returns a value..
+	@Override
+	public /*override*/ void visit(CallExpression callExpression)
+	{
+		// we handle only function calls within expressions here (must have non-void return!)
+		final FunctionType funtype = (FunctionType)callExpression.child().type();
+		if (funtype.returnType() == null)
+			throw new ArgumentException("Internal error: Function call in expression with return-type void!");
+
+		String callstatement = "";
+		final StringBuilder parameter = new StringBuilder();
+
+		final OoaPrologExpression prologexpr = createExpressionVisitor();
+		callExpression.child().Accept(prologexpr);
+
+		m_emitter.Append(prologexpr.toString());
+		callstatement = prologexpr.tmpVariables().get(0);
+		int i = 0;
+		for (final Expression arg: callExpression.arguments())
+		{
+			if (i != 0)
+				parameter.append(", ");
+			else
+				i++;
+			final OoaPrologExpression paramexpr = createExpressionVisitor();
+			arg.Accept(paramexpr);
+			m_emitter.Append(paramexpr.toString());
+			parameter.append(paramexpr.tmpVariables().get(0));
+		}
+		if (parameter.length() > 0)
+			m_emitter.AppendLine(String.format("%s(%s,%s),", callstatement, parameter, NewTempVariable()));
+		else
+			m_emitter.AppendLine(String.format("%s(%s),", callstatement, NewTempVariable()));
+	}
+
+
+	// we need to map all other things to Prolog constructs
+	private String OperatorString(Expression expression, UlyssesType resultingType)
+	{
+		switch (expression.kind())
+		{
+		case abs:    // T_ABS:
+		case card:   // T_CARD:
+		case dom:    // T_DOM:
+		case range:  // T_RNG:
+		case merge:  // T_MERGE:
+		case elems:  // T_ELEMS:
+		case head:   // T_HEAD:
+		case tail:   // T_TAIL:
+		case conc:   // T_CONC:
+		case inds:   // T_INDS:
+		case dinter: // T_DINTER:
+		case dunion: // T_DUNION:
+		case domresby:   // T_DOMRESBY:
+		case domresto:   // T_DOMRESTO:
+		case rngresby:   // T_RNGRESBY:
+		case rngresto:   // T_RNGRESTO:
+		case inter:  // T_INTER:
+		case union:  // T_UNION:
+		case diff:   // T_DIFF:
+		case munion: // T_MUNION:
+		case seqmod_mapoverride: // T_SEQMOD_MAPOVERRIDE:
+		case subset:
+		case elemin:
+		case notelemin:
+		case implies:    // T_IMPLIES:
+		case biimplies:  // T_BIIMPLIES:
+		case Primed:
+		case len:    // T_LEN:
+			throw new NotImplementedException();
+
+		case div:    // T_DIV:
+			return "/";
+		case idiv:   // T_IDIV:
+			return "/";
+		case mod:    // T_MOD:
+			return "mod";
+		case prod:   // T_PROD:
+			return "*";
+		case sum:    // T_SUM:
+			return "+";
+		case minus:  // T_MINUS:
+			return "-";
+		case less:
+			return resultingType.kind() == TypeKind.QrType || !isNumericBinary(expression) ? "<" : "#<";
+		case lessequal:
+			return resultingType.kind() == TypeKind.QrType || !isNumericBinary(expression) ? "=<" : "#=<";
+		case greater:
+			return resultingType.kind() == TypeKind.QrType || !isNumericBinary(expression) ? ">" : "#>";
+		case greaterequal:
+			return resultingType.kind() == TypeKind.QrType || !isNumericBinary(expression) ? ">=" : "#>=";
+		case equal:
+			return resultingType.kind() == TypeKind.QrType || !isNumericBinary(expression) ? "==" : "#=";
+		case notequal:
+			return resultingType.kind() == TypeKind.QrType || !isNumericBinary(expression) ? "\\=" : "#\\=";
+		case and:    // T_AND:
+			throw new NotImplementedException(); // implemented in binaryoperator
+		case or:     // T_OR:
+			throw new NotImplementedException(); // implemented in binaryoperator
+		case not:
+			throw new NotImplementedException(); // implemented in binaryoperator
+
+		case Cast:
+			return "";
+
+		default:
+			return expression.kind().name(); //Enum.GetName(typeof(ExpressionKind), expression.kind);
+		}
+	}
+
+	protected boolean isNumericBinary(Expression expression)
+	{
+		boolean result = false;
+		if (expression instanceof BinaryOperator)
+		{
+			result = ((BinaryOperator)expression).left().type().kind() == TypeKind.IntType &&
+					((BinaryOperator)expression).right().type().kind() == TypeKind.IntType;
+		}
+		else if (expression instanceof UnaryOperator)
+		{
+			result = ((UnaryOperator)expression).child().type().kind() == TypeKind.IntType;
+		}
+		else throw new NotImplementedException();
+		return result;
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public /*override*/ <T> void visit(ValueExpression<T> valueExpression)
+	{
+		assert(m_tmpVars.size() == 0);
+		final String tmpVar = NewTempVariable();
+		m_emitter.Append(String.format("%s ", tmpVar));
+
+
+		if (valueExpression.value() == null)
+			m_emitter.Append("= 'null'");
+		else if (Boolean.class.isAssignableFrom(valueExpression.m_clazz))
+			m_emitter.Append(((ValueExpression<Boolean>) valueExpression).value() ? " #= true" : " #= fail");
+		else if (Character.class.isAssignableFrom(valueExpression.m_clazz))
+			m_emitter.Append(String.format("#= '%s'", valueExpression.toString()));
+		else if (Integer.class.isAssignableFrom(valueExpression.m_clazz))
+			m_emitter.Append(String.format("#= %s", valueExpression.toString()));
+		else
+			m_emitter.Append(String.format("= %s", valueExpression.value().toString()));
+
+		m_emitter.AppendLine(",");
+		assert(m_tmpVars.size() == 1);
+	}
+
+	@Override
+	public /*override*/ void visit(IdentifierExpression identifierExpression)
+	{
+		if (identifierExpression.identifier().kind() == IdentifierKind.LandmarkIdentifier)
+		{
+			final LandmarkIdentifier lmid = (LandmarkIdentifier)identifierExpression.identifier();
+			final OoaPrologIdentifier pid = createIdentifierVisitor();
+			lmid.Accept(pid);
+			//m_emitter.Append(pid.ToString());
+			m_tmpVars.add(pid.toString());
+			return;
+		}
+		else if (identifierExpression.identifier().kind() == IdentifierKind.EnumIdentifier)
+		{
+			final EnumIdentifier enumid = (EnumIdentifier)identifierExpression.identifier();
+			final EnumType enumType = (EnumType)enumid.type();
+			//m_emitter.Append(enumType.listOfEnumSymbols.IndexOf(enumid));
+			if (enumType instanceof ValuedEnumType)
+				m_emitter.AppendLine(String.format("%s #= %s,", NewTempVariable(), enumid.Value()));
+			else
+				m_emitter.AppendLine(String.format("%s #= %s,", NewTempVariable(), enumType.listOfEnumSymbols().indexOf(enumid)));
+		}
+		else if (identifierExpression.isSelf())
+		{
+			m_emitter.AppendLine(String.format("%s = %s,", NewTempVariable(), GetIdentifierString(identifierExpression.identifier())));
+		}
+		/*else if (identifierExpression.identifier.kind == IdentifierKind.AttributeIdentifier)
+        {
+            m_emitter.AppendLine(String.format("getVal(%s,%s,_),", GetIdentifierString(identifierExpression.identifier), NewTempVariable(), ));
+        }*/
+		else
+		{
+			m_tmpVars.add(GetIdentifierString(identifierExpression.identifier()));
+		}
+	}
+
+	@Override
+	public /*override*/ void visit(TypeExpression typeExpression)
+	{
+		if (typeExpression.type().kind() != TypeKind.QrType &&
+				typeExpression.type().kind() != TypeKind.EnumeratedType)
+		{
+			m_emitter.Append(GetIdentifierString(typeExpression.type().identifier()));
+		}
+	}
+
+
+	@Override
+	public /*override*/ void visit(ObjectConstructor objectConstructor)
+	{
+		if (objectConstructor.instances().size() > 1)
+			throw new NotImplementedException();
+
+		m_emitter.AppendLine(String.format("%s = '%s',", NewTempVariable(), objectConstructor.instances().get(0).Name));
+
+		//m_emitter.Append(String.format("new %s(this)", GetIdentifierString(objectConstructor.type.identifier)));
+	}
+
+	@Override
+	public /*override*/ void visit(ListConstructor listConstructor)
+	{
+		if (listConstructor.hasComprehension())
+		{
+			final OoaPrologExpression compr = createExpressionVisitor();
+			listConstructor.comprehension().Accept(compr);
+			final OoaPrologExpression elem = createExpressionVisitor();
+			listConstructor.elements().get(0).Accept(elem);
+
+			final StringBuilder enumvars = new StringBuilder();
+			int i = 0;
+			for (final Identifier v: listConstructor.comprehensionVariables().symbolList())
+			{
+				final OoaPrologIdentifier ident = createIdentifierVisitor();
+				v.Accept(ident);
+
+				final OoaPrologType identType = createTypeVisitor();
+				v.type().Accept(identType);
+
+				enumvars.append(String.format("%s %s: %s", i == 0 ? "" : ",", ident.toString(), identType.toString()));
+				i++;
+			}
+
+			m_emitter.AppendLine("% listcomprehension");
+			m_emitter.AppendLine(String.format("%s = {%s:[%s]:(%s%s,%s%s)}",
+					NewTempVariable(), elem.tmpVariables().get(0), enumvars.toString(), compr.toString(), compr.tmpVariables().get(0),
+					elem.toString(), "1=1" /*elem.ToString() == String.Empty ? "1=1" : elem.tmpVariables[0]*/));
+		}
+		else
+		{
+			m_emitter.AppendLine("% make list");
+			m_emitter.AppendLine(String.format("%s = []", NewTempVariable()));
+
+			for (final Expression expr: listConstructor.elements())
+			{
+				m_emitter.Append(", ");
+
+				final OoaPrologExpression pVal = createExpressionVisitor();
+				expr.Accept(pVal);
+				m_emitter.Append(pVal.toString());
+				assert(pVal.tmpVariables().size() == 1);
+				m_emitter.AppendLine(String.format("ulyssesListConc(%s,[%s],%s)", m_tmpVars.get(0), pVal.tmpVariables().get(0), NewTempVariable()));
+				m_tmpVars.remove(0);
+			}
+		}
+		m_emitter.Append(",");
+		assert(m_tmpVars.size() == 1);
+	}
+
+	@Override
+	public /*override*/ void visit(SetConstructor setConstructor)
+	{
+		m_emitter.AppendLine("% make set");
+		// our resulting set.
+		m_emitter.AppendLine(String.format("%s = []", NewTempVariable()));
+
+		for (final Expression expr: setConstructor.items())
+		{
+			m_emitter.Append(", ");
+
+			final OoaPrologExpression pVal = createExpressionVisitor();
+			expr.Accept(pVal);
+			m_emitter.Append(pVal.toString());
+			assert(pVal.tmpVariables().size() == 1);
+			m_emitter.AppendLine(String.format("ulyssesListConc(%s,[%s],%s)", m_tmpVars.get(0), pVal.tmpVariables().get(0), NewTempVariable()));
+			m_tmpVars.remove(0);
+		}
+		m_emitter.Append(",");
+		assert(m_tmpVars.size() == 1);
+	}
+
+	@Override
+	public /*override*/ void visit(MapConstructor mapConstructor)
+	{
+		throw new NotImplementedException();
+	}
+
+	@Override
+	public /*override*/ void visit(TupleConstructor tupleConstructor)
+	{
+		if (tupleConstructor.isMatcher())
+		{
+			// being dealt with in binaryoperator (since we only allow tuple=MyTuple(a,b))
+			NewTempVariable();
+			return;
+		}
+		else
+		{
+			m_emitter.AppendLine("% make tuple");
+			m_emitter.AppendLine(String.format("%s = []", NewTempVariable()));
+
+			for (final Expression expr: tupleConstructor.values())
+			{
+				m_emitter.Append(", ");
+
+				final OoaPrologExpression pVal = createExpressionVisitor();
+				expr.Accept(pVal);
+				m_emitter.Append(pVal.toString());
+				assert(pVal.tmpVariables().size() == 1);
+				m_emitter.AppendLine(String.format("ulyssesListConc(%s,[%s],%s)", m_tmpVars.get(0), pVal.tmpVariables().get(0), NewTempVariable()));
+				m_tmpVars.remove(0);
+			}
+			m_emitter.Append(",");
+			assert(m_tmpVars.size() == 1);
+		}
+	}
+
+	@Override
+	public /*override*/ void visit(QValConstructor qValConstructor)
+	{
+		final OoaPrologIdentifier pident = createIdentifierVisitor();
+		qValConstructor.type().identifier().Accept(pident);
+		final StringBuilder qVal = new StringBuilder();
+		if (qValConstructor.value() != null || qValConstructor.value().length != 0)
+		{
+			final OoaPrologExpression landmark1 = createExpressionVisitor();
+			qValConstructor.value()[0].Accept(landmark1);
+			qVal.append(landmark1.toString());
+
+			if (qValConstructor.value().length > 1)
+			{
+				final OoaPrologExpression landmark2 = createExpressionVisitor();
+				qValConstructor.value()[1].Accept(landmark2);
+				qVal.append("..");
+				qVal.append(landmark2.toString());
+			}
+		}
+		else
+			qVal.append("_");
+
+		String deriv = "_";
+		switch (qValConstructor.valueDeriv())
+		{
+		case Dec:
+			deriv = "dec";
+			break;
+		case Inc:
+			deriv = "inc";
+			break;
+		case Steady:
+			deriv = "std";
+			break;
+		default:
+			throw new NotImplementedException();
+		}
+		final String tmpVar = NewTempVariable();
+		m_emitter.AppendLine(String.format("%s = (%s:%s/%s),", tmpVar, pident.toString(), qVal.toString(), deriv));
+	}
+
+	@Override
+	public /*override*/ void visit(AccessExpression accessExpression)
+	{
+		if (accessExpression.left().type().kind() != TypeKind.QrType &&
+				accessExpression.left().type().kind() != TypeKind.EnumeratedType &&
+				!(accessExpression.right().kind() == ExpressionKind.Identifier &&
+				((IdentifierExpression)accessExpression.right()).identifier().kind() == IdentifierKind.AttributeIdentifier))
+		{
+			assert(m_tmpVars.size() == 0);
+			// enums and qr types are directly (statically) converted to nums...
+			VisitSub(accessExpression.left(), accessExpression);
+			final String leftresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+
+			VisitSub(accessExpression.right(), accessExpression);
+			final String rightresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+
+			m_tmpVars.add(String.format("%s\\%s", leftresult, rightresult));
+		}
+		else
+			VisitSub(accessExpression.right(), accessExpression);
+	}
+
+	@Override
+	public /*override*/ void visit(BinaryOperator binaryOperator)
+	{
+		final OoasCodeEmitter origEmitter = m_emitter;
+
+
+		// eval stack must be empty
+		assert(m_tmpVars.size() == 0);
+		// traverse left
+		final OoasCodeEmitter leftcode = new OoasCodeEmitter();
+		m_emitter = leftcode;
+		VisitSub(binaryOperator.left(), binaryOperator);
+		final String leftresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+		assert(m_tmpVars.size() == 0);
+		// traverse right
+		final OoasCodeEmitter rightcode = new OoasCodeEmitter();
+		m_emitter = rightcode;
+		VisitSub(binaryOperator.right(), binaryOperator);
+		final String rightresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+		// eval stack must be empty
+		assert(m_tmpVars.size() == 0);
+
+		m_emitter = origEmitter;
+
+		// get tmp.var
+		final String tmpVar = NewTempVariable();
+
+		switch (binaryOperator.kind())
+		{
+		case elemin:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			m_emitter.AppendLine(String.format(" %s = member(%s,%s),",
+					tmpVar, leftresult, rightresult));
+			break;
+		case and:    // T_AND:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			m_emitter.AppendLine(String.format(" %s = (%s %s %s), ",
+					tmpVar, leftresult, ",", rightresult));
+			break;
+		case or:     // T_OR:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			m_emitter.AppendLine(String.format(" %s = (%s %s %s), ",
+					tmpVar, leftresult, ";", rightresult));
+			break;
+
+		case implies:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.AppendLine(String.format(" %s = (%s -> (%s%s); true), ", // {0} = (({1} -> ({2}{3}); true))
+					tmpVar, leftresult, rightcode.toString(), rightresult));
+			break;
+
+		case equal:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			/*check if we have tupleconstructors as matchers*/
+			TupleConstructor matcher = null;
+			String aTuple = null;
+			if (binaryOperator.left().kind() == ExpressionKind.TupleConstr &&
+					((TupleConstructor)binaryOperator.left()).isMatcher())
+			{
+				matcher = (TupleConstructor)binaryOperator.left();
+				aTuple = rightresult;
+			}
+			else if (binaryOperator.right().kind() == ExpressionKind.TupleConstr &&
+					((TupleConstructor)binaryOperator.right()).isMatcher())
+			{
+				matcher = (TupleConstructor)binaryOperator.right();
+				aTuple = leftresult;
+			}
+
+			if (matcher == null)
+				m_emitter.AppendLine(String.format(" %s = (%s %s %s), ",
+				tmpVar, leftresult, OperatorString(binaryOperator, binaryOperator.left().type()), rightresult));
+			else
+			{
+				m_emitter.Append(String.format("%s = unify(%s = [", tmpVar, aTuple));
+				int cntr = 0;
+				for(final Expression x: matcher.values())
+				{
+					if (cntr != 0)
+						m_emitter.Append(", ");
+					else
+						cntr++;
+
+					if (x.kind() != ExpressionKind.Identifier)
+						throw new ArgumentException();
+
+					final IdentifierExpression ident = (IdentifierExpression)x;
+					final OoaPrologIdentifier avisitor = createIdentifierVisitor();
+					ident.Accept(avisitor);
+					m_emitter.Append(avisitor.toString());
+				}
+				m_emitter.AppendLine("]),");
+			}
+			break;
+
+
+
+		case conc:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			m_emitter.AppendLine(String.format("ulyssesListConc(%s,%s,%s),", leftresult, rightresult, tmpVar));
+			break;
+
+		default:
+			m_emitter.Append(leftcode.toString());
+			m_emitter.Append(rightcode.toString());
+			if (binaryOperator.left().type().kind() == TypeKind.QrType)
+				m_emitter.Append("qEval");
+			//m_emitter.Append("(");
+			if (binaryOperator.type().kind() == TypeKind.IntType)
+				m_emitter.AppendLine(String.format(" %s #= (%s %s %s), ",
+						tmpVar, leftresult, OperatorString(binaryOperator, binaryOperator.left().type()), rightresult));
+			else
+				m_emitter.AppendLine(String.format(" %s = (%s %s %s), ",
+						tmpVar, leftresult, OperatorString(binaryOperator, binaryOperator.left().type()), rightresult));
+			//m_emitter.Append(")");
+			break;
+		}
+		assert(m_tmpVars.size() == 1);
+	}
+
+	@Override
+	public /*override*/ void visit(TernaryOperator ternaryOperator)
+	{
+		if (ternaryOperator.kind() == ExpressionKind.conditional)
+		{
+			VisitSub(ternaryOperator.left(), ternaryOperator);
+			final String leftresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+			VisitSub(ternaryOperator.mid(), ternaryOperator);
+			final String midresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+			VisitSub(ternaryOperator.right(), ternaryOperator);
+			final String rightresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+
+			final String varname = NewTempVariable();
+
+			// (cond, expr #= var; #\ (cond), expr #= var)
+			m_emitter.Append("((");
+			m_emitter.Append(leftresult);
+			m_emitter.Append(", unify(");
+			m_emitter.Append(midresult);
+			m_emitter.Append(String.format(" = %s) );( call(\\+(%s)), unify(", varname, leftresult));
+			m_emitter.Append(rightresult);
+			m_emitter.Append(String.format(" = %s) )),", varname));
+		}
+		else if (ternaryOperator.kind() == ExpressionKind.foldRL)
+			throw new NotImplementedException();
+		else if (ternaryOperator.kind() == ExpressionKind.foldLR)
+		{
+			VisitSub(ternaryOperator.mid(), ternaryOperator);
+			final String midresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+			VisitSub(ternaryOperator.right(), ternaryOperator);
+			final String rightresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+
+
+			// make vars unique
+			final int uniqueNumer = GetUniqueNumber();
+			final CallExpression leftcall = (CallExpression)ternaryOperator.left();
+			final IdentifierExpression elemId = (IdentifierExpression)leftcall.arguments().get(leftcall.arguments().size() - 1);
+			elemId.identifier().SetTokenText(String.format("Elem_%s", uniqueNumer));
+			final IdentifierExpression currentResultId = (IdentifierExpression)leftcall.arguments().get(leftcall.arguments().size() - 2);
+			currentResultId.identifier().SetTokenText(String.format("In_%s", uniqueNumer));
+
+			final String elemVarName = GetIdentifierString(elemId.identifier());
+			final String inVarName = GetIdentifierString(currentResultId.identifier());
+
+			m_emitter.Append(String.format("fun_fold(%s,%s,(%s, %s, Out_%s,(",
+					midresult, rightresult, elemVarName, inVarName, uniqueNumer));
+			VisitSub(leftcall, ternaryOperator);
+			final String leftresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+			final String tmpresult = NewTempVariable();
+			m_emitter.Append(String.format(" Out_%s = %s)),%s),", uniqueNumer, leftresult, tmpresult));
+		}
+
+		else
+			throw new NotImplementedException();
+	}
+
+	@Override
+	public /*override*/ void visit(TupleMapAccessExpression tupleMapAccessExpression)
+	{
+		assert(m_tmpVars.size() == 0);
+		VisitSub(tupleMapAccessExpression.child(), tupleMapAccessExpression);
+		final String childresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+
+		VisitSub(tupleMapAccessExpression.argument(), tupleMapAccessExpression);
+		final String accessresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+		assert(m_tmpVars.size() == 0);
+
+		final String tmpresult = NewTempVariable();
+
+		if (!m_LhsExpression)
+		{
+			switch (tupleMapAccessExpression.child().type().kind())
+			{
+			case TupleType:
+				m_emitter.AppendLine(String.format("ulyssesTupleAccess(%s,%s,%s),", childresult, accessresult, tmpresult));
+				break;
+			case MapType:
+				m_emitter.AppendLine(String.format("ulyssesMapAccess(%s,%s,%s),", childresult, accessresult, tmpresult));
+				break;
+			case ListType:
+				m_emitter.AppendLine(String.format("ulyssesListAccess(%s,%s,%s),", childresult, accessresult, tmpresult));
+				break;
+			default:
+				throw new NotImplementedException();
+			}
+			assert(m_tmpVars.size() == 1);
+		}
+		else
+		{
+			/*>>>>> See comment in ooaTypeCheckVisitor on method CheckPlace! <<<<<<<<<*/
+			switch (tupleMapAccessExpression.child().type().kind())
+			{
+			case ListType:
+				boolean isAttribute;
+				isAttribute = tupleMapAccessExpression.child().kind() == ExpressionKind.Identifier &&
+						((IdentifierExpression)tupleMapAccessExpression.child()).identifier().kind() == IdentifierKind.AttributeIdentifier;
+
+				isAttribute = isAttribute || tupleMapAccessExpression.child().kind() == ExpressionKind.Access
+						&& ((AccessExpression)tupleMapAccessExpression.child()).left().kind() == ExpressionKind.Identifier
+						&& ((IdentifierExpression)((AccessExpression)tupleMapAccessExpression.child()).left()).isSelf()
+						&& ((AccessExpression)tupleMapAccessExpression.child()).right().kind() == ExpressionKind.Identifier
+						&& ((IdentifierExpression)((AccessExpression)tupleMapAccessExpression.child()).right()).identifier().kind()
+						== IdentifierKind.AttributeIdentifier;
+
+
+				final String newlist = String.format("RESVAR_%s", m_scratchbook.getNewTmpVarCntrValue());
+
+				m_emitter.AppendLine(String.format("ulyssesListWrite(%s,%s,%s,%s),", childresult, accessresult, tmpresult, newlist));
+
+				if (isAttribute)
+				{ m_emitter.AppendLine(String.format("%s := %s,", childresult, newlist)); }
+				else
+				{ throw new NotImplementedException(); }
+
+				break;
+			default:
+				throw new NotImplementedException();
+			}
+
+
+		}
+	}
+
+
+	@Override
+	public /*override*/ void visit(ForallQuantifier quantifier)
+	{
+		final OoaPrologExpression pExpr = createExpressionVisitor();
+		quantifier.child().Accept(pExpr);
+
+		// TEMPXY = forall(enumerate1([var:type,...]),pred(var..))
+		final StringBuilder Generator = new StringBuilder();
+		final StringBuilder nullGuard = new StringBuilder();
+		int i = 0;
+		for (final Identifier v: quantifier.symbols().symbolList())
+		{
+			final OoaPrologIdentifier ident = createIdentifierVisitor();
+			v.Accept(ident);
+
+			final OoaPrologType identType = createTypeVisitor();
+			v.type().Accept(identType);
+
+			Generator.append(String.format("%s %s: %s", i == 0 ? "" : ",", ident.toString(), identType.toString()));
+			if (v.type().kind() == TypeKind.OoActionSystemType)
+				nullGuard.append(String.format("(%s == null) ; ", ident.toString()));
+			i++;
+		}
+
+		m_emitter.AppendLine(String.format("%s = forall([%s], (%s(%s%s))),",
+				NewTempVariable(), Generator.toString(), nullGuard.toString(), pExpr.toString(), pExpr.tmpVariables().get(0)));
+	}
+
+
+
+	@Override
+	public /*override*/ void visit(ExistsQuantifier quantifier)
+	{
+		final OoaPrologExpression pExpr = createExpressionVisitor();
+		quantifier.child().Accept(pExpr);
+
+		// TEMPXY = exists(enumerate1([var:type,...]),pred(var..))
+		final StringBuilder Generator = new StringBuilder();
+		final StringBuilder nullGuard = new StringBuilder();
+		int i = 0;
+		for (final Identifier v: quantifier.symbols().symbolList())
+		{
+			final OoaPrologIdentifier ident = createIdentifierVisitor();
+			v.Accept(ident);
+
+			final OoaPrologType identType = createTypeVisitor();
+			v.type().Accept(identType);
+
+			Generator.append(String.format("%s %s: %s", i == 0 ? "" : ",", ident.toString(), identType.toString()));
+			if (v.type().kind() == TypeKind.OoActionSystemType)
+				nullGuard.append(String.format("(%s \\= null), ", ident.toString()));
+			i++;
+		}
+
+		m_emitter.AppendLine(String.format("%s = exists([%s], (%s(%s%s))),",
+				NewTempVariable(), Generator.toString(), nullGuard.toString(), pExpr.toString(), pExpr.tmpVariables().get(0)));
+	}
+	@Override
+	public /*override*/ void visit(UnaryOperator unaryOperator)
+	{
+		assert(m_tmpVars.size() == 0);
+		VisitSub(unaryOperator.child(), unaryOperator);
+
+		if (unaryOperator.kind() == ExpressionKind.Cast)
+			return;
+
+		final String childresult = m_tmpVars.get(0); m_tmpVars.remove(0);
+		assert(m_tmpVars.size() == 0);
+
+		final String tmpresult = NewTempVariable();
+
+		switch (unaryOperator.kind())
+		{
+		case head:
+			m_emitter.AppendLine(String.format("ulyssesListHead(%s,%s),", childresult, tmpresult));
+			break;
+
+		case tail:
+			m_emitter.AppendLine(String.format("ulyssesListTail(%s,%s),", childresult, tmpresult));
+			break;
+
+		case len:    // T_LEN:
+			m_emitter.AppendLine(String.format("ulyssesListLength(%s,%s),", childresult, tmpresult));
+			break;
+
+		case not:
+
+			if (unaryOperator.type().kind() == TypeKind.IntType)
+				m_emitter.Append(String.format(" %s #= call(\\+", tmpresult));
+			else
+				m_emitter.Append(String.format(" %s = call(\\+", tmpresult));
+			m_emitter.Append("(");
+			m_emitter.Append(childresult);
+			m_emitter.AppendLine(")),");
+
+
+			break;
+
+		case Cast:
+			// todo
+			break;
+
+		default:
+			if (unaryOperator.type().kind() == TypeKind.IntType)
+				m_emitter.Append(String.format(" %s #= (%s", tmpresult, OperatorString(unaryOperator, unaryOperator.child().type())));
+			else
+				m_emitter.Append(String.format(" %s = (%s", tmpresult, OperatorString(unaryOperator, unaryOperator.child().type())));
+			m_emitter.Append("(");
+			m_emitter.Append(childresult);
+			m_emitter.AppendLine(")),");
+			break;
+		}
+		assert(m_tmpVars.size() == 1);
+	}
+
+	@Override
+	public /*override*/ String toString()
+	{
+		return m_emitter.toString();
+	}
+
+	protected OoaPrologType createTypeVisitor() { return m_typeFactory.create(m_idFactory, m_scratchbook); }
+	protected OoaPrologIdentifier createIdentifierVisitor() { return m_idFactory.create(); }
+	protected OoaPrologExpression createExpressionVisitor() { return m_exprFactory.create(m_idFactory, m_typeFactory, m_scratchbook); }
+
+	protected final OoaPrologIdentifier.Factory m_idFactory;
+	protected final OoaPrologType.Factory m_typeFactory;
+	protected final OoaPrologExpression.Factory m_exprFactory;
+
+	protected OoaPrologExpression(
+			OoaPrologIdentifier.Factory idFactory,
+			OoaPrologType.Factory typeFactory,
+			Scratchbook scratchbook,
+			OoaPrologExpression.Factory expressionFactory)
+	{
+		this(idFactory, typeFactory, scratchbook, expressionFactory, false);
+	}
+
+	protected OoaPrologExpression(
+			OoaPrologIdentifier.Factory idFactory,
+			OoaPrologType.Factory typeFactory,
+			Scratchbook scratchbook,
+			OoaPrologExpression.Factory expressionFactory,
+			boolean isLHS)
+	{
+		super();
+		m_LhsExpression = isLHS;
+		m_idFactory = idFactory;
+		m_typeFactory = typeFactory;
+		m_exprFactory = expressionFactory;
+		m_scratchbook = scratchbook;
+	}
+
+
+	public String NewTempVariable()
+	{
+		final String result = String.format("TMPVAR_%s", m_scratchbook.getNewTmpVarCntrValue());
+		m_tmpVars.add(result);
+		return result;
+	}
+
+	public int GetUniqueNumber()
+	{
+		return m_scratchbook.getNewTmpVarCntrValue();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologVisitor.java	(revision 2)
@@ -0,0 +1,496 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.prolog;
+
+import java.util.ArrayList;
+import java.util.Date;
+
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.FunctionType.FunctionTypeEnum;
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.OoasCompilerHashMap;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+public class OoaPrologVisitor extends OoaCompleteAstTraversalVisitor
+{
+	protected OoasCodeEmitter m_emitter;
+	protected final Scratchbook m_scratchbook = new Scratchbook();
+
+//	private String PrologIdentifier(Identifier id)
+//	{
+//		OoaPrologIdentifier identifierVisitor = m_idFactory.create();
+//		id.Accept(identifierVisitor);
+//		return identifierVisitor.toString();
+//	}
+
+	protected void ExportMethodsAndActions(MainModule mainModule)
+	{
+		final StringBuilder varActions = new StringBuilder();
+		m_emitter.AppendLine();
+		m_emitter.AppendLine("% action system");
+		m_emitter.AppendLineIncIndent("as :- ");
+
+		/* export methods */
+		m_emitter.AppendLine("methods (");
+		ExportMethods(mainModule);
+		m_emitter.AppendLine("), ");
+		m_emitter.AppendLine("actions (");
+		ExportNamedActions(mainModule, varActions);
+		m_emitter.AppendLine("), ");
+		m_emitter.AppendLine("dood (");
+
+		ExportDoOdBlock(mainModule.instance().doOdBlock(), m_emitter);
+
+
+		m_emitter.AppendLine("), qdes (none)");
+		m_emitter.DecIndent();
+		m_emitter.AppendLine(".");
+		m_emitter.AppendLine("");
+
+		m_emitter.Append(varActions.toString());
+	}
+
+	private void ExportMethods(MainModule mainModule)
+	{
+		int y = 0;
+		for (final Identifier x: mainModule.instance().symbols().symbolList())
+		{
+			if (x.kind() == IdentifierKind.MethodIdentifier)
+			{
+				if (y != 0)
+					m_emitter.AppendLine(", ");
+				else
+					y++;
+
+				final MethodIdentifier theMethod = (MethodIdentifier)x;
+				final OoaPrologIdentifier pIdent = m_idFactory.create();
+				theMethod.Accept(pIdent);
+
+				/* method */
+				final StringBuilder parameter = new StringBuilder();
+				if (theMethod.parameter().size() > 0 || ((FunctionType)theMethod.type()).returnType() != null)
+				{
+					parameter.append("(");
+					int z = 0;
+					for (final ParameterIdentifier param: theMethod.parameter())
+					{
+						if (z != 0)
+						{
+							parameter.append(", ");
+						}
+						else
+							z++;
+						final OoaPrologIdentifier pParamIdent = m_idFactory.create();
+						param.Accept(pParamIdent);
+						parameter.append(pParamIdent.toString());
+					}
+
+
+					if (((FunctionType)theMethod.type()).returnType() != null)
+					{
+						if (z != 0)
+							parameter.append(", ");
+						parameter.append("RESULT");
+					}
+					parameter.append(")");
+				}
+				m_emitter.AppendLineIncIndent(String.format("%s%s = (", pIdent.toString(), parameter.toString()));
+
+				final OoaPrologStatement pBody = createStatementVisitor();
+				((MethodIdentifier)x).body().Accept(pBody);
+				m_emitter.Append(pBody.toString());
+				m_emitter.Append(")");
+				m_emitter.DecIndent();
+			}
+		}
+		if (y == 0)
+			m_emitter.Append(" none ");
+	}
+
+	private void ExportNamedActions(MainModule mainModule, StringBuilder varActions)
+	{
+		int y = 0;
+		for (final Identifier x: mainModule.instance().symbols().symbolList())
+		{
+			if (x.kind() == IdentifierKind.NamedActionIdentifier)
+			{
+				if (y != 0)
+					m_emitter.AppendLine(", ");
+				else
+					y++;
+				final NamedActionIdentifier action = (NamedActionIdentifier)x;
+				final OoaPrologIdentifier pIdent = m_idFactory.create();
+				action.Accept(pIdent);
+
+				if (((FunctionType)action.type()).functionType() != FunctionTypeEnum.Continuous)
+				{
+					/* discrete actions */
+					final StringBuilder parameter = new StringBuilder();
+					final StringBuilder parametertype = new StringBuilder();
+					if (action.parameter().size() > 0)
+					{
+						parameter.append("(");
+						parametertype.append("(");
+						int z = 0;
+						for (final ParameterIdentifier param: action.parameter())
+						{
+							if (z != 0)
+							{
+								parameter.append(", ");
+								parametertype.append(", ");
+							}
+							else
+								z++;
+							final OoaPrologIdentifier pParamIdent = m_idFactory.create();
+							param.Accept(pParamIdent);
+							parameter.append(pParamIdent.toString());
+
+							final OoaPrologType pParamType = createTypeVisitor();  // bugfix me!
+							param.type().Accept(pParamType);
+							parametertype.append(pParamType.toString());
+
+						}
+						parametertype.append(")");
+						parameter.append(")");
+					}
+					//if (parametertype.Length > 0)
+					//    varActions.AppendLine(String.format("%s%s.", pIdent.toString(), parametertype.toString()));
+					m_emitter.AppendLineIncIndent(String.format("%s%s::", pIdent.toString(), parameter.toString()));
+				}
+				else
+				{
+					// we do not support continuous actions anymore.
+					throw new UnsupportedOperationException();
+//					/* observable state vars outside... */
+//					final StringBuilder parameter = new StringBuilder();
+//					int z = 0;
+//					for (final Statement stmt : ((GuardedCommand)action.body().statements().peekFirst()).body().statements())
+//					{
+//						final QualitativeConstraintStatement qstmt = (QualitativeConstraintStatement)stmt;
+//						if (qstmt.operation() == QualitativeConstraintOperation.Equal
+//								&& qstmt.variable1().kind() == IdentifierKind.AttributeIdentifier
+//								&& ((AttributeIdentifier)qstmt.variable1()).isObservable())
+//						{
+//							if (z != 0)
+//								parameter.append(", ");
+//							else
+//								z++;
+//							qstmt.tag = true;
+//							final OoaPrologIdentifier pParamIdent1 = m_idFactory.create();
+//							final OoaPrologIdentifier pParamIdent2 = m_idFactory.create();
+//							qstmt.variable0().Accept(pParamIdent1);
+//							qstmt.variable1().Accept(pParamIdent2);
+//							parameter.append(String.format("%s(%s)", pParamIdent2.toString(), pParamIdent1.toString()));
+//						}
+//					}
+//					m_emitter.AppendLineIncIndent(String.format("[%s]::", parameter.toString()));
+				}
+
+				final OoaPrologStatement pBody = createStatementVisitor();
+				((NamedActionIdentifier)x).body().Accept(pBody);
+				m_emitter.Append(pBody.toString());
+				m_emitter.DecIndent();
+
+			}
+		}
+	}
+
+	private void ExportDoOdBlock(Block block, OoasCodeEmitter m_emitter)
+	{
+		final OoaPrologStatement statement = createStatementVisitor();
+		block.Accept(statement);
+		m_emitter.Append(statement.toString());
+	}
+
+	protected int ExportActions(MainModule mainModule, String predName, FunctionTypeEnum actionKind)
+	{
+		m_emitter.AppendLine("");
+		m_emitter.AppendLine("%emit " + actionKind.toString() + " actions");
+		m_emitter.Append(predName + "([");
+		int y = 0;
+		for (final Identifier x: mainModule.instance().symbols().symbolList())
+		{
+			if (x.kind() == IdentifierKind.NamedActionIdentifier)
+			{
+				if (((FunctionType)((NamedActionIdentifier)x).type()).functionType() == actionKind)
+				{
+					if (y != 0)
+						m_emitter.Append(", ");
+					else
+						y++;
+					final OoaPrologIdentifier pIdent = m_idFactory.create();
+
+					((NamedActionIdentifier)x).Accept(pIdent);
+					m_emitter.Append(pIdent.toString());
+				}
+			}
+		}
+		m_emitter.AppendLine("]).");
+		return y;
+	}
+
+	protected int ExportControllableActions(MainModule mainModule) {
+		return ExportActions(mainModule, "input", FunctionTypeEnum.Controllable);
+	}
+
+	protected int ExportObservableActions(MainModule mainModule) {
+		return ExportActions(mainModule, "output", FunctionTypeEnum.Observable);
+	}
+
+	protected void ExportInitialState(MainModule mainModule)
+	{
+		m_emitter.AppendLine("");
+		m_emitter.AppendLine("%emit initial state");
+		final ArrayList<String> initPreds = new ArrayList<String>();
+		final ArrayList<String> initVars = new ArrayList<String>();
+		int y = 0;
+		for (final Identifier x: mainModule.instance().symbols().symbolList())
+		{
+			if (x.kind() == IdentifierKind.AttributeIdentifier)
+			{
+				final OoaPrologExpression anExprVis = createExpressionVisitor();
+				((AttributeIdentifier)x).initializer().Accept(anExprVis);
+				assert(anExprVis.tmpVariables().size() == 1);
+				final String initPredName = String.format("attr_%s_init(%s)", x.tokenText(), anExprVis.tmpVariables().get(0));
+				m_emitter.AppendLine(String.format("%s :- %s 1=1.", initPredName, anExprVis.toString()));
+				initPreds.add(initPredName);
+				initVars.add(anExprVis.tmpVariables().get(0));
+			}
+		}
+
+
+		m_emitter.Append("init([");
+		y = 0;
+		for (final String x: initVars)
+		{
+			if (y != 0)
+				m_emitter.Append(",");
+			else
+				y++;
+			m_emitter.Append(x);
+		}
+		m_emitter.Append("]) :-");
+		y = 0;
+		for (final String x: initPreds)
+		{
+			if (y != 0)
+				m_emitter.Append(",");
+			else
+				y++;
+			m_emitter.Append(x);
+		}
+		m_emitter.AppendLine(".");
+	}
+
+	protected int ExportState(MainModule mainModule)
+	{
+		m_emitter.AppendLine("");
+		m_emitter.AppendLine("%emit state definition");
+		m_emitter.Append("state_def([");
+		int y = 0;
+		for (final Identifier x: mainModule.instance().symbols().symbolList())
+		{
+			if (x.kind() == IdentifierKind.AttributeIdentifier)
+			{
+				if (y != 0)
+					m_emitter.Append(", ");
+				else
+					y++;
+				final OoaPrologIdentifier pid = m_idFactory.create();
+				x.Accept(pid);
+				m_emitter.Append(pid.toString());
+			}
+		}
+		m_emitter.AppendLine("]).");
+		return y;
+	}
+
+	protected void ExportVariables(MainModule mainModule)
+	{
+		m_emitter.AppendLine("");
+		m_emitter.AppendLine("%emit type of state variables");
+		final OoasCompilerHashMap<String, StringBuilder> varlist = new OoasCompilerHashMap<String, StringBuilder>();
+		for (final Identifier x: mainModule.instance().symbols().symbolList())
+		{
+			if (x.kind() == IdentifierKind.AttributeIdentifier)
+			{
+				final OoaPrologIdentifier pid = m_idFactory.create();
+				final OoaPrologType ptype = createTypeVisitor();
+				x.Accept(pid);
+				x.type().Accept(ptype);
+
+				final String key = x.type().kind() != TypeKind.QrType ? ptype.toString() : "qvar";
+				if (varlist.containsKey(key))
+				{
+					varlist.get(key).append(String.format(", %s", pid.toString()));
+				}
+				else
+				{
+					varlist.putSafe(key, new StringBuilder(String.format("[%s", pid.toString())));
+				}
+			}
+		}
+		for (final String key: varlist.keySet())
+			m_emitter.AppendLine(String.format("var(%s], %s).", varlist.get(key), key));
+	}
+
+	protected void ExportTypes(MainModule mainModule)
+	{
+		for (final Identifier x: mainModule.symbolTable().symbolList())
+		{
+			if (x.kind() == IdentifierKind.TypeIdentifier)
+				OoaPrologType.EmitType(((TypeIdentifier)x).type(), m_idFactory, m_scratchbook);
+		}
+	}
+
+
+	@Override
+	public /*override*/ void visit(MainModule mainModule)
+	{
+		m_emitter.AppendLine("% OOAS Compiler Generated");
+//		m_emitter.AppendLine(String.format("%%%s", Mogentes.Program.GetProgramVersion().toString().Replace(Environment.NewLine, Environment.NewLine + "%")));
+		m_emitter.AppendLine("% Code-Gen Version: 0.2");
+		m_emitter.Append("%        Generated: "); m_emitter.AppendLine(new Date().toString());
+		m_emitter.AppendLine("%------------------------------------------------------------------------");
+		m_emitter.AppendLine("");
+		m_emitter.AppendLine(String.format(":- module(%s, [var/2, input/1, searchDepth/1, qspace/2]).", m_nameSpace));
+		m_emitter.AppendLine(":- use_module(library(file_systems)).");
+		m_emitter.AppendLine(":- use_module(library(process)).");
+		m_emitter.AppendLine(":- use_module(library(clpfd)).");
+		m_emitter.AppendLine(":- use_module(library(clpb)).");
+		m_emitter.AppendLine(":- use_module(library(lists)).");
+		m_emitter.AppendLine(":- use_module(library(avl)).");
+		m_emitter.AppendLine(":- use_module(library(ordsets)).");
+		m_emitter.AppendLine(":- use_module(library(system)).");
+		m_emitter.AppendLine("% :- use_module(library(gauge)). % this is a debug lib not supported on Win.");
+		m_emitter.AppendLine(":- use_module(library(terms)).");
+		m_emitter.AppendLine(":- use_module(library(sets)).");
+		m_emitter.AppendLine(":- use_module(library(random)).");
+
+		m_emitter.AppendLine(":- use_module(ulysseslib, _, [ulyssesListHead/2, ulyssesListLength/2, ulyssesListTail/2, ulyssesListConc/3, ulyssesTupleAccess/3, ulyssesListAccess/3, ulyssesListWrite/4, ulyssesMapAccess/3]).");
+
+		m_emitter.AppendLine(":- public(as/0).");
+		m_emitter.AppendLine(":- dynamic(as/0).");
+		m_emitter.AppendLine(":- dynamic(qstate_init/1).");
+		m_emitter.AppendLine(":- dynamic(qstate_constraints/1).");
+		m_emitter.AppendLine(":- public(qstate_init/1).");
+		m_emitter.AppendLine(":- public(qstate_constraints/1).");
+
+		/*definition of search depth*/
+		m_emitter.AppendLine("");
+		m_emitter.AppendLine("% maximal search depth (change at will)");
+		// FIXME: HACK
+		m_emitter.AppendLine(String.format("searchDepth(%s).", m_maxSearchDepth));
+		m_emitter.AppendLine("");
+
+		/*definition of types*/
+		ExportTypes(mainModule);
+		/* variable definition */
+		ExportVariables(mainModule);
+
+		/* state definition */
+		ExportState(mainModule);
+		/* initial state */
+		ExportInitialState(mainModule);
+		/* input actions (controllables) */
+		ExportControllableActions(mainModule);
+		/* output actions (observables) */
+		ExportObservableActions(mainModule);
+		/* named actions */
+		ExportMethodsAndActions(mainModule);
+
+		/* all types */
+		m_emitter.AppendLine("%definition of types");
+		m_emitter.AppendLine(m_scratchbook.typeDefinitions().toString());
+		m_emitter.AppendLine(createTypeVisitor().GetInternalTypeDefinitions());
+
+		for(final String line: m_ParserState.mappingInformation)
+			m_emitter.AppendLine("% " + line);
+	}
+
+
+	@Override
+	public /*override*/ String toString()
+	{
+		return m_emitter.toString();
+	}
+
+	protected OoaPrologIdentifier createIdentifierVisitor() { return m_idFactory.create(); }
+	protected OoaPrologType createTypeVisitor() { return m_typeFactory.create(m_idFactory, m_scratchbook); }
+	protected OoaPrologExpression createExpressionVisitor() { return m_exprFactory.create(m_idFactory, m_typeFactory, m_scratchbook); }
+	protected OoaPrologStatement createStatementVisitor() { return m_stmtFactory.create(m_exprFactory, m_idFactory, m_typeFactory, m_scratchbook); }
+	protected final String m_nameSpace;
+	protected final int m_maxSearchDepth;
+
+
+	private final  OoaPrologExpression.Factory m_exprFactory;
+	private final OoaPrologIdentifier.Factory m_idFactory;
+	private final OoaPrologStatement.Factory m_stmtFactory;
+	private final OoaPrologType.Factory m_typeFactory;
+
+	protected OoaPrologVisitor(
+			ParserState aState,
+			int maxSearchDepth,
+			String nameSpace,
+			OoaPrologExpression.Factory exprFactory,
+			OoaPrologIdentifier.Factory idFactory,
+			OoaPrologStatement.Factory  stmtFactory,
+			OoaPrologType.Factory       tpeFactory)
+	{
+		super(aState);
+		m_maxSearchDepth = maxSearchDepth;
+		m_nameSpace = nameSpace;
+		m_emitter = new OoasCodeEmitter();
+		m_exprFactory = exprFactory;
+		m_idFactory = idFactory;
+		m_stmtFactory = stmtFactory;
+		m_typeFactory = tpeFactory;
+	}
+
+	public OoaPrologVisitor(ParserState aState, int maxSearchDepth, String nameSpace) {
+		this(
+				aState,
+				maxSearchDepth,
+				nameSpace,
+				new OoaPrologExpression.Factory(),
+				new OoaPrologIdentifier.Factory(),
+				new OoaPrologStatement.Factory(),
+				new OoaPrologType.Factory());
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicType.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicType.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prologsymbolic/OoaPrologSymbolicType.java	(revision 2)
@@ -0,0 +1,59 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.codegen.prologsymbolic;
+
+import org.momut.ooas.codegen.OoasCodeEmitter;
+import org.momut.ooas.codegen.prolog.OoaPrologIdentifier;
+import org.momut.ooas.codegen.prolog.OoaPrologType;
+import org.momut.ooas.codegen.prolog.Scratchbook;
+
+class OoaPrologSymbolicType extends OoaPrologType
+{
+	public static class Factory extends OoaPrologType.Factory
+	{
+		@Override
+		public OoaPrologType create(OoaPrologIdentifier.Factory idFactory, Scratchbook scratchbook)
+		{ return new OoaPrologSymbolicType(idFactory, scratchbook); }
+	}
+
+	@Override
+	public String GetInternalTypeDefinitions()
+	{
+		final OoasCodeEmitter result = new OoasCodeEmitter();
+
+		result.AppendLine("type(bool, X) :- member(X, [true, false]).");
+		result.AppendLine("type(char, X) :- X in 0..255, labeling([],[X]).");
+
+		return result.toString();
+	}
+
+	private OoaPrologSymbolicType(OoaPrologIdentifier.Factory idFactory, Scratchbook scratchbook)
+	{
+		super(idFactory, scratchbook);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/math/DoubleRange.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/math/DoubleRange.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/math/DoubleRange.java	(revision 2)
@@ -0,0 +1,44 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.math;
+
+public final class DoubleRange extends Range<Double>
+{
+	private final static class DoubleRangeFactory implements RangeConstructor<Double> {
+		@Override
+		public Range<Double> create(Double max, Double min) {
+			return new DoubleRange(max,min);
+		}
+	}
+
+	public DoubleRange(double max, double min)
+	{
+		super(max, min, Double.MIN_VALUE, Double.MAX_VALUE, Double.MIN_VALUE, new DoubleRangeFactory());
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/math/Range.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/math/Range.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/math/Range.java	(revision 2)
@@ -0,0 +1,54 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.math;
+
+public class Range<T> extends AbstractRange
+{
+	protected RangeConstructor<T> m_constructor;
+
+	public T max;
+	public T min;
+	public T precision;
+	public T typemax;
+	public T typemin;
+
+	public Range<T> Create(T amax, T amin)
+	{
+		return m_constructor.create(amax, amin);
+	}
+
+	public Range(T amax, T amin, T aprecision, T atypemax, T atypemin, RangeConstructor<T> aconstr)
+	{
+		max = amax;
+		min = amin;
+		precision = aprecision;
+		typemax = atypemax;
+		typemin = atypemin;
+		m_constructor = aconstr;
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/CompilerMessage.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/CompilerMessage.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/CompilerMessage.java	(revision 2)
@@ -0,0 +1,59 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.parser;
+
+import org.antlr.runtime.Token;
+
+public class CompilerMessage
+{
+	private final String m_file;
+	private final int m_line;
+	private final int m_column;
+	private final String m_message;
+
+	public CompilerMessage(String aFile, int aLine, int aColumn, String aMessage)
+	{
+		m_file = aFile;
+		m_line = aLine;
+		m_column = aColumn;
+		m_message = aMessage;
+	}
+
+	public CompilerMessage(String aFile, Token aSymbol, String aMessage)
+	{
+		m_file = aFile;
+		m_line = aSymbol.getLine();
+		m_column = aSymbol.getCharPositionInLine();
+		m_message = aMessage;
+	}
+
+	public String file() { return m_file; }
+	public int line() { return m_line; }
+	public int column() { return m_column; }
+	public String message() { return m_message; }
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserWarning.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserWarning.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ParserWarning.java	(revision 2)
@@ -0,0 +1,43 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.parser;
+
+import org.antlr.runtime.Token;
+
+public class ParserWarning extends CompilerMessage
+{
+	public ParserWarning(String aFile, int aLine, int aColumn, String aMessage)
+	{
+		super (aFile, aLine, aColumn, aMessage);
+	}
+
+	public ParserWarning(String aFile, Token aSymbol, String aMessage)
+	{
+		super (aFile, aSymbol, aMessage);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooaCustomParser.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooaCustomParser.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooaCustomParser.java	(revision 2)
@@ -0,0 +1,2017 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.parser;
+
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.antlr.runtime.MismatchedTokenException;
+import org.antlr.runtime.Parser;
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.RecognizerSharedState;
+import org.antlr.runtime.Token;
+import org.antlr.runtime.TokenStream;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.expressions.AccessExpression;
+import org.momut.ooas.ast.expressions.BinaryOperator;
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.ExistsQuantifier;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.ExpressionKind;
+import org.momut.ooas.ast.expressions.ForallQuantifier;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.expressions.LeafExpression;
+import org.momut.ooas.ast.expressions.ListConstructor;
+import org.momut.ooas.ast.expressions.MapConstructor;
+import org.momut.ooas.ast.expressions.ObjectConstructor;
+import org.momut.ooas.ast.expressions.QValConstructor;
+import org.momut.ooas.ast.expressions.Quantifier;
+import org.momut.ooas.ast.expressions.SetConstructor;
+import org.momut.ooas.ast.expressions.TernaryOperator;
+import org.momut.ooas.ast.expressions.TupleConstructor;
+import org.momut.ooas.ast.expressions.TupleMapAccessExpression;
+import org.momut.ooas.ast.expressions.UnaryOperator;
+import org.momut.ooas.ast.expressions.UnresolvedIdentifierExpression;
+import org.momut.ooas.ast.expressions.ValueExpression;
+import org.momut.ooas.ast.expressions.QValConstructor.QValDeriv;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.ConstantIdentifier;
+import org.momut.ooas.ast.identifiers.EnumIdentifier;
+import org.momut.ooas.ast.identifiers.ExpressionVariableIdentifier;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.IdentifierList;
+import org.momut.ooas.ast.identifiers.LandmarkIdentifier;
+import org.momut.ooas.ast.identifiers.LocalVariableIdentifier;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.identifiers.SelfTypeIdentifier;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.statements.AbortStatement;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.ast.statements.BreakStatement;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.KillStatement;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.QualitativeConstraintStatement;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.SkipStatement;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.statements.QualitativeConstraintStatement.QualitativeConstraintOperation;
+import org.momut.ooas.ast.types.AnyType;
+import org.momut.ooas.ast.types.BoolType;
+import org.momut.ooas.ast.types.CharType;
+import org.momut.ooas.ast.types.EnumType;
+import org.momut.ooas.ast.types.FloatType;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.IntType;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.OpaqueType;
+import org.momut.ooas.ast.types.QrType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.ast.types.ValuedEnumType;
+import org.momut.ooas.ast.types.FunctionType.FunctionTypeEnum;
+import org.momut.ooas.utils.exceptions.ArgumentException;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.visitors.OoaResolveExpressionsVisitor;
+
+public class ooaCustomParser extends Parser
+{
+	public ParserState pState;
+
+
+	public boolean IsRightToLeft(ExpressionKind type)
+	{
+		return type == ExpressionKind.implies; // implication has right grouping
+	}
+
+	public int GetOperatorPrecedence(ExpressionKind type)
+	{
+		switch (type)
+		{
+		/*Family of Evaluators*/
+
+		case abs:    // T_ABS:
+		case card:   // T_CARD:
+		case dom:    // T_DOM:
+		case range:  // T_RNG:
+		case merge:  // T_MERGE:
+		case len:    // T_LEN:
+		case elems:  // T_ELEMS:
+		case head:   // T_HEAD:
+		case tail:   // T_TAIL:
+		case conc:   // T_CONC:
+		case inds:   // T_INDS:
+		case dinter: // T_DINTER:
+		case dunion: // T_DUNION:
+			return 1;
+
+		case domresby:   // T_DOMRESBY:
+		case domresto:   // T_DOMRESTO:
+		case rngresby:   // T_RNGRESBY:
+		case rngresto:   // T_RNGRESTO:
+			return 2;
+
+		case div:    // T_DIV:
+		case idiv:   // T_IDIV:
+		case mod:    // T_MOD:
+		case prod:   // T_PROD:
+		case inter:  // T_INTER:
+			return 3;
+
+		case sum:    // T_SUM:
+		case minus:  // T_MINUS:
+		case union:  // T_UNION:
+		case diff:   // T_DIFF:
+		case munion: // T_MUNION:
+		case seqmod_mapoverride: // T_SEQMOD_MAPOVERRIDE:
+			return 4;
+
+			/*Family of Relations*/
+
+		case less:
+		case lessequal:
+		case greater:
+		case greaterequal:
+		case equal:
+		case notequal:
+		case subset:
+		case elemin:
+		case notelemin:
+			return 5;
+
+			/*Family of Connectives*/
+
+		case and:    // T_AND:
+			return 6;
+
+		case or:     // T_OR:
+			return 7;
+
+		case implies:    // T_IMPLIES:
+			return 8;
+
+		case biimplies:  // T_BIIMPLIES:
+			return 9;
+
+		default:
+			throw new NotImplementedException("operator not supported: " + type.toString());
+			// return 0;
+		}
+	}
+
+	/*taken from antlr homepage:
+     http://www.antlr.org/wiki/display/ANTLR3/Operator+precedence+parser
+	 */
+	int findPivot(List<BinaryOperator> operators, int startIndex, int stopIndex)
+	{
+		int pivot = startIndex;
+		final BinaryOperator binop = operators.get(pivot);
+		int pivotRank = GetOperatorPrecedence(binop.kind());
+		for (int i = startIndex + 1; i <= stopIndex; i++)
+		{
+			final ExpressionKind type = operators.get(i).kind();
+			final int current = GetOperatorPrecedence(type);
+			final boolean rtl = IsRightToLeft(type);
+			if (current > pivotRank || (current == pivotRank && rtl))
+			{
+				pivot = i;
+				pivotRank = current;
+			}
+		}
+		return pivot;
+	}
+
+	Expression createPrecedenceTree(
+			List<Expression> expressions,
+			List<BinaryOperator> operators,
+			int startIndex,
+			int stopIndex)
+	{
+		if (stopIndex == startIndex)
+			return expressions.get(startIndex);
+
+		final int pivot = findPivot(operators, startIndex, stopIndex - 1);
+
+		final BinaryOperator result = operators.get(pivot);
+		result.SetLeftChild(createPrecedenceTree(expressions, operators, startIndex, pivot));
+		result.SetRightChild(createPrecedenceTree(expressions, operators, pivot + 1, stopIndex));
+		return result;
+	}
+
+	Expression createPrecedenceTree(List<Expression> expressions, List<BinaryOperator> operators)
+	{
+		return createPrecedenceTree(expressions, operators, 0, expressions.size() - 1);
+	}
+
+
+	/* add error message to state. */
+	private void doError(Token aToken, String aMessage)
+	{
+		pState.AddErrorMessage(
+				new ParserError(pState.filename, aToken, aMessage));
+	}
+
+	/* add warning message to state */
+	private void doWarning(Token id1, String p)
+	{
+		pState.AddWarningMessage(new ParserWarning(pState.filename, id1, p));
+	}
+
+	private void doError(String aMessage)
+	{
+		pState.AddErrorMessage(
+				new ParserError(pState.filename, 0, 0, aMessage));
+	}
+
+	/* init global state */
+	 void initializeTopLevelParserState()
+	{
+		pState.ooaSystem = new MainModule();
+		pState.PushResolveStack(pState.ooaSystem);
+	}
+
+
+	private IScope GetScope()
+	{
+		return pState.currentScope;
+	}
+
+
+	/*create a named constant*/
+	 void addNamedConst(Token aName, Expression anExpr)
+	{
+		if (pState.currentScope.ResolveIdentifier(aName.getText()) == null)
+		{
+			/* needs to be a constant... */
+			final ConstantIdentifier aConst = new ConstantIdentifier(aName, anExpr, GetScope());
+
+			final OoaResolveExpressionsVisitor resolver = new OoaResolveExpressionsVisitor(pState);
+			aConst.Accept(resolver);
+
+			if (aConst.Value() == null || aConst.Value().type() == null || aConst.Value().kind() != ExpressionKind.Value)
+			{
+				doError(aName, String.format("%s not a constant!", aName.getText()));
+			}
+			else
+			{
+				aConst.SetType(aConst.Value().type());
+				pState.currentScope.AddIdentifier(aConst, null);
+			}
+		}
+		else
+			doError(aName, String.format("%s already defined!", aName.getText()));
+	}
+
+
+
+	/* create a named type; we're on top-level here */
+	 void createNamedType(Token aName, UlyssesType aType)
+	{
+		// precond..
+		assert(aName != null);
+
+		if (aType == null)
+		{
+			doError(aName, String.format("%s lacks a type! (Type not added)", aName.getText()));
+			return;
+		}
+
+
+		if (pState.currentScope.ResolveIdentifier(aName.getText()) == null)
+		{
+			final TypeIdentifier newid = new TypeIdentifier(aName, aType, GetScope());
+			aType.SetTypeIdentifier(newid);
+			pState.currentScope.AddIdentifier(newid, null);
+		}
+		else
+			doError(aName, String.format("%s already defined!", aName.getText()));
+
+	}
+
+	/* create basic structure for an ooa-system descr. resolve stack TOS is now ooa-system symbols */
+	OoActionSystemType createOoaType(Token refinesSystemName, boolean autoCons)
+	{
+		final Identifier refinedSystem = pState.Lookup(refinesSystemName);
+		OoActionSystemType refinedSystemType = null;
+		if ((refinedSystem != null) && (refinedSystem.type() != null))
+		{
+			if (refinedSystem.type().kind() != TypeKind.OoActionSystemType)
+				doError(refinesSystemName,
+						String.format("%s not an object oriented action system", refinesSystemName.getText()));
+			else
+				refinedSystemType = (OoActionSystemType)refinedSystem.type();
+		}
+		else if (refinesSystemName != null)
+		{
+			pState.AddErrorMessage(
+					new ParserError(pState.filename, refinesSystemName,
+							String.format("Type that's being refined (%s) not found!", refinesSystemName.getText())));
+		}
+
+		final OoActionSystemType result = new OoActionSystemType(autoCons, refinedSystemType, null);
+
+		// add 'self' to the symbols.. (self is a keyword, so it can't be defined)
+		result.AddIdentifier(new SelfTypeIdentifier("self", result, GetScope()), null);
+
+		pState.PushResolveStack(result);
+		return result;
+	}
+
+	/* remove ooa-system symbols from resolve stack TOS */
+	void fixupOoaType(OoActionSystemType aTypeSymbol)
+	{
+		if (aTypeSymbol == null)
+			return;
+
+		aTypeSymbol.SetupAnonymousName();
+		if (aTypeSymbol != null)
+			pState.PopResolveStack();
+	}
+
+	Expression addCastExpression(Expression e, Token cid)
+	{
+		assert(e != null);
+
+		final Expression result = new UnaryOperator(ExpressionKind.Cast, e, cid.getLine(), cid.getCharPositionInLine());
+		result.SetType(new OpaqueType(new TypeIdentifier(cid, null, GetScope())));
+		pState.typesToFixUp.add((OpaqueType)result.type());
+		return result;
+	}
+
+
+	/* add a new ooa to the list describing the composition of action systems */
+	 void addToIdentifierList(IdentifierList top, Token aName)
+	{
+		assert(top != null);
+
+		final Identifier aSym = pState.Lookup(aName);
+		if (aSym == null)
+		{
+			doError(aName, String.format("Could not find ooa-system %s!", aName.getText()));
+		}
+		else if ((aSym.type() == null) || !(aSym.type().kind() == TypeKind.OoActionSystemType))
+		{
+			doError(aName, String.format("Referenced type (%s) does not have correct type!", aName.getText()));
+		}
+		else
+		{
+			final OoActionSystemType aType = (OoActionSystemType)aSym.type();
+			if (aType.isInSystemDescription())
+				doError(aName, String.format("Referenced type (%s) already used in composition!", aName.getText()));
+			else
+				aType.SetIsInSystemDescription(true);
+			top.AddElement(aSym);
+		}
+	}
+
+	/* does a fixup run after parsing */
+	 void fixUpRun(IdentifierList sysDescr)
+	{
+		// set system descr.
+		pState.ooaSystem.SetSystemDescription(sysDescr);
+
+		// fixup named types
+		FixupNamedTypes();
+	}
+
+	private void FixupNamedTypes()
+	{
+		/*named type refs that could not be resolved in the first run, have to
+          be resolved now. */
+		for (final OpaqueType ntype: pState.typesToFixUp)
+		{
+			if (ntype.resolvedType() == null)
+			{
+				//ntype.identifier
+				final Identifier asym = pState.Lookup(ntype.identifier().tokenText(), ntype.identifier().definingScope());
+				if ((asym == null) || (asym.kind() != IdentifierKind.TypeIdentifier))
+				{
+					final ParserError error = new ParserError(pState.filename, ntype.identifier().line(), ntype.identifier().column(),
+							String.format("Can not resolve %s to a named type", ntype.identifier().tokenText()));
+					pState.AddErrorMessage(error);
+				}
+				else
+					ntype.SetResolvedType(asym.type());
+			}
+		}
+		pState.typesToFixUp.clear();
+	}
+
+
+	private boolean TosIsActionSystem()
+	{
+		return pState.currentScope instanceof OoActionSystemType;
+	}
+
+
+	private int currentLine()
+	{
+		final Token token = input.LT(-1);
+		return token == null ? 0 : token.getLine();
+	}
+
+	private int currentPos()
+	{
+		final Token token = input.LT(-1);
+		return token == null ? 0 : token.getCharPositionInLine();
+	}
+
+	/* add var symbol to the current action system */
+	void createAttribute(Token varname, boolean isStatic, boolean isObs, boolean isCtr, UlyssesType aType, Expression anExpr)
+	{
+		if (!TosIsActionSystem())
+			return;
+
+		if (aType == null)
+		{
+			doError(varname, String.format("%s lacks type!", varname.getText()));
+		}
+		if (anExpr == null)
+		{
+			doError(varname, String.format("%s lacks initializer!", varname.getText()));
+		}
+		if (isObs == true || isCtr == true)
+			if (aType.kind() != TypeKind.QrType)
+				doError(varname, "'obs' or 'ctr' on attributes only allowed for qualitative types");
+
+
+		final AttributeIdentifier var = new AttributeIdentifier(varname, aType, GetScope(), anExpr, isStatic, isObs, isCtr);
+		if (pState.currentScope.ResolveIdentifier(varname.getText()) == null)
+			pState.currentScope.AddIdentifier(var, null);
+		else
+			doError(varname, String.format("Can not add %s: Symbol already defined!", varname.getText()));
+	}
+
+
+	/* create a boolean type */
+	BoolType createBoolType()
+	{
+		return new BoolType(null);
+	}
+
+	/* create a char type */
+	CharType createCharType()
+	{
+		return new CharType(null);
+	}
+
+	/* create an int type */
+	@SuppressWarnings("unchecked")
+	UlyssesType createIntType(Token rangeLow, Token rangeHigh)
+	{
+		int low = 0;
+		int high = 0;
+
+		if (rangeLow.getType() == ooaLexer.T_INFTY)
+			doError(rangeLow, "Infinity not supported.");
+		if (rangeLow.getType() == ooaLexer.T_INFTY)
+			doError(rangeHigh, "Infinity not supported.");
+
+		if (rangeLow.getType() == ooaLexer.T_IDENTIFIER)
+		{
+			// see whether we can find the constant
+			final Identifier aconst = pState.currentScope.ResolveIdentifier(rangeLow.getText());
+			if (aconst == null || aconst.kind() != IdentifierKind.Constant)
+				doError(rangeLow, String.format("Constant %s not found", rangeLow.getText()));
+			else if (aconst.type().kind() != TypeKind.IntType)
+				doError(rangeLow, "Constant must be integer");
+			else
+				low = ((ValueExpression<Integer>)((ConstantIdentifier)aconst).Value()).value();
+		}
+		else
+			try {
+				low = Integer.parseInt(rangeLow.getText());
+			} catch (final NumberFormatException e) {
+				doError(rangeLow, "Can not convert to integer");
+			}
+
+		if (rangeHigh.getType() == ooaLexer.T_IDENTIFIER)
+		{
+			// see whether we can find the constant
+			final Identifier aconst = pState.currentScope.ResolveIdentifier(rangeHigh.getText());
+			if (aconst == null || aconst.kind() != IdentifierKind.Constant)
+				doError(rangeHigh, String.format("Constant %s not found", rangeHigh.getText()));
+			else if (aconst.type().kind() != TypeKind.IntType)
+				doError(rangeHigh, "Constant must be integer");
+			else
+				high = ((ValueExpression<Integer>)((ConstantIdentifier)aconst).Value()).value();
+		}
+		else
+			try {
+				high = Integer.parseInt(rangeHigh.getText());
+			} catch (final NumberFormatException e) {
+				doError(rangeLow, "Can not convert to integer");
+			}
+
+		if (high < low)
+			doError(rangeHigh, "Lower bound greater than upper bound");
+
+		return new IntType(low, high, null);
+	}
+
+	/* create a float type */
+	 @SuppressWarnings("unchecked")
+	UlyssesType createFloatType(Token rangeLow, Token rangeHigh)
+	{
+		float low = 0;
+		float high = 0;
+
+		if (rangeLow.getType() == ooaLexer.T_INFTY)
+			doError(rangeLow, "Infinity not supported.");
+		if (rangeLow.getType() == ooaLexer.T_INFTY)
+			doError(rangeHigh, "Infinity not supported.");
+
+		if (rangeLow.getType() == ooaLexer.T_IDENTIFIER)
+		{
+			// see whether we can find the constant
+			final Identifier aconst = pState.currentScope.ResolveIdentifier(rangeLow.getText());
+			if (aconst == null || aconst.kind() != IdentifierKind.Constant)
+				doError(rangeLow, String.format("Constant %s not found", rangeLow.getText()));
+			else if (aconst.type().kind() != TypeKind.FloatType)
+				doError(rangeLow, "Constant must be float");
+			else
+				low = ((ValueExpression<Integer>)((ConstantIdentifier)aconst).Value()).value();
+		}
+		else
+			try {
+				low = Float.parseFloat(rangeLow.getText());
+			} catch (final NumberFormatException e) {
+				doError(rangeLow, "Can not convert to float (single)");
+			}
+
+		if (rangeHigh.getType() == ooaLexer.T_IDENTIFIER)
+		{
+			// see whether we can find the constant
+			final Identifier aconst = pState.currentScope.ResolveIdentifier(rangeHigh.getText());
+			if (aconst == null || aconst.kind() != IdentifierKind.Constant)
+				doError(rangeHigh, String.format("Constant %s not found", rangeHigh.getText()));
+			else if (aconst.type().kind() != TypeKind.FloatType)
+				doError(rangeHigh, "Constant must be integer");
+			else
+				high = ((ValueExpression<Integer>)((ConstantIdentifier)aconst).Value()).value();
+		}
+		else
+			try {
+				high = Float.parseFloat(rangeHigh.getText());
+			} catch (final NumberFormatException e){
+				doError(rangeHigh, "Can not convert to float (single)");
+			}
+
+		if (high < low)
+			doError(rangeHigh, "Lower bound greater than upper bound");
+
+		/* precision */
+		final float afterc_low = low -  (float)Math.floor(low); //(float)Convert.ToInt32(low);
+		final float afterc_high = high - (float)Math.floor(high); //(float)Convert.ToInt32(high);
+		final float precision = afterc_low < afterc_high ? afterc_low : afterc_high;
+
+		return new FloatType(low, high, precision, null);
+	}
+
+	/* create a list of an enumerated type */
+	 UlyssesType createListEnumType(Token alistelem)
+	{
+		final EnumType hiddenEnumType = new EnumType(null);
+
+		final ListType result = new ListType(hiddenEnumType, 500, null);
+		addToListEnumType(result, alistelem);
+		return result;
+	}
+
+	/* add a new enum symbol to a list with an anonymous enumerated type */
+	 void addToListEnumType(UlyssesType aTypeSymbol, Token otherlistelem)
+	{
+		final EnumType enumtype = (EnumType)((ListType)aTypeSymbol).innerType();
+		addToEnumType(enumtype, otherlistelem, null);
+	}
+
+	/* create a new enumerated type */
+	 UlyssesType createEnumType(Token aRangeValue, Token anIntegerValue)
+	{
+		EnumType result;
+
+		if (anIntegerValue == null)
+			result = new EnumType(null);
+		else
+			result = new ValuedEnumType(null);
+
+		addToEnumType(result, aRangeValue, anIntegerValue);
+		return result;
+	}
+
+	/* add a new enum symbol to the enumerated type */
+	 void addToEnumType(UlyssesType aTypeSymbol, Token otherRangeValue, Token anIntegerValue)
+	{
+		final EnumType anEnum = (EnumType)aTypeSymbol;
+		if (anEnum.symbolTable().Defined(otherRangeValue.getText()))
+		{
+			doError(otherRangeValue, String.format("Element '%s' already defined!", otherRangeValue.getText()));
+			return;
+		}
+
+		/* for now we allow the usage of enum-ids without specifying the actual enum type,
+		 * e.g., x = some_enum_id, hence all enum identifier must be globally unique.
+		 * This decision could be reverted at later time...
+		 */
+		final Identifier sym = pState.Lookup(otherRangeValue);
+		if (sym != null)
+		{
+			doError(otherRangeValue, String.format("Element '%s' already defined!", otherRangeValue.getText()));
+			return;
+		}
+
+		EnumIdentifier enumval;
+		if (anIntegerValue == null)
+		{
+			if (aTypeSymbol instanceof ValuedEnumType)
+			{
+				doError(otherRangeValue, String.format("Element '%s' needs integer value!", otherRangeValue.getText()));
+				return;
+			}
+
+			enumval = new EnumIdentifier(otherRangeValue, (EnumType)aTypeSymbol, GetScope());
+		}
+		else
+		{
+			if (!(aTypeSymbol instanceof ValuedEnumType))
+			{
+				doError(otherRangeValue, String.format("Element '%s' must not have integer value!", otherRangeValue.getText()));
+				return;
+			}
+			enumval = new EnumIdentifier(otherRangeValue, Integer.parseInt(anIntegerValue.getText()), (EnumType)aTypeSymbol, GetScope());
+		}
+
+		((EnumType)aTypeSymbol).AddEnumSymbol(enumval);
+
+		/* add the enum id to 'global' state */
+		pState.currentScope.AddIdentifier(enumval, null);
+	}
+
+	/* get a named type */
+	 UlyssesType getNamedType(Token aType)
+	{
+		UlyssesType result = null;
+		final Identifier sym = pState.Lookup(aType);
+		if (sym == null)
+		{
+			/* we might not have seen this type yet - so do a fixup run later */
+			result = new OpaqueType(new TypeIdentifier(aType, null, GetScope()));
+			pState.typesToFixUp.add((OpaqueType)result);
+		}
+		else if (sym.kind() == IdentifierKind.TypeIdentifier)
+			result = ((TypeIdentifier)sym).type();
+		else
+			doError(aType, "Not a named type symbol: " + aType.getText());
+
+		return result;
+	}
+
+	/* create a list type */
+	 @SuppressWarnings("unchecked")
+	UlyssesType createListType(Token numOfElements, UlyssesType innertype)
+	{
+		if (innertype == null)
+			doError(numOfElements, "List type lacks proper element type (null)");
+
+		int numElems = 0;
+
+		if (numOfElements.getType() == ooaLexer.T_IDENTIFIER)
+		{
+			// see whether we can find the constant
+			final Identifier aconst = pState.currentScope.ResolveIdentifier(numOfElements.getText());
+			if (aconst == null || aconst.kind() != IdentifierKind.Constant)
+				doError(numOfElements, String.format("Constant %s not found", numOfElements.getText()));
+			else if (aconst.type().kind() != TypeKind.IntType)
+				doError(numOfElements, "Constant must be integer");
+			else
+				numElems = ((ValueExpression<Integer>)((ConstantIdentifier)aconst).Value()).value();
+		}
+		else
+		{
+			try {
+				numElems = Integer.parseInt(numOfElements.getText());
+			} catch (final NumberFormatException e) {
+				doError(numOfElements, "Not an integer");
+			}
+			if (numElems <= 0)
+				doError(numOfElements, "Number of elements in a list must be >= 1");
+		}
+
+		final ListType result = new ListType(innertype, numElems, null);
+		return result;
+	}
+
+	/* create a map type */
+	 @SuppressWarnings("unchecked")
+	UlyssesType createMapType(Token numOfElements, UlyssesType mapfromtype, UlyssesType maptotype)
+	{
+		if (mapfromtype == null)
+			doError(numOfElements, "Map: From-type not set (null)");
+		if (maptotype == null)
+			doError(numOfElements, "Map: To-type not set (null)");
+
+		int max = 0;
+
+		if (numOfElements.getType() == ooaLexer.T_IDENTIFIER)
+		{
+			// see whether we can find the constant
+			final Identifier aconst = pState.currentScope.ResolveIdentifier(numOfElements.getText());
+			if (aconst == null || aconst.kind() != IdentifierKind.Constant)
+				doError(numOfElements, String.format("Constant %s not found", numOfElements.getText()));
+			else if (aconst.type().kind() != TypeKind.IntType)
+				doError(numOfElements, "Constant must be integer");
+			else
+				max = ((ValueExpression<Integer>)((ConstantIdentifier)aconst).Value()).value();
+		}
+		else
+			try {
+				max = Integer.parseInt(numOfElements.getText());
+			} catch (final NumberFormatException e) {
+				doError(numOfElements, "Not an integer");
+			}
+
+		final MapType result = new MapType(mapfromtype, maptotype, max, null);
+		return result;
+	}
+
+	/* create a tuple type */
+	 UlyssesType createTupleType(UlyssesType aType)
+	{
+		final TupleType result = new TupleType(null);
+		addToTupleType(result, aType);
+		return result;
+	}
+
+	/* add inner type to tuple */
+	 void addToTupleType(UlyssesType aTypeSymbol, UlyssesType anotherType)
+	{
+		final TupleType tuple = (TupleType)aTypeSymbol;
+		if (anotherType != null)
+			tuple.AddType(anotherType);
+		else
+			doError("Unknown inner type in tuple");
+	}
+
+	/* create a QR type */
+	UlyssesType createQrType(Token alandmark)
+	{
+		final QrType result = new QrType(null);
+		addToQrType(result, alandmark);
+		return result;
+	}
+
+	/* add another landmark to QR type */
+	protected void addToQrType(UlyssesType aTypeSymbol, Token otherlandmark)
+	{
+		final Identifier sym = pState.Lookup(otherlandmark);
+		if (sym != null)
+		{
+			doError(otherlandmark, String.format("Redifinition of %s", otherlandmark.getText()));
+			return;
+		}
+
+		final LandmarkIdentifier lndmrk = new LandmarkIdentifier(otherlandmark, (QrType)aTypeSymbol, GetScope());
+		((QrType)aTypeSymbol).AddLandmark(lndmrk);
+	}
+
+	/* gets called after a simple type has been constructed. used to define an internal name*/
+	 void fixupSimpleType(UlyssesType aTypeSymbol)
+	{
+		if (aTypeSymbol != null)
+			aTypeSymbol.SetupAnonymousName();
+	}
+
+	/* gets called after a simple or complex type has been constructed. used to define an internal name */
+	 void fixupComplexType(UlyssesType aTypeSymbol)
+	{
+		if (aTypeSymbol != null)
+			aTypeSymbol.SetupAnonymousName();
+	}
+
+
+	/* create a method symbol */
+	 FunctionIdentifier createMethodSymbol(Token mname)
+	{
+		final Identifier sym = pState.Lookup(mname);
+		if (sym != null)
+		{
+			doError(mname, String.format("Redefinition of %s", mname.getText()));
+			return null;
+		}
+
+		final FunctionType funtype = new FunctionType(FunctionTypeEnum.Method, new LinkedList<UlyssesType>(), null);
+		final MethodIdentifier msym = new MethodIdentifier(mname, funtype, GetScope());
+		// funtype.SetTypeIdentifier(msym); -- the type of this function doesn't have a name!
+
+		pState.currentScope.AddIdentifier(msym, null);
+
+		pState.PushResolveStack(msym);
+		return msym;
+	}
+
+	/* remove local method symbols from resolution stack again */
+	protected void popResolveStack(FunctionIdentifier newMethod)
+	{
+		if (newMethod != null)
+			pState.PopResolveStack();
+	}
+
+
+	/* add a return type to a method */
+	 void setMethodReturnType(FunctionIdentifier newMethod, UlyssesType rt)
+	{
+		if (newMethod == null)
+			return;
+
+		if (rt == null)
+			doError(String.format("Method %s has no return type (null)", newMethod.tokenText()));
+
+		/* set return type */
+		((FunctionType)newMethod.type()).SetReturnType(rt);
+
+
+		/* add hidden return parameter */
+		if (newMethod.symbolTable().Defined("result"))
+		{
+			doError(String.format("Method %s defines 'result'", newMethod.tokenText()));
+			return;
+		}
+
+		final ParameterIdentifier returnval = new ParameterIdentifier("result", rt, GetScope());
+		newMethod.symbolTable().AddIdentifier(returnval);
+	}
+
+	/* add a parameter to a method */
+	 void addMethodParameter(FunctionIdentifier newMethod, Token paramName, UlyssesType atype)
+	{
+		if (newMethod == null)
+			return;
+
+		if (atype == null)
+			doError(paramName, "Parameter has no type (null)");
+
+
+		if (newMethod.symbolTable().Defined(paramName.getText()) == true)
+		{
+			doError(paramName, String.format("Parameter '%s' already defined", paramName.getText()));
+			return;
+		}
+
+		// add parameter to scope
+		final ParameterIdentifier param = new ParameterIdentifier(paramName, atype, GetScope());
+		newMethod.AddParameter(param);
+
+		// add type of param to signature
+		final FunctionType ftype = (FunctionType)newMethod.type();
+		ftype.AddParameterType(atype);
+	}
+
+	/* set method body of a method */
+	 void addMethodBody(FunctionIdentifier newMethod, Block statements)
+	{
+		if (newMethod == null)
+			return;
+
+		if (statements == null)
+			doError(String.format("%s has empty body (null)",
+					((FunctionType)newMethod.type()).functionType() == FunctionTypeEnum.Method ? "Method" : "Action"));
+
+		newMethod.SetBody(statements);
+	}
+
+	/* create a continuous action */
+	 FunctionIdentifier createNamedContinuousAction(Token cactionname, FunctionTypeEnum actionTypeEnum)
+	{
+		return createNamedAction(cactionname, actionTypeEnum);
+	}
+
+	/* create a named action */
+	 FunctionIdentifier createNamedAction(Token actionname, FunctionTypeEnum actionType)
+	{
+		final Identifier sym = pState.Lookup(actionname);
+		if (sym != null)
+		{
+			doError(actionname, String.format("Symbol '%s' already defined.", sym.tokenText()));
+			return null;
+		}
+
+		final FunctionType atype = new FunctionType(actionType, new LinkedList<UlyssesType>(), null);
+		final NamedActionIdentifier action = new NamedActionIdentifier(actionname, atype, GetScope());
+		// atype.SetTypeIdentifier(action); -- the type of this action doesn't have a name!
+
+		pState.currentScope.AddIdentifier(action, null);
+		pState.PushResolveStack(action);
+		return action;
+	}
+
+	/* add body of action */
+	 void addActionBody(FunctionIdentifier newAction, GuardedCommand body)
+	{
+		// we need a wrapper around the guarded command..
+		final Block bdy = new SeqBlock(currentLine(), currentPos());
+		addMethodBody(newAction, bdy);
+		body.SetParentScope(bdy);
+		bdy.AddStatement(body);
+	}
+
+	/* add constraints of cont. action */
+	 void addContinuousActionBody(FunctionIdentifier newAction, GuardedCommand constraints)
+	{
+		final Block bdy = new SeqBlock(currentLine(), currentPos());
+		bdy.AddStatement(constraints);
+		addMethodBody(newAction, bdy);
+	}
+
+	/* create a guarded command */
+	 GuardedCommand createGuardedCommandStatement()
+	 {
+		 return new GuardedCommand(null, null, currentLine(), currentPos());
+	 }
+
+	 void addExprAndBlockToGuardedCommand(GuardedCommand cmd, Expression expr, Block bdy)
+	{
+		if (bdy == null)
+			doError("Guarded command without body (null)!");
+
+		if (expr == null)
+			doError("Guarded command without guard (null)!");
+
+		cmd.SetGuard(expr);
+		cmd.SetBody(bdy);
+	}
+	 GuardedCommand createGuardedCommandStatement(Expression expr, Block bdy, boolean isQualitative)
+	{
+		final GuardedCommand result = createGuardedCommandStatement();
+		addExprAndBlockToGuardedCommand(result, expr, bdy);
+		result.SetIsQualitative(isQualitative);
+		return result;
+	}
+
+	/* add statements to list */
+	 void addToStatementList(Block top, Statement stmt)
+	{
+		if (stmt == null)
+			doError("Can not add statement: null!");
+
+		top.AddStatement(stmt);
+	}
+
+	/* create a Kill statement */
+	 Statement createKillStatement(Token aname)
+	{
+		final Identifier sym = pState.Lookup(aname);
+		if (sym == null)
+			doError(aname, "Not defined");
+
+		final KillStatement result = new KillStatement(sym, aname.getLine(), aname.getCharPositionInLine());
+		return result;
+	}
+
+	/* create a Skip statement */
+	 Statement createSkipStatement()
+	{
+		return new SkipStatement(currentLine(), currentPos());
+	}
+
+	/* create a Break statement */
+	 Statement createBreakStatement()
+	{
+		return new BreakStatement(currentLine(), currentPos());
+	}
+
+	/* create an Abort statement */
+	 Statement createAbortStatement()
+	{
+		return new AbortStatement(currentLine(), currentPos());
+	}
+
+	/* creates a prioritized composition block */
+	 Block createPrioBlock(Block top)
+	{
+		return new PrioBlock(top, currentLine(), currentPos());
+	}
+
+	/* creates a nondeterministically composed block */
+	 Block createNondetBlock(Block top)
+	{
+		return new NondetBlock(top, currentLine(), currentPos());
+	}
+
+	/* creates a sequentially composed block */
+	 SeqBlock createSeqBlock(Block top)
+	{
+		return new SeqBlock(top, currentLine(), currentPos());
+	}
+
+
+	/* adds a filter expression to seq block */
+	protected void addSeqBlockExpression(Block seqList, Expression sexpr)
+	{
+		seqList.SetFilter(sexpr); /*gets transformed to guarded command in resolvevisitor!*/
+	}
+
+
+	/* create a self identifier */
+	 IdentifierExpression createSelfIdentifierExpression(Token self)
+	{
+		final Identifier id = pState.Lookup("self");
+		if (id == null)
+		{
+			doError(self, "Can not resolve 'self'");
+			return null;
+		}
+
+		final IdentifierExpression result = new IdentifierExpression(id, self.getLine(), self.getCharPositionInLine());
+		result.setIsSelf(true);
+		return result;
+	}
+
+	/* build up identifier tree... */
+	 Expression createIdentifierAccessExpression(IdentifierExpression aself, Token token)
+	{
+		final Identifier someid = pState.Lookup(token.getText(), GetScope());
+		final Identifier self = pState.Lookup("self");
+
+		if (someid != null)
+		{
+			switch (someid.kind())
+			{
+			/* all method and attribute accesses are prefixed by self */
+			case AttributeIdentifier:
+			case MethodIdentifier:
+				if (self == null)
+					doError(token, "Self access of method: Can not find 'self' symbol! (internal error)");
+				aself = new IdentifierExpression(self, token.getLine(), token.getCharPositionInLine());
+				aself.setIsSelf(true);
+				break;
+			default:
+				break;
+			}
+		}
+
+		final IdentifierExpression ident = new UnresolvedIdentifierExpression(token, GetScope());
+		if (aself != null)
+			return new AccessExpression(aself, ident, token.getLine(), token.getCharPositionInLine());
+		else
+			return ident;
+	}
+
+	 AccessExpression addIdentifierAccessExpression(Expression parent, Token token)
+	{
+		final IdentifierExpression ident = new UnresolvedIdentifierExpression(token, GetScope());
+		return new AccessExpression(parent, ident, token.getLine(), token.getCharPositionInLine());
+	}
+
+	/* we have a primed id; prime the complete subtree.. */
+	Expression setIdentifierExpressionPrimed(Expression oldExpr, Token token)
+	{
+		return new UnaryOperator(ExpressionKind.Primed, oldExpr, token.getLine(), token.getCharPositionInLine());
+	}
+
+	/* create a fold operation */
+	 Expression createFoldExpression(Expression result, Token afold, Expression initval, Expression anexpr)
+	{
+		ExpressionKind akind = ExpressionKind.foldLR;
+		if (afold.getType() == ooaLexer.T_FOLDLR)
+			akind = ExpressionKind.foldLR;
+		else if (afold.getType() == ooaLexer.T_FOLDRL)
+			akind = ExpressionKind.foldRL;
+		else
+			assert(false);
+
+		final TernaryOperator op = new TernaryOperator(akind, result, initval, anexpr, currentLine(), currentPos(), GetScope());
+		return op;
+	}
+
+
+	/* create a method access */
+	 CallExpression createMethodAccessExpression(Expression subexpr, List<Expression> m_params, Token token)
+	{
+		assert(subexpr != null);
+
+		return new CallExpression(subexpr, m_params, token.getLine(), token.getCharPositionInLine(), GetScope());
+	}
+
+	/* create a tuple or map access */
+	 TupleMapAccessExpression createTupleMapAccessExpression(Expression subexpr, Expression ac, Token token)
+	{
+		assert(subexpr != null);
+
+		return new TupleMapAccessExpression(subexpr, ac, token.getLine(), token.getCharPositionInLine());
+	}
+
+	/* create a method call statement; has to be resolved in a second run */
+	 Statement createCallStatement(Expression aqname)
+	{
+		return new Call(aqname, currentLine(), currentPos());
+	}
+
+	/* create a single assignment statement */
+	 Statement createSingleAssignmentStatement(Expression aqname, Expression aexp)
+	{
+		final Assignment result = new Assignment(aqname, aexp, null, currentLine(), currentPos());
+		return result;
+	}
+
+	/* create a multi-assignment statement; has to be resolved in a second run */
+	 Statement createMultipleAssignmentStatementLHS(Expression aqname)
+	{
+		return new Assignment(aqname, null, null, currentLine(), currentPos());
+	}
+
+	/* adds an expression to the multi-assign */
+	 void addMutlipleAssignmentStatementRHS(Statement result, Expression mexp)
+	{
+		((Assignment)result).AddValue(mexp);
+	}
+
+	/* adds a LHS-var to the multi assign */
+	 void addMultipleAssignmentStatementLHS(Statement result, Expression malhs)
+	{
+		((Assignment)result).AddPlace(malhs);
+	}
+
+	/* pop an assignment statement from the resolve stack */
+	 void popAssignmentOffResolveStack(Statement result)
+	{
+		assert(result == pState.currentScope); // ref eq.
+		pState.PopResolveStack();
+	}
+
+	/* pushes the assignment statement onto resolve stack. */
+	 void pushAssignmentOnResolveStack(Statement result)
+	{
+		assert(result instanceof Assignment);
+		pState.PushResolveStack((Assignment)result);
+	}
+
+
+	/* adds a nondet-assignment constraint */
+	 void addConstraintToAssignment(Statement result, Expression ndexp)
+	{
+		((Assignment)result).SetNondetExpression(ndexp);
+	}
+
+	/* add a named action call to do-od block */
+	 void addNamedActionCallToBlockList(Block top, Token aname, List<Expression> m_params, Token maptoken, Expression amapexpression)
+	{
+		final Identifier id = pState.Lookup(aname);
+		if (id == null)
+		{
+			doError(aname, String.format("Could not find named action '%s'", aname.getText()));
+			return;
+		}
+		Expression callexpr;
+		if (id.kind() == IdentifierKind.MethodIdentifier)
+		{
+			doError(aname, "Method access in do-od block not allowed.");
+			return;
+			// access via self
+			/*
+            Identifier self = pState.Lookup("self");
+            if (self == null)
+                doError(aname, "Self access of method: Can not find 'self' symbol! (internal error)");
+            IdentifierExpression aself = new IdentifierExpression(self, aname.getLine(), aname.getCharPositionInLine());
+            aself.setIsSelf(true);
+            callexpr = new CallExpression(
+                new AccessExpression(aself,
+                    new IdentifierExpression(id, aname.getLine(), aname.getCharPositionInLine()), aname.getLine(), aname.getCharPositionInLine()),
+                    m_params, aname.getLine(), aname.getCharPositionInLine(), GetScope());
+			 */
+		}
+		else
+			callexpr = new CallExpression(
+					new IdentifierExpression(id, aname.getLine(), aname.getCharPositionInLine()),
+					m_params, aname.getLine(), aname.getCharPositionInLine(), GetScope());
+
+		if (amapexpression != null)
+		{
+			ExpressionKind akind = ExpressionKind.foldLR;
+			if (maptoken.getType() == ooaLexer.T_FOLDLR)
+				akind = ExpressionKind.foldLR;
+			else if (maptoken.getType() == ooaLexer.T_FOLDRL)
+				akind = ExpressionKind.foldRL;
+			else
+				assert(false);
+
+			callexpr = new TernaryOperator(akind, callexpr, null, amapexpression,
+					currentLine(), currentPos(), GetScope());
+		}
+		final Call statement = new Call(callexpr, currentLine(), currentPos());
+		top.AddStatement(statement);
+	}
+
+	/*adds skip statement instead of call to do-od block*/
+	 void addSkipStatementToBlockList(Block top)
+	{
+		top.AddStatement(new SkipStatement(currentLine(), currentPos()));
+	}
+
+
+	/* add anonymous action to do-od block */
+	 void addToBlockList(Block top, Statement gcmd)
+	{
+		if (gcmd != null)
+			top.AddStatement(gcmd);
+	}
+
+	/* add the do-od block to the action system type */
+	 void addActionBlock(OoActionSystemType aTypeSymbol, Block bl)
+	{
+		aTypeSymbol.SetDoOdBlock(bl);
+	}
+
+	/* push block */
+	 void pushBlockToResolveStack(IScope toPush)
+	{
+		pState.PushResolveStack(toPush);
+	}
+
+	/* pop block */
+	 void popBlockFromResolveStack(IScope toPop)
+	{
+		if (toPop != null)
+		{
+			assert(pState.currentScope == toPop); // ref eq.
+			pState.PopResolveStack();
+		}
+	}
+
+	/* add block var */
+	 void addBlockVariable(Block seqList, Token varname, UlyssesType aType)
+	{
+		if (aType == null)
+		{
+			doError(varname, String.format("%s lacks type!", varname.getText()));
+		}
+		try
+		{
+			seqList.AddIdentifier(new LocalVariableIdentifier(varname, aType, GetScope()));
+		}
+		catch (final ArgumentException e)
+		{
+			doError(varname, String.format("%s redefined!", varname.getText()));
+		}
+	}
+
+
+	 QualitativeConstraintStatement createTwoVarConstraintStatement(Token id1, Token id2, QualitativeConstraintOperation op)
+	{
+		Identifier var1 = pState.Lookup(id1);
+		if (var1 == null)
+		{
+			var1 = new ExpressionVariableIdentifier(id1.getText(), id1.getLine(), id1.getCharPositionInLine());
+			var1.SetType(new AnyType((ExpressionVariableIdentifier)var1));
+
+			GetScope().AddIdentifier(var1, null);
+
+			doWarning(id1, String.format("Free variable in qualitative constraint: '%s'.", id1.getText()));
+		}
+
+		Identifier var2 = pState.Lookup(id2);
+		if (var2 == null)
+		{
+			var2 = new ExpressionVariableIdentifier(id2.getText(), id2.getLine(), id2.getCharPositionInLine());
+			var2.SetType(new AnyType((ExpressionVariableIdentifier)var2));
+
+			GetScope().AddIdentifier(var2, null);
+
+			doWarning(id1, String.format("Free variable in qualitative constraint: '%s'.", id2.getText()));
+		}
+
+		final QualitativeConstraintStatement result = new QualitativeConstraintStatement(var1, var2, op, id1.getLine(), id1.getCharPositionInLine());
+		return result;
+	}
+
+
+	 QualitativeConstraintStatement createQualEqualConstraintStatement(Token id1, Token id2)
+	{
+		return createTwoVarConstraintStatement(id1, id2, QualitativeConstraintOperation.Equal);
+	}
+
+	 QualitativeConstraintStatement createQualArithConstraintStatement(Token id1, Token id2, Token id3, Token op)
+	{
+		Identifier var1 = pState.Lookup(id1);
+		if (var1 == null)
+		{
+			var1 = new ExpressionVariableIdentifier(id1.getText(), id1.getLine(), id1.getCharPositionInLine());
+			var1.SetType(new AnyType((ExpressionVariableIdentifier)var1));
+
+			GetScope().AddIdentifier(var1, null);
+
+			doWarning(id1, String.format("Free variable in qualitative constraint: '%s'.", id1.getText()));
+		}
+
+		Identifier var2 = pState.Lookup(id2);
+		if (var2 == null)
+		{
+			var2 = new ExpressionVariableIdentifier(id2.getText(), id2.getLine(), id2.getCharPositionInLine());
+			var2.SetType(new AnyType((ExpressionVariableIdentifier)var2));
+
+			GetScope().AddIdentifier(var2, null);
+
+			doWarning(id1, String.format("Free variable in qualitative constraint: '%s'.", id2.getText()));
+		}
+
+		Identifier var3 = pState.Lookup(id3);
+		if (var3 == null)
+		{
+			var3 = new ExpressionVariableIdentifier(id3.getText(), id3.getLine(), id3.getCharPositionInLine());
+			var3.SetType(new AnyType((ExpressionVariableIdentifier)var3));
+
+			GetScope().AddIdentifier(var3, null);
+
+			doWarning(id1, String.format("Free variable in qualitative constraint: '%s'.", id3.getText()));
+		}
+		QualitativeConstraintOperation operation;
+		switch (op.getType())
+		{
+		case ooaParser.T_SUM:
+			operation = QualitativeConstraintOperation.Sum;
+			break;
+		case ooaParser.T_DIFF:
+			operation = QualitativeConstraintOperation.Diff;
+			break;
+		case ooaParser.T_PROD:
+			operation = QualitativeConstraintOperation.Prod;
+			break;
+		default:
+			doError(op, String.format("'%s' unknown operation", op.getText()));
+			return null;
+		}
+
+		final QualitativeConstraintStatement result = new QualitativeConstraintStatement(var1, var2, var3, operation, id1.getLine(), id1.getCharPositionInLine());
+		return result;
+	}
+
+	 QualitativeConstraintStatement createQualDerivConstraintStatement(Token id1, Token derivid)
+	{
+		return createTwoVarConstraintStatement(id1, derivid, QualitativeConstraintOperation.Deriv);
+	}
+
+
+
+	/* creates a general binary operator without any children */
+	 BinaryOperator createBinaryOperator(ExpressionKind akind)
+	{
+		final Token token = input.LT(-1);
+		return new BinaryOperator(akind, null, null, token.getLine(), token.getCharPositionInLine());
+	}
+
+
+	/* creates a general unary operator without child */
+	 UnaryOperator createUnaryOperator(ExpressionKind unaryOperatorType)
+	{
+		final Token token = input.LT(-1);
+		return new UnaryOperator(unaryOperatorType, null, token.getLine(), token.getCharPositionInLine());
+	}
+
+	/* create a conditional expression */
+	 Expression createConditionalExpression(Expression ce, Expression te, Expression ee, Token ef)
+	{
+		return new TernaryOperator(ExpressionKind.conditional, ce, te, ee, ef.getLine(), ef.getCharPositionInLine(), GetScope());
+	}
+
+	/* create a quantifier expression */
+	 Quantifier createQuantifierExpression(Token t)
+	{
+		Quantifier result = null;
+		if (t.getType() == ooaLexer.T_FORALL)
+			result = new ForallQuantifier(null, t.getLine(), t.getCharPositionInLine());
+		else
+			result = new ExistsQuantifier(null, t.getLine(), t.getCharPositionInLine());
+
+
+		pState.PushResolveStack(result);
+		return result;
+	}
+
+	/* add a bound variable to the quantifier */
+	 void addBoundVarToQuantifierExpression(Quantifier result, Token id, UlyssesType id_type)
+	{
+		/*note: this might be a bit harsh, but for now it's easier to demand uniquely named vars,
+                without any hiding. Could be fixed in searching only the first resolve level for
+                dupes..
+		 */
+		final Identifier sym = pState.Lookup(id);
+		if (sym != null)
+			doError(id, String.format("'%s' already defined!", id.getText()));
+		else
+		{
+			if (id_type == null)
+				doError(id, String.format("%s lacks type (null).", id.getText()));
+			final Identifier newvar = new ExpressionVariableIdentifier(id, id_type, GetScope());
+			result.AddIdentifier(newvar, null);
+		}
+	}
+
+	/* add the expression to the quantifier */
+	 void addExpressionToQuantifier(Quantifier result, Expression e)
+	{
+		result.SetChild(e);
+	}
+
+	/* remove local variables from resolve stack */
+	 void removeBoundVarsFromResolveStack(Quantifier result)
+	{
+		if (result != null)
+			pState.PopResolveStack();
+	}
+
+
+	/* create a boolean constant */
+	 LeafExpression createBoolConstant(boolean p)
+	{
+		final Token token = input.LT(-1);
+		return new ValueExpression<Boolean>(p, token.getLine(), token.getCharPositionInLine(), Boolean.class);
+	}
+
+	/* create a nil */
+	 LeafExpression createNullPointerConstant()
+	{
+		final Token token = input.LT(-1);
+		return new ValueExpression<Object>(null, token.getLine(), token.getCharPositionInLine(), Object.class);
+	}
+
+	/* create a 'self' identifier */
+	 LeafExpression createSelfPointer()
+	{
+		final Token token = input.LT(-1);
+		final Identifier self = pState.Lookup("self");
+		if (self == null)
+		{
+			doError(token, "Could not resolve 'self'");
+			return new UnresolvedIdentifierExpression(token, GetScope());
+		}
+
+		final IdentifierExpression result = new IdentifierExpression(self, token.getLine(), token.getCharPositionInLine());
+		result.setIsSelf(true);
+
+		return result;
+	}
+
+	/* create a float const */
+	 LeafExpression createFloatConstant(Token t_fl)
+	{
+		return new ValueExpression<Double>(Double.parseDouble(t_fl.getText()), t_fl.getLine(), t_fl.getCharPositionInLine(), Double.class);
+	}
+
+	/* create int const */
+	 LeafExpression createIntConstant(Token t_in)
+	{
+		return new ValueExpression<Integer>(Integer.parseInt(t_in.getText()), t_in.getLine(), t_in.getCharPositionInLine(), Integer.class);
+	}
+
+	/* set children of binary operator*/
+	 Expression addBinaryExpression(BinaryOperator binexpr, Expression expr, Expression e2)
+	{
+		binexpr.SetLeftChild(expr);
+		binexpr.SetRightChild(e2);
+		return binexpr;
+	}
+
+	/* set child of unary expr */
+	 Expression addUnaryExpression(UnaryOperator unexpr, Expression e)
+	{
+		if (unexpr != null)
+		{
+			unexpr.SetChild(e);
+			return unexpr;
+		}
+		else
+			return e;
+	}
+
+
+
+	/* create a list */
+	 ListConstructor createInitializedList()
+	{
+		final Token nexttoken = input.LT(1);
+		return new ListConstructor(nexttoken.getLine(), nexttoken.getCharPositionInLine());
+	}
+
+	/* add an element to the list */
+	 void addListElement(ListConstructor result, Expression e)
+	{
+		result.AddElement(e);
+	}
+
+	/* push list comprehension vars on resolve stack */
+	 void pushListVarsOnResolveStack(ListConstructor result)
+	{
+		pState.PushResolveStack(result);
+	}
+
+	/* pop list comprehension vars from resolve stack */
+	 void popListVarsFromResolveStack(ListConstructor result)
+	{
+		if (result != null)
+			pState.PopResolveStack();
+	}
+
+	/* set list comprehension expression */
+	 void addListComprExpr(ListConstructor result, Expression e)
+	{
+		result.SetComprehension(e);
+	}
+
+	/* add list comprehension variable */
+	 void addListComprVar(ListConstructor result, Token id, UlyssesType t1)
+	{
+		final Identifier sym = pState.Lookup(id);
+		if (sym != null)
+		{
+			/* see notes in quantifier*/
+			doError(id, String.format("'%s' already defined.", id.getText()));
+		}
+		else
+		{
+			final ExpressionVariableIdentifier newvar = new ExpressionVariableIdentifier(id, t1, GetScope());
+			result.AddIdentifier(newvar, null);
+		}
+	}
+
+	/* converts a String into a list of char */
+	 ListConstructor createStringConstant(Token t_l)
+	{
+		final ListConstructor result = new ListConstructor(t_l.getLine(), t_l.getCharPositionInLine());
+		final String substr = t_l.getText().substring(1, t_l.getText().length() - 2);
+		for (int cntr = 0; cntr < substr.length(); cntr++) {
+			final char c = substr.charAt(cntr);
+			result.AddElement(new ValueExpression<Character>(c, t_l.getLine(), t_l.getCharPositionInLine(), Character.class));
+		}
+		return result;
+	}
+
+	/* creates an empty map */
+	 Expression createEmptyMap()
+	{
+		final Token token = input.LT(-1);
+		return new MapConstructor(token.getLine(), token.getCharPositionInLine());
+	}
+
+	/* create a map and populate it with two items.. */
+	 Expression createMap(Expression e1, Expression e2, Token am)
+	{
+		final MapConstructor result = new MapConstructor(am.getLine(), am.getCharPositionInLine());
+		result.AddItem(e1, e2);
+		return result;
+	}
+
+	/* add a key/value pair to a map */
+	 void addToMap(Expression map, Expression e3, Expression e4)
+	{
+		((MapConstructor)map).AddItem(e3, e4);
+	}
+
+	/* create a set */
+	 SetConstructor createSet()
+	{
+		final Token nexttoken = input.LT(1);
+		final SetConstructor result = new SetConstructor(nexttoken.getLine(), nexttoken.getCharPositionInLine());
+		return result;
+	}
+
+	/* add item to set */
+	 void addToSet(Expression result, Expression e2)
+	{
+		((SetConstructor)result).AddItem(e2);
+	}
+
+	/* remove set comprehension variables from resolution stack */
+	 void popSetVarsFromResolveStack(SetConstructor _set)
+	{
+		if (_set != null)
+			pState.PopResolveStack();
+	}
+
+	/* add set comprehension variables to resolution stack */
+	 void pushSetVarsOnResolveStack(SetConstructor _set)
+	{
+		pState.PushResolveStack(_set);
+	}
+
+	/* set comprehension expression fro set */
+	 void addSetComprExpr(SetConstructor _set, Expression epx)
+	{
+		_set.SetComprehension(epx);
+	}
+
+	/* add local set compr. variable */
+	 void addSetComprVar(SetConstructor _set, Token id1, UlyssesType t1)
+	{
+		final Identifier sym = pState.Lookup(id1);
+		if (sym != null)
+			doError(id1, String.format("'%s' already defined!", id1.getText()));
+		else
+		{
+			final ExpressionVariableIdentifier newvar = new ExpressionVariableIdentifier(id1, t1, GetScope());
+			_set.AddIdentifier(newvar, null);
+		}
+	}
+
+	/* check whether identifier p is a tuple type */
+	 boolean isTuple(String p)
+	{
+		final Identifier sym = pState.Lookup(p);
+		return (sym != null)
+				&& (sym.kind() == IdentifierKind.TypeIdentifier)
+				&& (sym.type().kind() == TypeKind.TupleType);
+	}
+
+	/* create an initialized tuple */
+	 Expression createInitializedTuple(Token aName, List<Expression> m_params)
+	{
+		final Identifier sym = pState.Lookup(aName);
+		if ((sym == null) || !(sym.type() instanceof TupleType))
+		{
+			doError(aName, "Not a tuple type!");
+			return null;
+		}
+
+		final TupleType atuple = (TupleType)sym.type();
+		if (atuple.innerTypes().size() != m_params.size())
+		{
+			doError(aName, "Number of parameters does not match type definition!");
+			return null;
+		}
+
+		return new TupleConstructor(sym, m_params, aName.getLine(), aName.getCharPositionInLine());
+	}
+
+
+	/* create an reference expression: (<expression>).xyz */
+	 Expression createExpressionReference(Expression e, Expression aref, Token atoken)
+	{
+		final AccessExpression result = new AccessExpression(e, aref, atoken.getLine(), atoken.getCharPositionInLine());
+		return result;
+	}
+
+
+	/* gets called when we are parsing attributes */
+	 void BeginParsingAttributes()
+	{
+		pState.parsingAttributes = true;
+	}
+
+	/* gets called when we stop parsing attributes */
+	 void EndParsingAttributes()
+	{
+		pState.parsingAttributes = false;
+	}
+
+	/*dummy*/
+	 boolean notIsAttributeInitialization()
+	{
+		return !pState.parsingAttributes;
+	}
+
+	/* create a new(anid) constructor */
+	protected Expression createObject(Token anid)
+	{
+		if (!pState.parsingAttributes)
+		{
+			doError(anid, "Object creation with 'new' only allowed in variable initializers.");
+			return null;
+		}
+
+
+		final OpaqueType atype = new OpaqueType(new TypeIdentifier(anid, null, GetScope()));
+		pState.typesToFixUp.add(atype);
+		return new ObjectConstructor(atype, anid.getLine(), anid.getCharPositionInLine());
+	}
+
+
+	protected Expression createNamedObject(Token anid, Token aname)
+	{
+		if (!pState.parsingAttributes)
+		{
+			doError(anid, "Object creation with 'new' only allowed in variable initializers.");
+			return null;
+		}
+
+		if (! aname.getText().matches("\"[_]*[a-zA-Z][a-zA-Z0-9_]*\""))
+		{
+			doError(aname, "Not a valid identifier");
+			return null;
+		}
+
+		final OpaqueType atype = new OpaqueType(new TypeIdentifier(anid, null, GetScope()));
+		pState.typesToFixUp.add(atype);
+		return new ObjectConstructor(atype, aname.getText(), anid.getLine(), anid.getCharPositionInLine());
+	}
+
+
+	 void setQualitativeDerivDec(QValConstructor result)
+	{
+		result.SetDerivation(QValDeriv.Dec);
+	}
+
+	 void setQualitativeDerivInc(QValConstructor result)
+	{
+		result.SetDerivation(QValDeriv.Inc);
+	}
+
+	 void setQualitativeDerivSteady(QValConstructor result)
+	{
+		result.SetDerivation(QValDeriv.Steady);
+	}
+
+	 void setQualitativeDerivDontCare(QValConstructor result)
+	{
+		result.SetDerivation(QValDeriv.DonTCare);
+	}
+
+	 void setQualitativeValueRangeInfinity(QValConstructor result, boolean p)
+	{
+		throw new NotImplementedException();
+	}
+
+	 void setQualitativeValueRange(QValConstructor result, Expression expr2)
+	{
+		result.AddRange(expr2);
+	}
+
+	 void setQualitativeValueInfinity(QValConstructor result, boolean minus)
+	{
+		throw new NotImplementedException();
+	}
+
+	 void setQualitativeValueLandmark(QValConstructor result, Expression expr)
+	{
+		result.SetValue(expr);
+	}
+
+	 void setQualitativeValueDontCare(QValConstructor result)
+	{
+		throw new NotImplementedException();
+	}
+
+	 QValConstructor createQualitativeValue(Token aval)
+	{
+		return new QValConstructor(aval.getLine(), aval.getCharPositionInLine());
+	}
+
+	/* add a local variable to a named action */
+	 void addLocalVariableToNamedAction(FunctionIdentifier newMethod, Token id1, UlyssesType t1)
+	{
+		if (t1 == null)
+		{
+			doError(id1, "Variable lacks type");
+			return;
+		}
+
+		final LocalVariableIdentifier lvar = new LocalVariableIdentifier(id1, t1, GetScope());
+		newMethod.AddIdentifier(lvar, null);
+	}
+
+	/* ====== */
+	/* ====== */
+
+	public static final LinkedHashMap<String, String> readableTokens = new LinkedHashMap<String, String>();
+
+
+//	private void SetUpTokenDictionary()
+	static
+	{
+//		if (readableTokens.size() > 0)
+//			return;
+		readableTokens.put("<invalid>", "<invalid>");
+		readableTokens.put("<EOR>", "<EOR>");
+		readableTokens.put("<DOWN>", "<DOWN>");
+		readableTokens.put("<UP>", "<UP>");
+		readableTokens.put("T_TYPES", "'types'");
+		readableTokens.put("T_SYSTEM", "'system'");
+		readableTokens.put("T_SEMICOLON", "';'");
+		readableTokens.put("T_IDENTIFIER", "<identifier>");
+		readableTokens.put("T_EQUAL", "'='");
+		readableTokens.put("T_PRIO", "'//'");
+		readableTokens.put("T_NONDET", "'[]'");
+		readableTokens.put("T_LPAREN", "'('");
+		readableTokens.put("T_RPAREN", "')'");
+		readableTokens.put("T_LIST", "'list'");
+		readableTokens.put("T_LSQPAREN", "'['");
+		readableTokens.put("T_INTNUMBER", "<integer>");
+		readableTokens.put("T_RSQPAREN", "']'");
+		readableTokens.put("T_OF", "'of'");
+		readableTokens.put("T_COMMA", "','");
+		readableTokens.put("T_MAP", "'map'");
+		readableTokens.put("T_TO", "'to'");
+		readableTokens.put("T_QUANTITY", "'quantity'");
+		readableTokens.put("T_INFTY", "'inf'");
+		readableTokens.put("T_BOOL", "'bool'");
+		readableTokens.put("T_INT", "'int'");
+		readableTokens.put("T_RANGETO", "'..'");
+		readableTokens.put("T_FLOAT", "'float'");
+		readableTokens.put("T_FLOATNUMBER", "<floating point number>");
+		readableTokens.put("T_CHAR", "'char'");
+		readableTokens.put("T_CBRL", "'{'");
+		readableTokens.put("T_CBRR", "'}'");
+		readableTokens.put("T_AUTOCONS", "'autocons'");
+		readableTokens.put("T_VAR", "'var'");
+		readableTokens.put("T_METHODS", "'methods'");
+		readableTokens.put("T_ACTIONS", "'actions'");
+		readableTokens.put("T_DO", "'do'");
+		readableTokens.put("T_OD", "'od'");
+		readableTokens.put("T_STATIC", "'static'");
+		readableTokens.put("T_COLON", "':'");
+		readableTokens.put("T_END", "'end'");
+		readableTokens.put("T_CONT", "'cont'");
+		readableTokens.put("T_CTRL", "'ctr'");
+		readableTokens.put("T_OBS", "'obs'");
+		readableTokens.put("T_REQUIRES", "'requires'");
+		readableTokens.put("T_AND", "'and'");
+		readableTokens.put("T_ABORT", "'abort'");
+		readableTokens.put("T_SKIP", "'skip'");
+		readableTokens.put("T_KILL", "'kill'");
+		readableTokens.put("T_SELF", "'self'");
+		readableTokens.put("T_ASSIGNMENT", "':='");
+		readableTokens.put("T_WITH", "'with'");
+		readableTokens.put("T_IF", "'if'");
+		readableTokens.put("T_THEN", "'then'");
+		readableTokens.put("T_ELSE", "'else'");
+		readableTokens.put("T_FORALL", "'forall'");
+		readableTokens.put("T_EXISTS", "'exists'");
+		readableTokens.put("T_TRUE", "'true'");
+		readableTokens.put("T_FALSE", "'false'");
+		readableTokens.put("T_NIL", "'nil'");
+		readableTokens.put("T_STRINGLITERAL", "'\"<String>\"'");
+		readableTokens.put("T_NEW", "'new'");
+		readableTokens.put("T_BAR", "'|'");
+		readableTokens.put("T_MAPS", "'->'");
+		readableTokens.put("T_PRIMED", "'''");
+		readableTokens.put("T_POINT", "'.'");
+		readableTokens.put("T_NOTEQUAL", "'<>'");
+		readableTokens.put("T_SEQMOD_MAPOVERRIDE", "'++'");
+		readableTokens.put("T_BIIMPLIES", "'<=>'");
+		readableTokens.put("T_IMPLIES", "'=>'");
+		readableTokens.put("T_OR", "'or'");
+		readableTokens.put("T_ABS", "'abs'");
+		readableTokens.put("T_DIV", "'/'");
+		readableTokens.put("T_GREATER", "'>'");
+		readableTokens.put("T_GREATEREQUAL", "'>='");
+		readableTokens.put("T_IDIV", "'div'");
+		readableTokens.put("T_LESS", "'<'");
+		readableTokens.put("T_LESSEQUAL", "'<='");
+		readableTokens.put("T_MINUS", "'-'");
+		readableTokens.put("T_MOD", "'mod'");
+		readableTokens.put("T_POW", "'**'");
+		readableTokens.put("T_PROD", "'*'");
+		readableTokens.put("T_SUM", "'+'");
+		readableTokens.put("T_CONC", "'^'");
+		readableTokens.put("T_DIFF", "'\\'");
+		readableTokens.put("T_INTER", "'inter'");
+		readableTokens.put("T_IN", "'in'");
+		readableTokens.put("T_SET", "'set'");
+		readableTokens.put("T_NOT", "'not'");
+		readableTokens.put("T_SUBSET", "'subset'");
+		readableTokens.put("T_UNION", "'union'");
+		readableTokens.put("T_DOMRESBY", "'<-:'");
+		readableTokens.put("T_DOMRESTO", "'<:'");
+		readableTokens.put("T_RNGRESBY", "':->'");
+		readableTokens.put("T_RNGRESTO", "':>'");
+		readableTokens.put("T_MUNION", "'munion'");
+		readableTokens.put("T_CARD", "'card'");
+		readableTokens.put("T_DCONC", "'conc'");
+		readableTokens.put("T_DINTER", "'dinter'");
+		readableTokens.put("T_DUNION", "'dunion'");
+		readableTokens.put("T_ELEMS", "'elems'");
+		readableTokens.put("T_HEAD", "'hd'");
+		readableTokens.put("T_INDS", "'inds'");
+		readableTokens.put("T_LEN", "'len'");
+		readableTokens.put("T_TAIL", "'tl'");
+		readableTokens.put("T_DOM", "'dom'");
+		readableTokens.put("T_RNG", "'rng'");
+		readableTokens.put("T_MERGE", "'merge'");
+		readableTokens.put("T_WS", "<space>");
+		readableTokens.put("T_COMMENT", "'/*<comment>*/'");
+		readableTokens.put("LINE_COMMENT", "'#<line comment>'");
+		readableTokens.put("T_DIGIT", "<0..9>");
+		readableTokens.put("FLOAT_OR_INT_OR_RANGE", "<float_int_range>");
+		readableTokens.put("T_LETTER", "<a..z,A..Z>");
+		readableTokens.put("'|['", "'|['");
+		readableTokens.put("']|'", "']|'");
+		readableTokens.put("'add'", "'add'");
+		readableTokens.put("'mult'", "'mult'");
+		readableTokens.put("'deriv'", "'deriv'");
+		readableTokens.put("'mon+'", "'mon+'");
+		readableTokens.put("'mon-'", "'mon-'");
+		readableTokens.put("'id'", "'id'");
+		readableTokens.put("'qval'", "'qval'");
+		readableTokens.put("'\"'", "'\"'");
+		readableTokens.put("as", "as");
+	}
+
+	/* override routine that displays recongition errors.. */
+	@Override
+	public void displayRecognitionError(String[] tokenNames, RecognitionException e)
+	{
+		int i;
+		final StringBuilder result = new StringBuilder();
+//		SetUpTokenDictionary();
+
+
+		if (e instanceof MismatchedTokenException)
+		{
+			result.append("Found '");
+			result.append(e.token.getText());
+			result.append("'");
+			i = ((MismatchedTokenException)e).expecting;
+			result.append(" Expected: ");
+			result.append(readableTokens.get(tokenNames[i]));
+			result.append(" ("); result.append(tokenNames[i]); result.append(") ");
+
+		}
+		else
+		{
+			/*if (e is NoViableAltException)
+            {
+                result.Append("Unexpected '");
+                result.Append(e.Token.getText());
+                result.Append("' (");
+                i = ((NoViableAltException)e).UnexpectedType;
+                result.Append(tokenNames[i]);
+                result.Append(")");
+            }
+            else*/
+			if (e instanceof RecognitionException)
+			{
+				result.append("Unexpected '");
+				result.append(e.token.getText());
+				result.append("' (");
+				i = e.getUnexpectedType();
+				result.append(tokenNames[i]);
+				result.append(") ");
+			}
+			else
+				result.append(e.getMessage());
+		}
+
+		pState.AddErrorMessage(new ParserError(pState.filename, e.line, e.charPositionInLine, result.toString()));
+	}
+
+
+	/* just run over once */
+	public static int FirstPass(ParserState pState)
+	{
+		pState.parser.ooActionSystems();
+
+		return pState.listOfParserErrors.size(); // + pState.lexer.NumberOfSyntaxErrors;
+	}
+
+
+
+	/* print syntax tree */
+	public static String PrintSyntaxTree(ParserState pState)
+	{
+		if ((pState != null) && (pState.ooaSystem != null))
+		{
+			return pState.ooaSystem.toString();
+		}
+		else
+			return "";
+	}
+
+
+	public ooaCustomParser(TokenStream input, RecognizerSharedState state) {
+		super(input, state);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/UnsignedHelper.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/UnsignedHelper.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/UnsignedHelper.java	(revision 2)
@@ -0,0 +1,39 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.utils;
+
+public final class UnsignedHelper {
+
+	public static String toString(Integer input) {
+		long tmp = input;
+		tmp = tmp & 0xffffffff;
+		return Long.toString(tmp);
+	}
+
+	private UnsignedHelper() {}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/NotImplementedException.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/NotImplementedException.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/utils/exceptions/NotImplementedException.java	(revision 2)
@@ -0,0 +1,38 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.utils.exceptions;
+
+
+public class NotImplementedException extends OoasCompilerRuntimeException {
+
+	private static final long serialVersionUID = 1L;
+
+	public NotImplementedException() {super();}
+	public NotImplementedException(String s) {super(s);}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaCheckObjectRefsConstant.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaCheckObjectRefsConstant.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaCheckObjectRefsConstant.java	(revision 2)
@@ -0,0 +1,315 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.IdentityHashMap;
+
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.expressions.Expression;
+import org.momut.ooas.ast.expressions.IdentifierExpression;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.statements.Assignment;
+import org.momut.ooas.ast.types.ListType;
+import org.momut.ooas.ast.types.MapType;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.TupleType;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.parser.ParserError;
+import org.momut.ooas.parser.ParserMessage;
+import org.momut.ooas.parser.ParserState;
+
+/**
+ *
+ * @author KrennW
+ *
+ */
+public final class OoaCheckObjectRefsConstant extends OoaCompleteAstTraversalVisitor {
+
+	private static class CallGraphNode {
+		public final FunctionIdentifier m_functionIdentifier;
+		public final HashSet<CallGraphNode> m_calledFunctions;
+		public final HashSet<CallGraphNode> m_callees;
+		public boolean m_mayChangeObjectReferences;
+
+
+		@Override
+		public int hashCode() {
+			return m_functionIdentifier == null
+				?  0
+				:  m_functionIdentifier.tokenText().hashCode();
+		}
+
+		@Override
+		public boolean equals(Object obj) {
+			if (obj instanceof CallGraphNode) {
+				final CallGraphNode other = (CallGraphNode) obj;
+				return m_functionIdentifier != null
+					? m_functionIdentifier.tokenText().equals(other.m_functionIdentifier.tokenText())
+					: m_functionIdentifier == other.m_functionIdentifier;
+			}
+			return false;
+		}
+
+		@Override
+		public String toString() {
+			return m_functionIdentifier == null ? "<root>" : m_functionIdentifier.tokenText();
+		}
+
+		public CallGraphNode(FunctionIdentifier id) {
+			m_functionIdentifier = id;
+			m_calledFunctions = new HashSet<>();
+			m_callees = new HashSet<>();
+			m_mayChangeObjectReferences = false;
+		}
+	}
+
+
+	/** null (root-do/od block), or an action or method that is currently being parsed. */
+	private final ArrayList<FunctionIdentifier> m_currentFunction;
+	/** Maps FunctionIdentifiers to the CallGraphNode data structure. */
+	private final IdentityHashMap<String, CallGraphNode> m_callGraph;
+
+
+	/** Adds a new CallGraphNode to the callgraph if necessary. Returns the node. */
+	private CallGraphNode addCallGraphNode(FunctionIdentifier anIdentifier) {
+		if (anIdentifier != null) {
+			final String token = anIdentifier.tokenText().intern();
+			if (!m_callGraph.containsKey(token)) {
+				m_callGraph.put(token, new CallGraphNode(anIdentifier));
+			}
+			return m_callGraph.get(token);
+		}
+
+		if (!m_callGraph.containsKey(null)) {
+			m_callGraph.put(null, new CallGraphNode(null));
+		}
+		return m_callGraph.get(null);
+	}
+
+	/** adds a link to the callgraph */
+	private void addCalledFunction(CallGraphNode aNode) {
+		final FunctionIdentifier fi = m_currentFunction.get(m_currentFunction.size() -1);
+		if (fi != null && !m_callGraph.containsKey(fi.tokenText().intern()))
+			addCallGraphNode(fi);
+		final CallGraphNode currNode = fi == null ? m_callGraph.get(null) : m_callGraph.get(fi.tokenText().intern());
+		aNode.m_callees.add(currNode);
+		currNode.m_calledFunctions.add(aNode);
+	}
+
+	private void setMayChangeObjectRefs() {
+		final FunctionIdentifier fi = m_currentFunction.get(m_currentFunction.size() -1);
+		CallGraphNode node = m_callGraph.get(fi);
+		if (node == null)
+			node = addCallGraphNode(fi);
+		node.m_mayChangeObjectReferences = true;
+	}
+
+	private void check(TupleType type) {
+		for (final UlyssesType t: type.innerTypes())
+			switch (t.kind()) {
+			case ListType:
+				check( (ListType) t);
+				break;
+			case MapType:
+				check( (MapType) t);
+				break;
+			case TupleType:
+				check( (TupleType) t);
+				break;
+			case OoActionSystemType:
+				setMayChangeObjectRefs();
+				return;
+			default:
+				break;
+			}
+	}
+
+	private void check(MapType type) {
+		throw new RuntimeException("OoaCheckObjectRefsConstant pass does not support MapTypes.");
+	}
+
+	private void check(ListType type) {
+		switch (type.innerType().kind()) {
+		case ListType:
+			check( (ListType) type.innerType());
+			break;
+		case MapType:
+			check( (MapType) type.innerType());
+			break;
+		case TupleType:
+			check( (TupleType) type.innerType());
+			break;
+		case OoActionSystemType:
+			setMayChangeObjectRefs();
+			return;
+		default:
+			break;
+		}
+	}
+
+	private IdentifierExpression m_lastIdentifier = null;
+
+	@Override
+	public void visit(IdentifierExpression identifierExpression) {
+		m_lastIdentifier = identifierExpression;
+	}
+
+	@Override
+	public void visit(Assignment assignment) {
+		for (final Expression e: assignment.values())
+			VisitSub(e, assignment);
+		for (final Expression e: assignment.places()) {
+			m_lastIdentifier = null;
+			VisitSub(e, assignment);
+			if (m_lastIdentifier.identifier().kind() == IdentifierKind.AttributeIdentifier)
+				switch(e.type().kind()) {
+					case ListType:
+						check( (ListType) e.type());
+						break;
+					case MapType:
+						check( (MapType) e.type());
+						break;
+					case TupleType:
+						check( (TupleType) e.type() );
+						break;
+					case OoActionSystemType:
+						setMayChangeObjectRefs();
+						break;
+					default:
+						break;
+				}
+		}
+	}
+
+	@Override
+	public void visit(CallExpression callExpression) {
+		for (final FunctionIdentifier f: callExpression.callTargets())
+			addCalledFunction(addCallGraphNode(f));
+		super.visit(callExpression);
+	}
+
+
+	@Override
+	public void visit(MethodIdentifier methodIdentifier) {
+		m_currentFunction.add(methodIdentifier);
+		try {
+			addCallGraphNode(methodIdentifier);
+			super.visit(methodIdentifier);
+		} finally {
+			m_currentFunction.remove(m_currentFunction.size() -1);
+		}
+	}
+
+	@Override
+	public void visit(NamedActionIdentifier actionIdentifier){
+		m_currentFunction.add(actionIdentifier);
+		try {
+			addCallGraphNode(actionIdentifier);
+			super.visit(actionIdentifier);
+		} finally {
+			m_currentFunction.remove(m_currentFunction.size() -1);
+		}
+	}
+
+	@Override
+	public void visit(OoActionSystemType ooActionSystemType) {
+		for (final Identifier s: ooActionSystemType.symbols().symbolList())
+			VisitSub(s, ooActionSystemType);
+
+		m_currentFunction.add(null);
+		try {
+			VisitSub(ooActionSystemType.doOdBlock(), ooActionSystemType);
+		} finally {
+			m_currentFunction.remove(m_currentFunction.size() -1);
+		}
+	}
+
+	@Override
+	public void visit(MainModule mainModule) {
+		super.visit(mainModule);
+		// forward information..
+		for (final CallGraphNode n: m_callGraph.values())
+			promoteChangeInfo(n);
+		final CallGraphNode root = m_callGraph.get(null);
+		if (root.m_mayChangeObjectReferences) {
+			// check that only the initialize function changes object refs..
+			final StringBuilder b = new StringBuilder();
+			b.append("The following functions (all action systems merged) potentially change object references:");
+			b.append(System.lineSeparator());
+			printCandidates(root, 1,b);
+			m_ParserState.AddMessage(new ParserMessage("",0,0, b.toString()));
+			for (final CallGraphNode n: root.m_calledFunctions)
+				if (n.m_mayChangeObjectReferences && !n.toString().equals("initialize")) {
+					m_ParserState.AddErrorMessage(new ParserError("", 0, 0,
+						"Only \"initialize\" is allowed to change object references when using the symbolic solver."));
+//					System.out.println(b.toString());
+					break;
+				}
+		}
+	}
+
+	private void printCandidates(CallGraphNode root, int level, StringBuilder msg) {
+		for (final CallGraphNode n: root.m_calledFunctions) {
+			if (n.m_mayChangeObjectReferences) {
+				for (int i = 0; i < level; i++)
+					msg.append("\t");
+				msg.append(n.m_functionIdentifier.toString());
+				msg.append(System.lineSeparator());
+				printCandidates(n, level + 1, msg);
+			}
+		}
+	}
+
+	private void promoteChangeInfo(CallGraphNode n) {
+		if (n.m_mayChangeObjectReferences) {
+			for (final CallGraphNode c: n.m_callees) {
+				if (!c.m_mayChangeObjectReferences) {
+					c.m_mayChangeObjectReferences = true;
+					if (!c.m_calledFunctions.contains(n))
+						System.out.println("Bug.");
+					promoteChangeInfo(c);
+				}
+			}
+		}
+	}
+
+	public OoaCheckObjectRefsConstant(ParserState aState) {
+		super(aState);
+		m_callGraph = new IdentityHashMap<>();
+		m_currentFunction = new ArrayList<>();
+		m_currentFunction.add(null);
+		addCallGraphNode(null);  // add root elem.
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaExpressionVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaExpressionVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaExpressionVisitor.java	(revision 2)
@@ -0,0 +1,50 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+
+/// <summary>
+/// Visitor that restricts itself to expressions
+/// </summary>
+public class OoaExpressionVisitor extends OoaCompleteAstTraversalVisitor
+{
+	@Override
+	protected void VisitAstElement(IAst element, IAst parent)
+	{
+		// we are only interested in an expression.
+		if (element.nodeType() == AstNodeTypeEnum.expression)
+			super.VisitAstElement(element, parent);
+	}
+
+	public OoaExpressionVisitor()
+	{
+		super(null);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaObjectInstantiationVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaObjectInstantiationVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaObjectInstantiationVisitor.java	(revision 2)
@@ -0,0 +1,364 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import org.momut.ooas.CompilerConfiguration.LabelCompression;
+import org.momut.ooas.ast.IScope;
+import org.momut.ooas.ast.identifiers.AttributeIdentifier;
+import org.momut.ooas.ast.identifiers.FunctionIdentifier;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.IdentifierList;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.SelfTypeIdentifier;
+import org.momut.ooas.ast.identifiers.TypeIdentifier;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.PrioBlock;
+import org.momut.ooas.ast.statements.SeqBlock;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.types.ActionSystem;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.ast.types.OoActionSystemInstance;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.TypeKind;
+import org.momut.ooas.codegen.java.JavaInitVisitor;
+import org.momut.ooas.parser.ParserError;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.parser.SymbolTable;
+import org.momut.ooas.utils.OoasCompilerHashMap;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+
+public final class OoaObjectInstantiationVisitor extends OoaCompleteAstTraversalVisitor
+{
+	private final JavaInitVisitor m_simulator;
+	private final OoaIdentifierCompressVisitor m_compressor;
+	private ActionSystem m_actionSystem;
+	private Identifier self;
+	private OoasCompilerHashMap<Object, Object> m_toReplace = new OoasCompilerHashMap<Object, Object>();
+
+	/// <summary>
+	/// for a given object and type, the method duplicates the attributes and adds them to the resulting
+	/// instantiated action system.
+	/// </summary>
+	private void DuplicateAttribute(AttributeIdentifier attributeIdentifier,
+			OoActionSystemInstance obj, OoActionSystemType aType, ActionSystem m_actionSystem)
+	{
+		final AttributeIdentifier newAttribute = new AttributeIdentifier(attributeIdentifier);
+		newAttribute.SetTokenText(String.format("%s_%s", obj.Name, attributeIdentifier.tokenText()));
+		m_toReplace.putSafe(attributeIdentifier, newAttribute);
+
+		newAttribute.SetInitializer(newAttribute.initializer().Clone());
+		final OoaDeepCloneVisitor cloner = new OoaDeepCloneVisitor(m_toReplace, self);
+		newAttribute.initializer().Accept(cloner);
+
+		m_actionSystem.symbols().AddIdentifier(newAttribute);
+	}
+
+	public String getInstanceFunctionName(OoActionSystemInstance obj, FunctionIdentifier functionIdentifier)
+	{
+		final FunctionType functionType = (FunctionType) functionIdentifier.type();
+		String objectName = "";
+		switch(functionType.functionType()) {
+		case Controllable:
+		case Observable:
+			objectName = m_compressor.originalName(obj.Name);
+			break;
+		case Internal:
+		default:
+			objectName = obj.Name;
+		}
+
+		return String.format("%s_%s", objectName, functionIdentifier.tokenText());
+	}
+
+	private void DuplicateNamedAction(NamedActionIdentifier namedActionIdentifier,
+			OoActionSystemInstance obj, OoActionSystemType aType, ActionSystem m_actionSystem)
+	{
+		final NamedActionIdentifier newAction = new NamedActionIdentifier(namedActionIdentifier);
+		final String actionName = getInstanceFunctionName(obj, namedActionIdentifier);
+		newAction.SetTokenText(actionName);
+		m_toReplace.putSafe(namedActionIdentifier, newAction);
+		final OoaDeepCloneVisitor cloner = new OoaDeepCloneVisitor(m_toReplace, self);
+		newAction.Accept(cloner);
+
+		m_actionSystem.symbols().AddIdentifier(newAction);
+	}
+
+	private void DuplicateMethod(MethodIdentifier methodIdentifier, OoActionSystemInstance obj,
+			OoActionSystemType aType, ActionSystem m_actionSystem)
+	{
+		final MethodIdentifier newMethod = new MethodIdentifier(methodIdentifier);
+		final String methodName = getInstanceFunctionName(obj, methodIdentifier);
+		newMethod.SetTokenText(methodName);
+		m_toReplace.putSafe(methodIdentifier, newMethod);
+		final Statement newBlock = newMethod.body().Clone();
+		if (newBlock instanceof IScope)
+			((IScope)newBlock).SetParentScope(newMethod);
+		m_toReplace.putSafe(newMethod.body(), newBlock);
+		newMethod.SetBody(newBlock);
+		final OoaDeepCloneVisitor cloner = new OoaDeepCloneVisitor(m_toReplace, self);
+		newMethod.body().Accept(cloner);
+
+		m_actionSystem.symbols().AddIdentifier(newMethod);
+	}
+
+
+	/*Duplicates the do-od block (incl. any do-od blocks of parent classes)*/
+	private void DuplicateDoOdBlock(OoActionSystemInstance obj, OoActionSystemType aType, ActionSystem m_actionSystem, Block result)
+	{
+//		OoActionSystemType rootType = aType;
+		Block block;
+		while (aType != null)
+		{
+			block = aType.doOdBlock();
+			if (block != null)
+			{
+				final Block clone = (Block)block.Clone();
+				m_toReplace.putSafe(block, clone);
+				clone.SetParentScope(result);
+				final OoaDeepCloneVisitor cloner = new OoaDeepCloneVisitor(m_toReplace, self);
+				clone.Accept(cloner);
+				result.AddStatement(clone);
+			}
+			aType = aType.baseType();
+		}
+	}
+
+	OoasCompilerHashMap<Object, Object> objectsdone = new OoasCompilerHashMap<Object, Object>();
+
+	/// <summary>
+	/// Generates an OoActionSystemType that is the instantiation of all the objects found in the System Assembling Block
+	/// </summary>
+	private void InstantiateObjects(ActionSystem m_actionSystem, MainModule mainModule, IdentifierList sysdescr, Block parent)
+	{
+		Block newBlock;
+		switch (sysdescr.listType())
+		{
+		case nondeterministic:
+			newBlock = new NondetBlock(0, 0);
+			break;
+		case prioritized:
+			newBlock = new PrioBlock(0, 0);
+			break;
+		case seqential:
+			newBlock = new SeqBlock(0, 0);
+			break;
+
+		case normal:
+		default:
+			throw new NotImplementedException();
+		}
+
+		if (parent == null)
+			m_actionSystem.SetDoOdBlock(newBlock);
+		else
+			parent.AddStatement(newBlock);
+
+		for (final Identifier id: sysdescr.identifiers())
+		{
+			Identifier ident = id;
+			while (ident.kind() == IdentifierKind.List && ((IdentifierList)ident).identifiers().size() == 1)
+			{
+				ident = ((IdentifierList)ident).identifiers().peekFirst();
+			}
+
+			if (ident.kind() == IdentifierKind.List)
+				InstantiateObjects(m_actionSystem, mainModule, (IdentifierList)ident, newBlock);
+			else
+			{
+				if (ident.kind() == IdentifierKind.TypeIdentifier &&
+						((TypeIdentifier)ident).type().kind() == TypeKind.OoActionSystemType)
+				{
+
+					final OoActionSystemType aType = (OoActionSystemType)((TypeIdentifier)ident).type();
+					objectsdone.putSafe(aType, m_actionSystem);
+
+
+					Block NondetBlock = null; // holds parallel comp of all objects
+					if (aType.doOdBlock() != null)
+					{
+						NondetBlock = new NondetBlock(0, 0);
+						newBlock.AddStatement(NondetBlock);
+					}
+
+
+					for (final OoActionSystemInstance obj: aType.objects())
+					{
+						m_toReplace = new OoasCompilerHashMap<Object, Object>(objectsdone);
+						addParentClassMappings(m_toReplace, aType, m_actionSystem);
+						self = new SelfTypeIdentifier(obj.Name, aType, null);
+						final SymbolTable table = aType.getAllSymbols();
+						for (final Identifier x: table.symbolList())
+						{
+							// resolve attributes first
+							if (x.kind() == IdentifierKind.AttributeIdentifier)
+								DuplicateAttribute((AttributeIdentifier)x, obj, aType, m_actionSystem);
+						}
+						for (final Identifier x: table.symbolList())
+						{
+							// now do methods and other stuff
+							if (x.kind() == IdentifierKind.MethodIdentifier)
+								DuplicateMethod((MethodIdentifier)x, obj, aType, m_actionSystem);
+							else if (x.kind() == IdentifierKind.NamedActionIdentifier)
+								DuplicateNamedAction((NamedActionIdentifier)x, obj, aType, m_actionSystem);
+						}
+						// construct parallel composition of all the objects of one class.
+						if (aType.doOdBlock() != null)
+						{
+							DuplicateDoOdBlock(obj, aType, m_actionSystem, NondetBlock);
+						}
+					}
+
+					// add an error, if a type does not get instantiated and the do-od block is filled..
+					// !!!!!!!!!!!!!!! note, if new is also allowed in normal actions, this needs to be disabled (or become a warning) !!!!!!!!!!!!!!!!!!!!!!!!!!
+					if (aType.objects().size() == 0 && aType.doOdBlock() != null)
+					{
+						m_ParserState.AddErrorMessage(new ParserError(m_ParserState.filename, aType.identifier().line(), aType.identifier().column(),
+								String.format("Type '%s' is never instantiated but has a non-empty do-od block", aType.toString())));
+					}
+				}
+				else
+					throw new NotImplementedException();
+			}
+		}
+	}
+
+	private void addParentClassMappings(OoasCompilerHashMap<Object, Object> m_toReplace, OoActionSystemType aType, ActionSystem m_actionSystem)
+	{
+		while (aType != null)
+		{
+			if (!m_toReplace.containsKey(aType))
+				m_toReplace.putSafe(aType, m_actionSystem); // add base classes to mapping...
+			aType = aType.baseType();
+		}
+	}
+
+	/// <summary>
+	/// Adds those objects of types that are not found in the SAB.
+	/// </summary>
+	private void InstantiatePassiveObjects(ActionSystem m_actionSystem, MainModule mainModule)
+	{
+		for (final Identifier x: mainModule.symbolTable().symbolList())
+		{
+			if (x.type().kind() == TypeKind.OoActionSystemType && !objectsdone.containsKey(x.type()))
+				if (((OoActionSystemType)x.type()).autoConstruction())
+				{
+					final OoActionSystemType aType = (OoActionSystemType)x.type();
+					m_ParserState.AddErrorMessage(new ParserError(m_ParserState.filename, aType.identifier().line(), aType.identifier().column(),
+							String.format("Type '%s' marked autocons but omitted in system description!", aType.toString())));
+				}
+				else
+				{
+					final OoActionSystemType aType = (OoActionSystemType)x.type();
+					for (final OoActionSystemInstance obj: aType.objects())
+					{
+						m_toReplace = new OoasCompilerHashMap<Object, Object>(objectsdone);
+						addParentClassMappings(m_toReplace, aType, m_actionSystem);
+						self = new SelfTypeIdentifier(obj.Name, aType, null);
+						final SymbolTable table = aType.getAllSymbols();
+						for (final Identifier y: table.symbolList())
+						{
+							// resolve attributes first
+							if (y.kind() == IdentifierKind.AttributeIdentifier)
+								DuplicateAttribute((AttributeIdentifier)y, obj, aType, m_actionSystem);
+						}
+						for (final Identifier y: table.symbolList())
+						{
+							// now do methods
+							if (y.kind() == IdentifierKind.MethodIdentifier)
+								DuplicateMethod((MethodIdentifier)y, obj, aType, m_actionSystem);
+							//else if (y.kind == IdentifierKind.NamedActionIdentifier)
+							//    m_ParserState.AddErrorMessage(new ParserError(m_ParserState.filename, aType.identifier.line, aType.identifier.column,
+							//        String.Format("Type '%s' has named actions but was omitted in system description!", aType.ToString())));
+						}
+						if (aType.doOdBlock() != null)
+							m_ParserState.AddErrorMessage(new ParserError(m_ParserState.filename, aType.identifier().line(), aType.identifier().column(),
+									String.format("Type '%s' has do-od block but was omitted in system description!", aType.toString())));
+					}
+
+				}
+		}
+	}
+
+
+
+
+
+	@Override
+	public void visit(MainModule mainModule)
+	{
+		if (mainModule.systemDescription() == null)
+			return;
+
+		// accept compression visitor
+		if (m_compressor.compression() != LabelCompression.NoCompression)
+			mainModule.Accept(m_compressor);
+
+
+		/* determine names of objects */
+		mainModule.Accept(m_simulator);
+
+		final boolean shortObjectNames = m_compressor.compression() == LabelCompression.All
+									  || m_compressor.compression() == LabelCompression.ActionsMethodsObjects;
+		if (shortObjectNames) {
+			// compress object names
+			for (final OoActionSystemInstance instance: m_simulator.initialObjectWorkingSet()) {
+				instance.Name = m_compressor.labelFor(instance);
+			}
+		}
+
+		/* add information about all the objects to the AST */
+		// mainModule.SetObjects(m_simulator.initialObjectWorkingSet);
+		m_actionSystem = new ActionSystem();
+		m_actionSystem.SetParentScope(mainModule);
+		InstantiateObjects(m_actionSystem, mainModule, mainModule.systemDescription(), m_actionSystem.doOdBlock());
+		InstantiatePassiveObjects(m_actionSystem, mainModule);
+
+		mainModule.SetInstance(m_actionSystem);
+
+		m_ParserState.mappingInformation = m_compressor.mappingInformation();
+	}
+
+	@Override
+	public String toString()
+	{
+		return m_simulator.toString();
+	}
+
+
+	public OoaObjectInstantiationVisitor(ParserState aState, LabelCompression compression)
+	{
+		super (aState);
+		m_simulator = new JavaInitVisitor(aState);
+		m_compressor = new OoaIdentifierCompressVisitor(aState, compression);
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaStatementVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaStatementVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaStatementVisitor.java	(revision 2)
@@ -0,0 +1,51 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+
+/// <summary>
+/// Visitor that restricts itself to statements
+/// </summary>
+public class OoaStatementVisitor extends OoaCompleteAstTraversalVisitor
+{
+	@Override
+	protected void VisitAstElement(IAst element, IAst parent)
+	{
+		// we are only interested in an expression.
+		if (element.nodeType() == AstNodeTypeEnum.statement)
+			super.VisitAstElement(element, parent);
+	}
+
+	public OoaStatementVisitor()
+	{
+		super(null);
+	}
+
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypeVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypeVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/OoaTypeVisitor.java	(revision 2)
@@ -0,0 +1,51 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+
+
+/// <summary>
+/// Visitor that restricts itself to types
+/// </summary>
+public class OoaTypeVisitor extends OoaCompleteAstTraversalVisitor
+{
+	@Override
+	protected void VisitAstElement(IAst element, IAst parent)
+	{
+		// we are only interested in an expression.
+		if (element.nodeType() == AstNodeTypeEnum.type)
+			super.VisitAstElement(element, parent);
+	}
+
+	public OoaTypeVisitor()
+	{
+		super(null);
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaPrintActionsVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaPrintActionsVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/analysis/OoaPrintActionsVisitor.java	(revision 2)
@@ -0,0 +1,169 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors.analysis;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+
+import org.momut.ooas.ast.expressions.CallExpression;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MainModule;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.identifiers.ParameterIdentifier;
+import org.momut.ooas.ast.statements.Call;
+import org.momut.ooas.ast.types.FunctionType;
+import org.momut.ooas.codegen.prolog.OoaPrologIdentifier;
+import org.momut.ooas.parser.ParserMessage;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+public class OoaPrintActionsVisitor extends OoaCompleteAstTraversalVisitor {
+
+	private final ArrayList<String> m_result = new ArrayList<>();
+	private final OoaPrologIdentifier.Factory m_idFactory;
+
+
+	@SuppressWarnings("unused")
+	private void printNamedActions(MainModule mainModule)
+	{
+		for (final Identifier x: mainModule.instance().symbols().symbolList())
+		{
+			if (x.kind() != IdentifierKind.NamedActionIdentifier)
+				continue;
+
+			final NamedActionIdentifier action = (NamedActionIdentifier)x;
+			final FunctionType actionType = (FunctionType) action.type();
+			String ctrObs = "";
+			switch(actionType.functionType()) {
+				default:
+					// something we do not know...
+					throw new UnsupportedOperationException();
+				case Continuous:
+					// we do not support continuous actions here
+					throw new UnsupportedOperationException();
+				case Internal:
+				case Method:
+					// we do not print methods or internal actions
+					continue;
+				case Observable:
+					// yes, report it
+					ctrObs = "obs";
+					break;
+				case Controllable:
+					// yes, report it
+					ctrObs = "ctr";
+					break;
+			}
+
+			final OoaPrologIdentifier pIdent = m_idFactory.create();
+			action.Accept(pIdent);
+
+			final StringBuilder parameter = new StringBuilder();
+			if (action.parameter().size() > 0) {
+				parameter.append("(");
+				int z = 0;
+				for (final ParameterIdentifier param: action.parameter()) {
+					if (z != 0) {
+						parameter.append(", ");
+					} else
+						z++;
+					final OoaPrologIdentifier pParamIdent = m_idFactory.create();
+					param.Accept(pParamIdent);
+					parameter.append(pParamIdent.toString());
+				}
+				parameter.append(")");
+			}
+			m_result.add(String.format("%s %s%s", ctrObs, pIdent.toString().replaceAll("'", ""), parameter.toString()));
+		}
+	}
+
+	@Override
+	public void visit(MainModule mainModule) {
+		//printNamedActions(mainModule);
+		mainModule.instance().doOdBlock().Accept(this);
+		final StringBuilder b = new StringBuilder();
+		b.append("List of controllable/observable actions used:");
+		b.append(System.lineSeparator());
+		for (final String s: m_result) {
+			b.append(String.format("\t%s",s));
+			b.append(System.lineSeparator());
+		}
+		m_ParserState.AddMessage(new ParserMessage("",0,0, b.toString()));
+	}
+
+	HashSet<String> m_seenActions = new HashSet<String>();
+
+	@Override
+	public void visit(Call call) {
+		final CallExpression e = (CallExpression) call.callExpression();
+//		for (final FunctionIdentifier id : call.callExpression().callTargets()) {
+			final FunctionType actionType = (FunctionType) e.child().type();
+			String ctrObs = "";
+			switch(actionType.functionType()) {
+				default:
+					// something we do not know...
+					throw new UnsupportedOperationException();
+				case Continuous:
+					// we do not support continuous actions here
+					throw new UnsupportedOperationException();
+				case Internal:
+				case Method:
+					// we do not print methods or internal actions
+					//continue;
+					return;
+				case Observable:
+					// yes, report it
+					ctrObs = "obs";
+					break;
+				case Controllable:
+					// yes, report it
+					ctrObs = "ctr";
+					break;
+			}
+			final OoaPrologIdentifier pIdent = m_idFactory.create();
+			e.child().Accept(pIdent);
+
+			final String actionString = String.format("%s %s", ctrObs, pIdent.toString().replaceAll("'", ""));
+			if (!m_seenActions.contains(actionString)) {
+				m_seenActions.add(actionString);
+				m_result.add(actionString);
+			}
+//		}
+	}
+
+	@Override
+	public String toString() {
+		return m_result.toString();
+	}
+
+	public OoaPrintActionsVisitor(ParserState aState) {
+		super(aState);
+		m_idFactory = new OoaPrologIdentifier.Factory();
+	}
+}
Index: trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialNondetChoiceCompositionVisitor.java
===================================================================
--- trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialNondetChoiceCompositionVisitor.java	(nonexistent)
+++ trunk/compiler/ooasCompiler/src/org/momut/ooas/visitors/optimisation/OoaRemoveTrivialNondetChoiceCompositionVisitor.java	(revision 2)
@@ -0,0 +1,160 @@
+/**
+  *
+  *                      OOAS Compiler
+  *
+  *       Copyright 2015, AIT Austrian Institute of Technology.
+  * This code is based on the C# Version of the OOAS Compiler, which is
+  * copyright 2015 by the Institute of Software Technology, Graz University
+  * of Technology with portions copyright by the AIT Austrian Institute of
+  * Technology. All rights reserved.
+  *
+  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
+  *
+  * If you modify the file please update the list of contributors below to in-
+  * clude your name. Please also stick to the coding convention of using TABs
+  * to do the basic (block-level) indentation and spaces for anything after
+  * that. (Enable the display of special chars and it should be pretty obvious
+  * what this means.) Also, remove all trailing whitespace.
+  *
+  * Contributors:
+  *               Willibald Krenn (AIT)
+  *               Stephan Zimmerer (AIT)
+  *               Markus Demetz (AIT)
+  *               Christoph Czurda (AIT)
+  *
+  */
+
+
+package org.momut.ooas.visitors.optimisation;
+
+import org.momut.ooas.ast.AstNodeTypeEnum;
+import org.momut.ooas.ast.IAst;
+import org.momut.ooas.ast.identifiers.Identifier;
+import org.momut.ooas.ast.identifiers.IdentifierKind;
+import org.momut.ooas.ast.identifiers.MethodIdentifier;
+import org.momut.ooas.ast.identifiers.NamedActionIdentifier;
+import org.momut.ooas.ast.statements.Block;
+import org.momut.ooas.ast.statements.GuardedCommand;
+import org.momut.ooas.ast.statements.NondetBlock;
+import org.momut.ooas.ast.statements.Statement;
+import org.momut.ooas.ast.statements.StatementKind;
+import org.momut.ooas.ast.types.OoActionSystemType;
+import org.momut.ooas.ast.types.UlyssesType;
+import org.momut.ooas.parser.ParserState;
+import org.momut.ooas.utils.exceptions.NotImplementedException;
+import org.momut.ooas.utils.exceptions.InternalCompilerException;
+import org.momut.ooas.utils.exceptions.OoasCompilerRuntimeException;
+import org.momut.ooas.visitors.OoaCompleteAstTraversalVisitor;
+
+/**
+ * Similar (and should be run after) the RemoveTrivialPrioritizedCompositionVisitor.
+ * Removes Nondet-Choice blocks that only have one choice...
+ * @author KrennW
+ *
+ */
+public final class OoaRemoveTrivialNondetChoiceCompositionVisitor extends OoaCompleteAstTraversalVisitor {
+	/// <summary>
+	/// replaces the nondetBlock by its child
+	/// </summary>
+	private IAst ConvertNondetBlock(NondetBlock nondetBlock, IAst parent)
+	{
+		if (nondetBlock.statements().size() <= 1 && nondetBlock.isSimpleBlock())
+		{
+			final Block newBlock = (Block)nondetBlock.statements().peekFirst();
+			newBlock.SetParentScope(nondetBlock.GetParentScope());
+			switch (parent.nodeType())
+			{
+			case type:
+				switch (((UlyssesType)parent).kind())
+				{
+				case OoActionSystemType:
+					final OoActionSystemType atype = (OoActionSystemType)parent;
+					final Block ablock = atype.doOdBlock();
+					if (ablock != nondetBlock) // ref equ.
+						throw new InternalCompilerException("Internal Error: Cannot replace doOdBlock.");
+					atype.SetDoOdBlock(newBlock);
+					break;
+				default:
+					throw new NotImplementedException();
+				}
+				break;
+			case statement:
+				switch (((Statement)parent).kind())
+				{
+				case SeqBlock:
+				case PrioBlock:
+					final Block aBlock = (Block)parent;
+					final int idx = aBlock.statements().indexOf(nondetBlock);
+					if (idx == -1)
+						throw new OoasCompilerRuntimeException(); // must not happen?!
+					aBlock.statements().set(idx, newBlock);
+					break;
+				case GuardedCommand:
+					final GuardedCommand gc = (GuardedCommand)parent;
+					if(gc.body() != nondetBlock) // ref equ.
+						throw new InternalCompilerException("Internal Error: Cannot replace guarded command body.");
+					gc.SetBody(newBlock);
+					break;
+				default:
+					throw new NotImplementedException();
+				}
+				break;
+			case identifier:
+				switch (((Identifier)parent).kind())
+				{
+				case NamedActionIdentifier:
+					final NamedActionIdentifier action = (NamedActionIdentifier)parent;
+					if (action.body() != nondetBlock) // ref equ.
+						throw new InternalCompilerException("Internal Error: Cannot replace action body.");
+					action.SetBody(newBlock);
+					break;
+				case MethodIdentifier:
+					final MethodIdentifier method = (MethodIdentifier)parent;
+					if (method.body() != nondetBlock) // ref equ.
+						throw new InternalCompilerException("Internal Error: Cannot replace method body.");
+					method.SetBody(newBlock);
+					break;
+				default:
+					throw new NotImplementedException();
+				}
+				break;
+			default:
+				throw new NotImplementedException();
+			}
+			m_changes = true;
+			return newBlock;
+		}
+		else
+			return nondetBlock;
+	}
+
+
+	@Override
+	protected void VisitAstElement(IAst element, IAst parent)
+	{
+		if ( (element.nodeType() == AstNodeTypeEnum.statement) &&
+		     (((Statement)element).kind() == StatementKind.NondetBlock) &&
+		      // we're only interested in actionblock and actionbody composition, not in type composition
+		     !(parent.nodeType() == AstNodeTypeEnum.identifier &&
+		       ((Identifier)parent).kind() == IdentifierKind.List))
+		{
+			final IAst newchild = ConvertNondetBlock((NondetBlock)element, parent);
+			super.VisitAstElement(newchild, parent);
+		}
+		else
+			super.VisitAstElement(element, parent);
+	}
+
+	private boolean m_changes = false;
+
+	public OoaRemoveTrivialNondetChoiceCompositionVisitor(ParserState aState)
+	{
+		super (aState);
+	}
+
+
+	public boolean changedAst() {
+		return m_changes;
+	}
+
+}
Index: trunk/compiler/ooasCompiler_tests/.project
===================================================================
--- trunk/compiler/ooasCompiler_tests/.project	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/.project	(revision 2)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>OOASCompiler-test</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
Index: trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/SmokeOoasTests.java
===================================================================
--- trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/SmokeOoasTests.java	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/SmokeOoasTests.java	(revision 2)
@@ -0,0 +1,60 @@
+package org.momut.ooas.test;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.momut.ooas.CompilerConfiguration.Backend;
+import org.momut.ooas.test.utils.OoasTest;
+
+@RunWith(Parameterized.class)
+public class SmokeOoasTests extends OoasTest {
+	/**
+	 * This function returns a list of a list of parameters.
+	 * These parameters are used by JUnit to call the constructor
+	 * of the test.
+	 * @return a collection of parameter lists
+	 * @throws IOException
+	 */
+	@Parameterized.Parameters(name="{0}: OOAS Compiler")
+	public static Collection<Object[]> testFiles() throws IOException {
+		final File outDir = OoasTest.createOutputDirectory(SmokeOoasTests.class);
+		return Arrays.asList(new Object[][] {
+			{ "portest"                  , s_standardDir, outDir},
+			{ "inlinetest"               , s_standardDir, outDir},
+			{ "simpletest"               , s_standardDir, outDir},
+			{ "slicetest"                , s_standardDir, outDir},
+			{ "AlarmSystem"              , s_standardDir, outDir},
+//			{ "mms"                      , s_complexDir, outDir},
+//			{ "tas"                      , s_complexDir, outDir}
+		});
+	}
+
+	private final File m_outDir;
+
+	/**
+	 * Constructor
+	 * @param testName The test name (name of the uml file without the ".uml" prefix)
+	 * @param directory The directory containing the UML models
+	 */
+	public SmokeOoasTests(String testName, String directory, File outDir) {
+		super(testName, directory + testName + ".ooas");
+		m_outDir = outDir;
+	}
+
+	/**
+	 * Run the MoMuT mutation toolchain.
+	 * */
+	@Test
+	public void test() throws URISyntaxException, UnsupportedEncodingException, IOException {
+		final URI modelUri = OoasTest.class.getClassLoader().getResource(m_model).toURI();
+		runOoasCompiler(m_testName, new File(modelUri), m_outDir, Backend.Prolog);
+	}
+}
Index: trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/portest.ooas
===================================================================
--- trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/portest.ooas	(nonexistent)
+++ trunk/compiler/ooasCompiler_tests/src/org/momut/ooas/test/models/standard/portest.ooas	(revision 2)
@@ -0,0 +1,21 @@
+types
+	t_myInt = int[0..40];
+	
+	aSystem = autocons system |[
+		var
+			x : t_myInt = 0
+		actions
+			ctr a = requires true: skip end;
+			ctr b = requires true: x := x + 1 end;
+			ctr c = requires x = 1: x := 0 end
+		do
+			a
+			[]
+			b
+			[]
+			c
+		od
+	]|
+	
+system
+	aSystem
Index: trunk/compiler/serialization/Makefile
===================================================================
--- trunk/compiler/serialization/Makefile	(nonexistent)
+++ trunk/compiler/serialization/Makefile	(revision 2)
@@ -0,0 +1,8 @@
+include ../executor/Makefile.inc
+
+PROTOC=$(PROTOBUF)/bin/protoc
+
+all: protobuf
+
+protobuf:
+	$(PROTOC) -I=./src --java_out=../src --cpp_out=../executor/source/runtime/serialize/gen ./src/*.proto
